provide static method

Widget provide({
  1. required Tutorial tutorial,
  2. required Widget child,
})

Wraps the widget tree with a ChangeNotifierProvider to provide the tutorial controller.

This enables TutorialOverlay and other widgets to access the tutorial state.

Parameters:

  • tutorial: The Tutorial instance to provide.
  • child: The widget tree to wrap.

{@tool snippet}

Tutorial.provide(tutorial: tutorial, child: const MyApp());

{@end-tool}

Implementation

static Widget provide({required Tutorial tutorial, required Widget child}) {
  return ChangeNotifierProvider.value(value: tutorial, child: child);
}