☀️ A Flutter package for some material design app intro screens with some cool animations.

Overview


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.2.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 attribute Datatype Description Default Value
pageColor Color? Set color of the page. Null
pageBackground Widget Set a widget as a background of the whole page (pageColor has priority) Null
mainImage Image / Widget Set the main image of the page. If null, then the widget is omitted. -
title Text / Widget Set the title text of the page. If null, then the widget is omitted. -
body Text / Widget Set the body text of the page. If null, then the widget is omitted. -
iconImageAssetPath String? Set the icon image asset path that would be displayed in page bubble. Null
iconColor Color? Set the page bubble icon color. Null
bubbleBackgroundColor Color Set the page bubble background color. Colors.white / Color(0x88FFFFFF)
textStyle TextStyle? Set TextStyle for both title and body title: color: Colors.white , fontSize: 50.0
body: color: Colors.white , fontSize: 24.0
titleTextStyle TextStyle Set TextStyle for title color: Colors.white , fontSize: 50.0
bodyTextStyle TextStyle Set TextStyle for body color: Colors.white , fontSize: 24.0
bubble Widget? Set a custom widget for the inner bubble Null

IntroViewFlutter Class

Dart attribute Datatype Description Default Value
pages List<PageViewModel> Set the pages of the intro screen. (required)
onTapDoneButton VoidCallback? Method executes on tapping done button. Null
onTapBackButton VoidCallback? Method executes on tapping back button. Null
onTapNextButton VoidCallback? Method executes on tapping next button. Null
showSkipButton bool Show the skip button at the bottom of page. true
showBackButton bool Show the Back button at the bottom of page. Overrides showSkipButton starting from the second page false
showNextButton bool Show the Next button at the bottom of page. Overrides doneButtonPersist. false
pageButtonTextSize double Set the button text size. 18.0
pageButtonFontFamily String? Set the font of button text. Null
onTapSkipButton VoidCallback? Method executes on tapping skip button. Null
pageButtonTextStyles TextStyle? Configure TextStyle for skip, done buttons, overrides pageButtonFontFamily, pageButtonsColor, pageButtonTextSize. fontSize: 18.0, color: Colors.white
skipText Text / Widget Override Skip Button Text and styles. Text('SKIP')
doneText Text / Widget Override Done Button Text and styles. Text('DONE')
backText Text / Widget Override Back Button Text and styles. Text('BACK')
nextText Text / Widget Override Next Button Text and styles. Text('NEXT')
doneButtonPersist bool Show done Button throughout pages false
columnMainAxisAlignment MainAxisAlignment Control [MainAxisAlignment] for column MainAxisAlignment.spaceAround
fullTransition double Adjust scroll distance for full transition 300.0
background Color? Set the background color to Colors.transparent if you have your own background image below Null

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

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

💻

zognotadog

💻

Jayson

🐛

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

License

IntroViews-Flutter is licensed under MIT license.

Comments
  • I added a pageBackground to be able to use a widget and not just a color (pageColor) as a background

    I added a pageBackground to be able to use a widget and not just a color (pageColor) as a background

    I added a pageBackground to be able to use a widget and not just a color (pageColor) as a background. I updated the readme but I not sure about the version update. This addresses #62

    enhancement 
    opened by ride4sun 9
  •  No named parameter with the name 'resizeT oAvoidBottomPadding'.

    No named parameter with the name 'resizeT oAvoidBottomPadding'.

    Flutter version 2 with intro_views_flutter Hello After I update Flutter SDK to version 2 I get this error in intro_views_flutter plugin Error: No named parameter with the name 'resizeToAvoidBottomPadding'.

    pubspec.yaml intro_views_flutter: ^2.8.2

    Console

    C:\Users\wael1\AndroidStudioProjects\stem_cells>flutter build apk

    Building without sound null safety For more information see https://dart.dev/null-safety/unsound-null-safety

    /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/intro_views_flutter-2.8.2/lib/intro_views_flutter.dart:237:7: Error: No named parameter with the name 'resizeT oAvoidBottomPadding'. resizeToAvoidBottomPadding: false, ^^^^^^^^^^^^^^^^^^^^^^^^^^ /C:/src/flutter/packages/flutter/lib/src/material/scaffold.dart:1451:9: Context: Found this candidate, but the arguments don't match. const Scaffold({ ^^^^^^^^

    FAILURE: Build failed with an exception.

    • Where: Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 991

    • What went wrong: Execution failed for task ':app:compileFlutterBuildRelease'.

    Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    • Get more help at https://help.gradle.org

    BUILD FAILED in 14m 9s Running Gradle task 'assembleRelease'... Running Gradle task 'assembleRelease'... Done 851.7s Gradle task assembleRelease failed with exit code 1

    opened by wh120 8
  • Improved page indicator and added new gestures for navigation between pages

    Improved page indicator and added new gestures for navigation between pages

    Hi 👋 ,

    there are rather big PR - that we improved different things: UI elements now look cleaner, added arrows so users not get confused that they need to swipe, move to the next page on swipe, more, allow to specify percentPerMilisecon, fix overlaps on dots at the bottom of the screen, move buttons to the top.

    Please take a look - maybe it will be useful to merge those changes.

    enhancement 
    opened by solid-software 8
  • Add SafeArea to align title below display cutouts

    Add SafeArea to align title below display cutouts

    When used on devices with display cutouts the title is placed to high on the screen. This PR adds a SafeArea and adjusts flexible layouts to align title in accordance with display cutouts.

    opened by kengu 7
  • refactor(example): dispose the previous route of the navigator on tap Done

    refactor(example): dispose the previous route of the navigator on tap Done

    Stops users from being able to slide across the screen (from the left edge) to go back to intro views from the HomePage.

    May be worth mentioning in the documentation or have commented it in the example.

    needs publishing 
    opened by zognotadog 6
  • ci: run Firebase preview workflow only on the upstream repo branches

    ci: run Firebase preview workflow only on the upstream repo branches

    Runs Firebase preview CI workflow only on the upstream repository branches so we don't get failing checks, which might be confusing.

    Test PR from my forked repo #100.

    opened by mzdm 5
  • replaced voidcallback with fuction

    replaced voidcallback with fuction

    Pull Request Process

    1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
    2. Update the README.md if needed with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
    3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is SemVer.
    4. You may merge the Pull Request in once you have the sign-off of one developer, or if you do not have permission to do that, you may request the second reviewer to merge it for you.
    opened by RKKgithub 5
  • Allow title TextStyle and body TextStyle to be changed individually

    Allow title TextStyle and body TextStyle to be changed individually

    This adds two new properties to PageViewModel, titleTextStyle and bodyTextStyle, allowing them to be configured separately. This keeps the textStyle property as well so the API remains compatible with old versions. Have updated the README and example too. Thanks for the amazing library btw, really loving using it! Let me know of any additional steps that need to be done to take this forward.

    opened by sidevesh 5
  • Title Text is Hidden

    Title Text is Hidden

    Describe the bug The title text of the page is sometimes hidden.

    To Reproduce Steps to reproduce the behavior:

    1. Get an SVG from Undraw.co
    2. Display the SVG like so...
    class Intro extends StatelessWidget {
      final pageList = [
        PageViewModel(
          pageColor: const Color(0xFF607D8B),
          iconImageAssetPath: 'assets/baseline_alarm_black_24dp.png',
          //iconColor: null,
          //bubbleBackgroundColor: null,
          body: Text(
            'Testing',
          ),
          title: Text('Scheduling'),
          mainImage: SvgPicture.asset(
            'assets/timemng.svg',
            height: 285.0,
            width: 285.0,
            alignment: Alignment.center,
          ),
        ),
      ];
    
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          body: IntroViewsFlutter(
          pageList,
          onTapDoneButton: (){
            //Void Callback
          },
          showSkipButton: true,
          pageButtonTextStyles: new TextStyle(
              color: Colors.white,
              fontSize: 18.0,
              fontFamily: "Regular",
            ),
        ),
        );
      }
    }
    
    1. The text overlaps.

    Expected behavior The text should be "on top of" the SVG.

    Screenshots Screen Shot 2019-03-21 at 11 39 02 AM

    Smartphone (please complete the following information):

    • Device: [e.g. iPhone6] iPhone XR (Emulator)
    • OS: [e.g. iOS8.1] 12.1

    Additional context N/A

    bug question 
    opened by nikhiljha 5
  • Doesn't fit screen in landscape mode.

    Doesn't fit screen in landscape mode.

    When orientation is switched to landscape mode the flutter overflow black and yellow bar is shown.

    To Reproduce Steps to reproduce the behavior:

    1. Change device orientation to landscape while viewing Intro-Views

    Expected behavior

    It would be preferable if the layout changed to fit title, image and controls.

    good first issue 
    opened by robertonic 5
  • feat: merge dev features

    feat: merge dev features

    3.1.0

    • Added new pageBackground property to the PageViewModel, which sets a widget as a background of the whole page (pageColor has priority over this).
    • Arguments title, body and mainImage are no longer required and can be omitted.
    opened by mzdm 4
  • Flickering when swipe happens with lottie/gif animations on slides

    Flickering when swipe happens with lottie/gif animations on slides

    Hi Ayush,

    Can you fix the problem with Lotties animations please toy can see the glitch in attached video: https://user-images.githubusercontent.com/6507433/168632260-6055c1b7-a543-4027-9682-593d01ccd462.mp4

    Thanks in advance!

    opened by RoyalCoder88 0
  • Active bubble is slightly off-center

    Active bubble is slightly off-center

    @Jayson1999 Please try it now if it works.

    Yes, it's working fine with the bubble layout already. However on vertical view, the bubble layouts are still not entirely centered while translating. On horizontal's case, it's perfectly centered.

    you mean it's not vertically centered with the Text Buttons, or ?

    Active bubble on the screen, the red lines below show the center point.

    Originally posted by @Jayson1999 in https://github.com/aagarwal1012/IntroViews-Flutter/issues/96#issuecomment-859452486

    bug 
    opened by mzdm 0
  • support RTL

    support RTL

    Is your feature request related to a problem? Please describe. in an arabic app i cant swipe in the desired direction

    Describe the solution you'd like the right swipe in an arabic app goes left and vise versa i

    Describe alternatives you've considered i would like to add RTL support for swiping in views

    enhancement 
    opened by mohadel92 0
  • Add animation for click button skip, next, back

    Add animation for click button skip, next, back

    First! Thank for your package. It saves me a lot of time. Hope I can help you with this "Request"

    --> This is my code

    ...
    void animationToPage(int page) {
        nextPageIndex = page;
        animatedPageDragger = AnimatedPageDragger(
          slideDirection: activePageIndex > nextPageIndex
              ? SlideDirection.leftToRight
              : SlideDirection.rightToLeft,
          transitionGoal: TransitionGoal.open,
          slidePercent: slidePercent,
          slideUpdateStream: slideUpdateStream,
          vsync: this,
        );
        animatedPageDragger.run();
      }
    ...
    
      void onPressedBack() {
        animationToPage(max(0, activePageIndex - 1));
      }
    
      void onPressedNext() {
        animationToPage(min(widget.pages.length - 1, activePageIndex + 1));
      }
    
      void onPressedSkip() {
        animationToPage(widget.pages.length - 1);
      }
    ...
    
    enhancement 
    opened by j1mmyto9 0
  • Solution for setState not working

    Solution for setState not working

    Hi, I wanted to use this package one week ago but I couldn't because setState doesn't work and reading the package's issues, you wrote that you couldn't find the problem.

    I was doing my own package and faced the same problem. I fixed it by moving the initState logic to build method. The problem is when you use setState in parent, child isn't created again and initState isn't called. If you move that crucial logic to build (or maybe another better place), it will work.

    bug waiting for response 
    opened by matiasfdevecchi 1
Releases(v3.2.0)
  • v3.2.0(Jun 13, 2021)

    3.2.0

    • Fixed overflowing issue with the bubbles. Thanks @Jayson1999
    • Updated app example
    • Updated CI

    3.1.1

    • Updated app example. Thanks @zognotadog

    3.1.0

    • Added new pageBackground property to the PageViewModel, which sets a widget as a background of the whole page (pageColor has priority over this). Thanks @ride4sun
    • Arguments title, body and mainImage are no longer required and can be omitted.

    3.0.0

    Major Updates

    • Migrated to null safety.
    • Breaking Change: Now only a single import is required:
    import 'package:intro_views_flutter/intro_views_flutter.dart';
    

    Other old imports from this package are now invalid and must be removed/replaced with import above in order to solve path errors.

    2.9.0

    • Critical Bug Fix: Replacing deprecated resizeToAvoidBottomPadding.

    2.8.2

    • Minor bug fixes and enhancements.

    2.8.1

    • Minor bug fixes.

    2.8.0

    Bug Fixes

    • Add SafeArea to align title below display cutouts.
    • Prevent multiple rapid clicks to overflow index bounds.

    2.7.0

    Feature Enhancement

    • Allow title TextStyle and body TextStyle to be changed individually.
    • fix: title size for iPhone 5s

    2.6.0

    • Fix problem padding top in title of pageViews.
    • Background property added that can be used to add full screen image to IntroViews.
    Source code(tar.gz)
    Source code(zip)
  • v2.6.0(Apr 2, 2019)

    • Fix problem padding top in the title of pageViews.
    • Background property added that can be used to add the full-screen image to IntroViews.
    • Added Next Button to move to the next screen. Overriding doneButtonPersist.
    • Added Back Button. Overrides showSkipButton starting from the second page.
    Source code(tar.gz)
    Source code(zip)
  • v2.4.0(Nov 21, 2018)

    • Exposed the way to change the distance a user needs to drag for a full transition to occur using fullTransition and its default value is set to 300.0.
    • Added ability to insert a custom widget in the page bubble.
    • Changed title, body, mainImage PageViewModel types to be more dynamic.
    • Removed all new keywords.
    • Exposed columnMainAxisAlignment to change mainAxisAlignment.
    • Updated Readme.
    Source code(tar.gz)
    Source code(zip)
  • v2.2.4(Sep 5, 2018)

Owner
Ayush Agarwal
Building @tournafest ✨
Ayush Agarwal
A flutter package which contains a collection of some cool and beautiful effects; support android and ios

flutter effects A flutter package which contains a collection of some cool and beautiful effects; support android and ios . Screenshot type support ch

大海豚 462 Jan 3, 2023
This flutter package contains a widget called DecodingTextEffect which is having some cool Decode Effects for texts.

This flutter package contains a widget called DecodingTextEffect which is having some cool Decode Effects for texts. Installing 1. Depend on it Add th

Aadarsh Patel 13 Nov 25, 2020
Intro to Flutter - Lewis Capaldi App

Intro to Flutter - Lewis Capaldi App Welcome to the Intro to Flutter event hosted by DSC Texas A&M Today's session will be a simple UI crash course. T

Rohan Kadkol 1 Aug 4, 2021
IntroAnimationSlider - A simple Flutte Animation Introduction for Mobile app easy to implement Using intro Views flutter

introappanimation simple Flutte Animation Introduction for Mobile app easy to im

null 3 Sep 22, 2022
A small splashscreen used as intro for flutter applications easily with a lot of customizations ❤️🥳

Splash Screen A splashscreen package to be used for an intro for any flutter application easily with a lot of customization Currently Supported by awe

DPLYR 283 Dec 30, 2022
A new Flutter dialog with a series of beautiful animations, slide fade rotate size scale rotate3D animations.

flutter_animated_dialog A new Flutter dialog with a series of beautiful animations, slide fade rotate size scale rotate3D animations. Dialog barrier i

null 20 Dec 3, 2022
Create powerful animations in Flutter and use the hero animation for complex animations

Hero Animation - Locations UI - Flutter Create powerful animations in Flutter and use the hero animation for complex animations. ⚡  Social Media  Twit

null 3 Dec 11, 2021
A Flutter package for easily implementing Material Design navigation transitions.

Morpheus A Flutter package for easily implementing Material Design navigation transitions. Examples Parent-child transition You can use MorpheusPageRo

Sander R. D. Larsen 186 Jan 7, 2023
A flutter package which will help you to generate pin code fields with beautiful design and animations

A flutter package which will help you to generate pin code fields with beautiful design and animations. Can be useful for OTP or pin code inputs ?? ??

Adar 550 Dec 23, 2022
Flutter fluid slider - A fluid design slider that works just like the Slider material widget

Fluid Slider for Flutter Inspired by a dribbble by Virgil Pana. A fluid design s

Jay Raj 2 Feb 18, 2022
PaperOnboarding is a material design slider made by @Ramotion

PAPER ONBOARDING Android library Paper Onboarding is a material design UI slider written on Java We specialize in the designing and coding of custom U

Ramotion 2.6k Dec 28, 2022
Cool 3D Drawer Animated With flutter part 2 🔥 🔥

Cool 3D Drawer Animated With flutter part 2 ?? ??

Hmida 12 Nov 22, 2022
A growing collection of cool, elegant, efficient and performance-optimized animation widgets.

im_animations About A growing collection of cool, elegant, efficient and performance-optimized animation widgets. Feedback For any feedback please fil

iMujtaba Nazki 17 Nov 13, 2022
A collection of Screens and attractive UIs built with Flutter ready to be used in your applications. No external libraries are used. Just download, add to your project and use.

Flutter Screens A collection of Login Screens, Buttons, Loaders and Widgets with attractive UIs, built with Flutter, ready to be used in your applicat

Samarth Agarwal 5k Dec 31, 2022
Login and Sign up Screens UI For Flutter

Login and Sign up Screens UI A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to

Mohit rao 6 Nov 21, 2022
Flutter package for creating awesome animations.

?? Simple Animations Simple Animations is a powerful package to create beautiful custom animations in no time. ?? fully tested ?? well documented ?? e

Felix Blaschke 879 Dec 31, 2022
A flutter package that adds support for vector data based animations.

animated_vector Description and inspiration A package that adds support for vector data based animations. The data format is heavily inspired from the

Potato Open Sauce Project 6 Apr 26, 2022
A package to create nice and smooth animations for flutter

animation_director A package to create nice and smooth animations for flutter Introduction A simple package to build beautiful and smooth animations f

null 10 Nov 28, 2022
A Flutter package with a selection of simple yet very customizable set of loading animations.

Flutter Loading Animations A simple yet very customizable set of loading animations for Flutter projects. Installation Add the following to your pubsp

Andre Cytryn 171 Sep 23, 2022