A coach mark tutorial is the overlay that dims the screen and points at a button, a tab, or a card, explaining what it does. In Flutter you can build one from scratch with an OverlayEntry and a GlobalKey, but for anything past a single tooltip the package route is faster and less fragile.
This walkthrough uses the showcaseview package, which is the maintained option most teams reach for in 2026. You will wire up a three-step tour, control when it fires, and handle the layout and state problems that show up once the tour meets a real screen.
Key points
- Wrap the screen in ShowCaseWidget and each target in a Showcase with a GlobalKey.
- Start the tour in a post-frame callback to avoid missing render boxes.
- Keep tours to three to five steps and persist a completion flag.
- Test on a small viewport; tooltip overflow is the most common failure.
Why coach marks are worth the effort
New users skip onboarding screens and then get lost inside the app. A coach mark ties the explanation directly to the control it describes, so the user learns by looking at the real UI instead of a slideshow. Retention data from product teams generally shows a modest lift when first-run guidance is specific, in the range of a few percentage points, not a dramatic jump.
The cost is real, though. Every coach mark is another piece of state that can break when a layout changes. Keep the tour to three to five steps on the primary screen, and treat each step as a contract: if that widget moves, the tour must be updated in the same pull request.
- Guide only actions a new user must discover to get value
- Three to five steps is a sane ceiling for a first-run tour
- Store a 'tour completed' flag so it never reappears
- Make every step dismissible with a visible skip action
Setting up showcaseview
Add the dependency in pubspec.yaml and run flutter pub get. In 2026 the package is on the 3.x line and supports current Flutter stable releases. If your project is still on an older SDK, pin the version that matches your Flutter constraint rather than forcing the latest, because the API changed between major versions.
The core objects are ShowCaseWidget, which wraps the subtree that will be highlighted, and Showcase, which wraps an individual widget you want to point at. Each Showcase needs a unique GlobalKey so the package can measure the target's position on screen after layout.
- dependencies: showcaseview: ^3.0.0
- Wrap your screen body in ShowCaseWidget
- Give every Showcase its own GlobalKey
- Call startShowCase with the keys in the order you want
| Approach | Setup effort | Customisation | Maintenance | Best for |
|---|---|---|---|---|
| Custom OverlayEntry + GlobalKey | High | Full control | You own it | Single tooltip, unusual animation |
| showcaseview 3.x | Low | Good | Active package | Typical 3-5 step tours |
| Intro.js-style web view | Medium | Limited | Bridge issues | Not recommended on mobile |
| In-app help screen (no overlay) | Low | N/A | Low | Complex concepts |
| Third-party analytics tour SDK | Medium | Medium | Vendor lock-in | Marketing-owned tours |
A complete three-step example
The screen below has a search field, a filter button, and a floating action button. Each is wrapped in a Showcase with a title, a description, and a shape. The tour starts from initState using a post-frame callback so the keys are attached before measurement runs.
Set disableBarrierInteraction to false only if you want taps to pass through the dim layer, which is rarely what you want. The default barrier blocks input, which is correct for a guided tour. Use onFinish and onSkip to write the completion flag to shared_preferences so the tour runs exactly once.
- WidgetsBinding.instance.addPostFrameCallback((_) => controller.startShowCase(keys))
- Use Showcase.withWidget for custom tooltip layouts
- Wrap long tooltip text in a constrained box to avoid overflow
- Persist completion in onFinish and onSkip
Handling layout and state problems
The most common failure is starting the tour before the target exists, which throws because the key has no render box. The post-frame callback fixes this on a static screen, but if your target sits inside a lazily built list you must scroll to it first and then start. This is the same measurement trap that catches developers in RecyclerView scrolling code, just expressed in Flutter.
Second, tooltips overflow on small screens. Constrain the tooltip width to a fraction of MediaQuery width and let the text wrap. Third, if the tour triggers during a rebuild, you can get duplicate overlays; guard the start call with a boolean so it fires once per session.
- Never start before the first frame is painted
- Scroll lazy lists to the target before measuring
- Clamp tooltip width using MediaQuery
- Guard against double starts with a session flag
Customising the look and feel
The default overlay is a semi-transparent black, which is fine but generic. Set overlayColor to a tinted shade, use the target's border radius in the shape so the highlight hugs the widget, and keep tooltip text under about fifteen words per step. Longer copy belongs in a help screen, not a coach mark.
Animation speed matters more than most people expect. A transition of 200 to 400 milliseconds feels responsive; anything above half a second makes the tour feel sluggish. Match the tooltip's corner radius and shadow to your app's card style so the overlay does not look bolted on.
- overlayColor: Colors.black.withOpacity(0.75)
- Match shape radius to the highlighted widget
- Keep each tooltip under fifteen words
- Transition durations of 200-400 ms feel right
Testing and debugging the tour
Write an integration test that walks the tour end to end on a phone-sized viewport. Widget tests can verify that the completion flag is written, but they cannot catch overflow, so run at least one test on a small device emulator. If you are building the whole app with Flutter, the onboarding flow is worth planning early rather than bolting on later; the same is true of the budget, which is why a clear picture of what a Flutter app costs to build in 2026 helps before scoping the work.
If you are still deciding on the toolkit itself, this overview of Flutter's cross-platform UI toolkit covers the fundamentals. For the coach mark, add a debug flag that always shows the tour in development builds so you can inspect it after every UI change without clearing app data.
- Test on a small viewport to catch overflow
- Assert the completion flag in a widget test
- Add a debug override to force the tour
- Re-run the tour after any layout change
Editor and Flutter contributor. Writes practical Flutter tutorials focused on widgets, layout and animation. Enjoys breaking large UI problems into small, testable pieces and explaining them clearly to beginners.


