flutter_feature_tour 0.1.0 copy "flutter_feature_tour: ^0.1.0" to clipboard
flutter_feature_tour: ^0.1.0 copied to clipboard

A powerful and customizable feature tour package for Flutter applications.

๐ŸŽก Flutter Feature Tour #

A powerful and customizable feature tour package for Flutter applications, designed to create engaging onboarding experiences and highlight key features of your app.

Demo #

Flutter Feature Tour Demo

![USimulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.54.38](images/Simulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.54.38.png) USimulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.54.38

![USimulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.54.46](images/Simulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.54.46.png) USimulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.54.46

![USimulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.54.52](images/Simulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.54.52.png) USimulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.54.52

![USimulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.55.03](images/Simulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.55.03.png) USimulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.55.03

![USimulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.55.30](images/Simulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.55.30.png) USimulator Screenshot - iPhone 16 Pro - 2024-11-11 at 21.55.30

Ufeatur 4 Ufeatur 4

Ufeature-mac Ufeature-mac

Ufeature 2 Ufeature 2

Ufeature 3 Ufeature 3

๐Ÿ“‹ Table of Contents #

โœจ Features #

  • ๐ŸŽจ Customizable styling with FeatureTourTheme
  • ๐Ÿ”ฆ Multiple highlight shapes (circle, rectangle, custom path)
  • ๐Ÿ“Š Analytics integration
  • ๐Ÿ–ผ๏ธ Interactive elements within tour steps
  • ๐ŸŽญ Smooth animations and transitions
  • ๐Ÿ’พ Persistence and state management
  • โ™ฟ Accessibility features
  • ๐Ÿงช Testing utilities

๐Ÿ“ฅ Installation #

Add the following to your pubspec.yaml file:

dependencies:
  flutter_feature_tour: ^1.0.0
copied to clipboard

Then run:

flutter pub get
copied to clipboard

๐Ÿš€ Usage #

Basic Setup #

  1. Import the package:
import 'package:flutter_feature_tour/flutter_feature_tour.dart';
copied to clipboard
  1. Create an instance of OnboardingService:
final OnboardingService _onboardingService = OnboardingService();
copied to clipboard
  1. Set up your feature highlights:
void _setupOnboarding() {
  _onboardingService.addFeatureHighlightStep([
    FeatureHighlight(
      targetKey: _searchKey,
      title: 'Search',
      description: 'Quickly find what you need using our powerful search feature.',
      icon: Icons.search,
      shape: HighlightShape.circle,
    ),
  ]);

  _onboardingService.addFeatureHighlightStep([
    FeatureHighlight(
      targetKey: _profileKey,
      title: 'Profile',
      description: 'View and edit your profile information here.',
      icon: Icons.person,
      shape: HighlightShape.rectangle,
    ),
  ]);
}
copied to clipboard
  1. Start the onboarding process:
_onboardingService.startOnboarding(context);
copied to clipboard

๐ŸŽจ Customization #

Customize the appearance of your feature tour using FeatureTourTheme:

_onboardingService.setTheme(FeatureTourTheme(
  overlayColor: Colors.black87,
  highlightColor: Colors.amber,
  cardColor: Colors.grey[900]!,
  textColor: Colors.white,
  primaryColor: Colors.amber,
  titleStyle: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
  bodyStyle: const TextStyle(fontSize: 16),
  buttonStyle: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
  cornerRadius: 12.0,
  highlightBorderWidth: 3.0,
));
copied to clipboard

You can also use the theme from your app:

_onboardingService.setTheme(FeatureTourTheme.fromTheme(Theme.of(context)));
copied to clipboard

๐Ÿ“Š Analytics #

Integrate analytics to track user engagement:

_onboardingService.setAnalyticsCallback((String event, Map<String, dynamic> properties) {
  // Implement your analytics tracking here
  print('Analytics Event: $event, Properties: $properties');
});
copied to clipboard

The package tracks the following events:

  • onboarding_started
  • onboarding_restarted
  • step_viewed
  • step_completed
  • onboarding_completed

๐Ÿ–ผ๏ธ Interactive Elements #

Add interactive elements to your tour steps:

_onboardingService.setInteractiveWidgetBuilder((BuildContext context, VoidCallback onComplete) {
  return ElevatedButton(
    child: Text('Try it out!'),
    onPressed: () {
      // Simulate an action
      ScaffoldMessenger.of(context).showSnackBar(
        SnackBar(content: Text('You tried the feature!')),
      );
      onComplete();
    },
  );
});
copied to clipboard

๐ŸŽญ Animations and Transitions #

The package includes smooth animations for the overlay appearance and highlight transitions. These are handled automatically by the FeatureHighlightOverlay widget.

๐Ÿ’พ Persistence #

The onboarding progress is automatically saved using Hive. To check if onboarding is completed:

bool onboardingCompleted = await _onboardingService.isOnboardingCompleted();
copied to clipboard

To restart the onboarding process:

_onboardingService.restartOnboarding(context);
copied to clipboard

โ™ฟ Accessibility #

The package includes basic accessibility features:

  • Semantic labels for the overlay and buttons
  • Keyboard navigation support (Tab, Shift+Tab, Enter, Space)

๐Ÿงช Testing #

To facilitate testing, you can use the following methods:

testWidgets('Feature tour test', (WidgetTester tester) async {
  await tester.pumpWidget(MyApp());
  
  // Start onboarding
  await tester.tap(find.byType(StartOnboardingButton));
  await tester.pumpAndSettle();

  expect(find.byType(FeatureHighlightOverlay), findsOneWidget);
  expect(find.text('Search'), findsOneWidget);

  // Tap next button
  await tester.tap(find.text('Next'));
  await tester.pumpAndSettle();

  expect(find.text('Profile'), findsOneWidget);
});
copied to clipboard

๐Ÿšง Features in Development #

The following features are currently in development:

  • ๐Ÿ”„ Advanced Navigation: Custom navigation paths and conditional steps
  • ๐ŸŒ Localization: Built-in support for easy localization of tour content
  • ๐ŸŽฏ Multiple Simultaneous Highlights: Ability to highlight multiple elements at once

๐Ÿค Contributing #

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“„ License #

This project is licensed under the MIT License - see the LICENSE file for details.## Demo

Below are demonstrations of the Feature Tour in action:

4
likes
150
points
34
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.29 - 2025.04.13

A powerful and customizable feature tour package for Flutter applications.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, iconsax, plugin_platform_interface, shared_preferences, web

More

Packages that depend on flutter_feature_tour