flutter_feature_tour library
Spotlight feature tours and onboarding for Flutter apps.
Classes
- FeatureHighlight
- Represents a single feature to be highlighted during the feature tour.
- FeatureHighlightOverlay
- A widget that displays an overlay highlighting specific features in the app.
- FeatureTourLabels
- User-facing strings used by the feature tour.
- FeatureTourTheme
- Defines the visual theme for the feature tour.
- HighlightPainter
- A custom painter that draws highlight shapes for feature tours.
- InfoCard
- A widget that displays information about a highlighted feature during a feature tour.
- InMemoryDataProvider
- A TourStorageDataProvider that only keeps values in memory, so tours show again on every app launch. Also handy in tests.
- OnboardingService
- A service that manages the onboarding process and feature tour for an application.
-
A TourStorageDataProvider backed by
shared_preferences. - SpotlightPainter
- Paints the dimmed tour backdrop with transparent "holes" for each highlighted feature, plus an optional outline around each hole.
- TourProgress
- Saved progress of one tour.
- TourProgressRepository
- Contract for loading and saving the progress of tours.
- TourProgressRepositoryImpl
-
The default TourProgressRepository. Stores progress through a
TourStorageDataProvider under the keys
flutter_feature_tour.<tourId>.lastViewedStepandflutter_feature_tour.<tourId>.completed. - TourStorageDataProvider
- Contract for the low-level key/value storage that tour progress is persisted in.
Enums
- HighlightShape
- Defines the shape of the highlight overlay for a feature.
- TourBarrierTapBehavior
- What happens when the user taps the dimmed area outside the info card.
Functions
-
buildHighlightPath(
{required HighlightShape shape, required Rect targetRect, EdgeInsets padding = EdgeInsets.zero, double cornerRadius = 0, Path? customPath}) → Path -
Builds the outline of a highlight around
targetRect.
Typedefs
- FeatureTourLabelsBuilder = FeatureTourLabels Function(BuildContext context)
- Builds FeatureTourLabels from the tour's BuildContext, e.g. from your app's localizations.
- InteractiveWidgetBuilder = Widget Function(BuildContext context, VoidCallback onComplete)
- Signature for building an interactive widget shown inside the info card.
- LocalizedText = String Function(BuildContext context)
-
Signature for text that is resolved with a BuildContext, typically to
look up a translation, e.g.
(context) => AppLocalizations.of(context)!.x. - TourOverlayBuilder = Widget Function(BuildContext context, Widget child)
- Wraps the tour overlay, see OnboardingService.overlayBuilder.