Platform Pub Package Build Status Tests Status Codecov Coverage License: MIT Donate

IntroViews is inspired by Paper Onboarding and developed with love from scratch. Checkout our fully responsive live example app.

Table of contents

Features

  • Easy addition of pages.

  • Circular page reveal.

  • Cool Animations.

  • Animation control, if the user stops sliding in the midway.

  • Skip button, for skipping the app intro.

  • Custom font selection.

  • Material Design.

Getting Started

You should ensure that you add the intro_views_flutter as a dependency in your flutter project.

dependencies:
  intro_views_flutter: '^3.1.0'

You can also reference the git repository directly if you want:

dependencies:
  intro_views_flutter:
    git: git://github.com/aagarwal1012/IntroViews-Flutter

You should then run flutter packages get in your terminal so as to get the package.

Usage

  • IntroViewsFlutter widget require a list of PageViewModel , and some other parameters. Refer the code below to create a PageViewModel page.

    import 'package:intro_views_flutter/intro_views_flutter.dart';
    
    ...
    
    final page = PageViewModel(
        pageColor: const Color(0xFF607D8B),
          iconImageAssetPath: 'assets/taxi-driver.png',
          body: Text(
            'Easy  cab  booking  at  your  doorstep  with  cashless  payment  system',
          ),
          title: Text('Cabs'),
          mainImage: Image.asset(
            'assets/taxi.png',
            height: 285.0,
            width: 285.0,
            alignment: Alignment.center,
          ),
          titleTextStyle: TextStyle(fontFamily: 'MyFont', color: Colors.white),
          bodyTextStyle: TextStyle(fontFamily: 'MyFont', color: Colors.white),
        );
    
  • Now refer the code below to get the IntroViewsFlutter widget.

    final Widget introViews = IntroViewsFlutter(
          page,
          onTapDoneButton: () {
            // Void Callback
          },
          showSkipButton: true,
          pageButtonTextStyles: TextStyle(
              color: Colors.white,
              fontSize: 18.0,
              fontFamily: 'Regular',
            ),
        );
    

    For further usage refer the example available.

    For Landscape preview click the link.

    Note : If you added more than four pages in the list then there might be overlapping between page icons and skip button, so my suggestion is just make the showSkipButton: false.

Documentation

PageViewModel Class

Dart attributeDatatypeDescriptionDefault Value
pageColorColor?Set color of the page.Null
pageBackgroundWidgetSet a widget as a background of the whole page (pageColor has priority)Null
mainImageImage / WidgetSet the main image of the page. If null, then the widget is omitted.Null
titleText / WidgetSet the title text of the page. If null, then the widget is omitted.Null
bodyText / WidgetSet the body text of the page. If null, then the widget is omitted.Null
iconImageAssetPathString?Set the icon image asset path that would be displayed in page bubble.Null
iconColorColor?Set the page bubble icon color.Null
bubbleBackgroundColorColorSet the page bubble background color.Colors.white / Color(0x88FFFFFF)
textStyleTextStyle?Set TextStyle for both title and bodytitle: color: Colors.white , fontSize: 50.0
body: color: Colors.white , fontSize: 24.0
titleTextStyleTextStyleSet TextStyle for titlecolor: Colors.white , fontSize: 50.0
bodyTextStyleTextStyleSet TextStyle for bodycolor: Colors.white , fontSize: 24.0
bubbleWidget?Set a custom widget for the inner bubbleNull

IntroViewFlutter Class

Dart attributeDatatypeDescriptionDefault Value
pagesList<PageViewModel>Set the pages of the intro screen.(required)
onTapDoneButtonVoidCallback?Method executes on tapping done button.Null
onTapBackButtonVoidCallback?Method executes on tapping back button.Null
onTapNextButtonVoidCallback?Method executes on tapping next button.Null
showSkipButtonboolShow the skip button at the bottom of page.true
showBackButtonboolShow the Back button at the bottom of page. Overrides showSkipButton starting from the second pagefalse
showNextButtonboolShow the Next button at the bottom of page. Overrides doneButtonPersist.false
pageButtonTextSizedoubleSet the button text size.18.0
pageButtonFontFamilyString?Set the font of button text.Null
onTapSkipButtonVoidCallback?Method executes on tapping skip button.Null
pageButtonTextStylesTextStyle?Configure TextStyle for skip, done buttons, overrides pageButtonFontFamily, pageButtonsColor, pageButtonTextSize.fontSize: 18.0, color: Colors.white
skipTextText / WidgetOverride Skip Button Text and styles.Text('SKIP')
doneTextText / WidgetOverride Done Button Text and styles.Text('DONE')
backTextText / WidgetOverride Back Button Text and styles.Text('BACK')
nextTextText / WidgetOverride Next Button Text and styles.Text('NEXT')
doneButtonPersistboolShow done Button throughout pagesfalse
columnMainAxisAlignmentMainAxisAlignmentControl MainAxisAlignment for columnMainAxisAlignment.spaceAround
fullTransitiondoubleAdjust scroll distance for full transition300.0
backgroundColor?Set the background color to Colors.transparent if you have your own background image belowNull

For help on editing package code, view the flutter documentation.

Bugs or Requests

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket on GitHub and I'll look into it. Pull request are also welcome.

See Contributing.md.

Donate

If you found this project helpful or you learned something from the source code and want to thank me, consider buying me a cup of :coffee:

Contributors

Thanks goes to these wonderful people (emoji key):


Tal Jacobson

🚧 πŸ“– πŸ“†

marloncepeda

πŸ›

Kravchenko Igor

πŸ›

SiDevesh

πŸ€”

Slawa Pidgorny

πŸ€”

Haider Al-Tahan

πŸ€”

Newerton

πŸ›

Kenneth GulbrandsΓΈy

πŸ› ⚠️

Sahil Kumar

⚠️

Rodrigo Boratto

πŸ›

RKKgithub

πŸ’»

Sudipta Dutta

πŸ›

MatΔ›j Ε½Γ­dek

πŸ› πŸ’» πŸ“¦ 🚧 πŸ€” πŸ“–

ride4sun

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome! See Contributing.md.

License

IntroViews-Flutter is licensed under MIT license.

Libraries

intro_views_flutter