An onboarding method that gets the user straight into the app and doesn't require any splash screens.
- Create your
steps = [ OnboardStep( key: GlobalKey(), label: "Tap to increment & continue", //this sets the shape of the hole, defaults to a rounded rectangle shape: CircleBorder(), //if tappable is false, tapping will not proceed to next step tappable: false, //in this case, you must provide a stream to listen to for when to proceed proceed: proceed1.stream, //you can also specify a margin margin: EdgeInsets.all(8.0), ), OnboardStep(key: GlobalKey(), label: "Tap anywhere to continue."), OnboardStep(key: GlobalKey(), label: "Easy to customise"), OnboardStep(key: GlobalKey(), label: "Add steps for any widget"), ];
- Provide the
GlobalKeys to the widgets. You could use
GlobalValueKeys to avoid referencing the
Text( 'You have pushed the button this many times:', key: steps.key, ),
Add logic for the streams required to proceed, if you use this option
onboardafter the first build. The easiest way is to use the following in an
WidgetsBinding.instance .addPostFrameCallback((_) => onboard(steps, context));
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.