onboarding_package 0.0.4 copy "onboarding_package: ^0.0.4" to clipboard
onboarding_package: ^0.0.4 copied to clipboard

On boarding screen

How to use #

Add as dependencies #


  onboarding_package:
    git:
      url: [email protected]:Hacathon-Projects/on-boarding-package.git  

Make sure your machine SSH key is added to github

Example #

import 'package:flutter/material.dart';
import 'package:onboarding_package/onboarding_package.dart'; // Import the package

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: ChangeNotifierProvider(
        create: (_) => OnboardingProvider(),
        child: OnBoardingScreen(
          pages: [
            {
              'title': "Stay on Target",
              'buttonText': "Next",
              "image": Image.asset('assets/onboarding1.png'), // Use your own image
              "description": "Track your daily progress with precision.",
              'skip': true,
            },
            {
              'title': "Join the Community",
              'buttonText': "Next",
              "image": Image.asset('assets/onboarding2.png'), // Use your own image
              "description": "Connect with fellow participants and share your journey.",
              'skip': false,
            },
            {
              'title': "Stay Accountable",
              'buttonText': "Next",
              "image": Image.asset('assets/onboarding3.png'), // Use your own image
              "description": "Pair up with an accountability partner to stay motivated.",
              'skip': false,
            },
          ],
          onSkip: () {
            // Handle skip logic
            print("Onboarding skipped");
            // Navigate to the next screen (e.g., login or home)
          },
          onComplete: () {
            // Handle completion logic
            print("Onboarding completed");
            // Navigate to the next screen (e.g., login or home)
          },
          primaryColor: Colors.blue, // Customize the primary color
          skipButtonText: "Skip", // Customize the skip button text
        ),
      ),
    );
  }
}

0
likes
125
points
3
downloads

Publisher

verified publisherrabinacharya.info.np

Weekly Downloads

On boarding screen

Documentation

API reference

License

MIT (license)

Dependencies

flutter, provider

More

Packages that depend on onboarding_package