On-boarding page for flutter applications

Overview

onboarding

This is a sample flutter onboarding plugin you use to attract first-time users when they land on your page, hence the name onboarding. You can implement this widget anyhow you want in your app, by managing its top-level state to show the widget to users at the appropriate time. There are also many parameters that enable you to design this widget to your liking.

Environment

sdk: ">=2.12.0 <3.0.0" flutter: ">=1.17.0"

Getting Started

To start using this widget, you will need to first import the package inside your project following the installation guide found on peb.dev/packages/onboarding.

  dependencies:
    onboarding: ^2.1.0

$ flutter pub get

Usage

To use this widget,

  1. import 'package:onboarding/onboarding.dart'; inside your dart file
  2. Follow the example found at the main.dart of the example and implement it in your app.

Example

    class MyApp extends StatelessWidget {
      final onboardingPagesList = [
          PageModel(
            widget: Column(
              children: [
                Container(
                    padding: EdgeInsets.only(bottom: 45.0),
                    child: Image.asset('assets/images/facebook.png',
                        color: pageImageColor)),
                Container(
                    width: double.infinity,
                    child: Text('SECURED BACKUP', style: pageTitleStyle)),
                Container(
                  width: double.infinity,
                  child: Text(
                    'Keep your files in closed safe so you can\'t lose them',
                    style: pageInfoStyle,
                  ),
                ),
              ],
            ),
          ),
          PageModel(
            widget: Column(
              children: [
                Image.asset('assets/images/twitter.png', color: pageImageColor),
                Text('CHANGE AND RISE', style: pageTitleStyle),
                Text(
                  'Give others access to any file or folder you choose',
                  style: pageInfoStyle,
                )
              ],
            ),
          ),
          PageModel(
            widget: Column(
              children: [
                Image.asset('assets/images/instagram.png', color: pageImageColor),
                Text('EASY ACCESS', style: pageTitleStyle),
                Text(
                  'Reach your files anytime from any devices anywhere',
                  style: pageInfoStyle,
                ),
              ],
            ),
          ),
      ];
      
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          debugShowCheckedModeBanner: false,
          title: 'Flutter Demo',
          theme: ThemeData(
            primarySwatch: Colors.blue,
            visualDensity: VisualDensity.adaptivePlatformDensity,
          ),
          home: Onboarding(
            proceedButtonStyle: ProceedButtonStyle(
                proceedButtonRoute: (context) {
                  return Navigator.pushAndRemoveUntil(
                    context,
                    MaterialPageRoute(
                      builder: (context) => Container(),
                    ),
                    (route) => false,
                  );
                },
            ),
            isSkippable = true,
            pages: onboardingPagesList,
            indicator: Indicator(
              indicatorDesign: IndicatorDesign.line(
                lineDesign: LineDesign(
                  lineType: DesignType.line_uniform,
                ),
              ),
            ),
            //-------------Other properties--------------
            //Color background,
            //EdgeInsets pagesContentPadding
            //EdgeInsets titleAndInfoPadding
            //EdgeInsets footerPadding
            //SkipButtonStyle skipButtonStyle
          ),
        );
      }
    }
    

Display

Sample examples of using different indicator types

    Onboarding(
        proceedButtonStyle: ProceedButtonStyle(
            proceedButtonRoute: (context) {
              return Navigator.pushAndRemoveUntil(
                context,
                MaterialPageRoute(
                  builder: (context) => Container(),
                ),
                (route) => false,
              );
            }),
        pages: onboardingPagesList,
        isSkippable = true,
        indicator: Indicator(
          indicatorDesign: IndicatorDesign.line(
            lineDesign: LineDesign(
              lineType: DesignType.line_uniform,
            ),
          ),
        ),
      )

    Onboarding(
        proceedButtonStyle: ProceedButtonStyle(
            proceedButtonRoute: (context) {
              return Navigator.pushAndRemoveUntil(
                context,
                MaterialPageRoute(
                  builder: (context) => Container(),
                ),
                (route) => false,
              );
            }),
        pages: onboardingPagesList,
        isSkippable = true,
        indicator: Indicator(
          indicatorDesign: IndicatorDesign.line(
            lineDesign: LineDesign(
              lineType: DesignType.line_nonuniform,
            ),
          ),
        ),
      )

    Onboarding(
        proceedButtonStyle: ProceedButtonStyle(
            proceedButtonRoute: (context) {
              return Navigator.pushAndRemoveUntil(
                context,
                MaterialPageRoute(
                  builder: (context) => Container(),
                ),
                (route) => false,
              );
            }),
        pages: onboardingPagesList,
        isSkippable = true,
        indicator: Indicator(
          indicatorDesign: IndicatorDesign.polygon(
            polygonDesign: PolygonDesign(
              polygon: DesignType.polygon_arrow,
            ),
          ),
        ),
      )

    Onboarding(
        proceedButtonStyle: ProceedButtonStyle(
            proceedButtonRoute: (context) {
              return Navigator.pushAndRemoveUntil(
                context,
                MaterialPageRoute(
                  builder: (context) => Container(),
                ),
                (route) => false,
              );
            }),
        pages: onboardingPagesList,
        isSkippable = true,
        indicator: Indicator(
          indicatorDesign: IndicatorDesign.polygon(
            polygonDesign: PolygonDesign(
              polygon: DesignType.polygon_circle,
            ),
          ),
        ),
      )

    Onboarding(
        proceedButtonStyle: ProceedButtonStyle(
            proceedButtonRoute: (context) {
              return Navigator.pushAndRemoveUntil(
                context,
                MaterialPageRoute(
                  builder: (context) => Container(),
                ),
                (route) => false,
              );
            }),
        pages: onboardingPagesList,
        isSkippable = true,
        indicator: Indicator(
          indicatorDesign: IndicatorDesign.polygon(
            polygonDesign: PolygonDesign(
              polygon: DesignType.polygon_diamond,
            ),
          ),
        ),
      )

    Onboarding(
        proceedButtonStyle: ProceedButtonStyle(
            proceedButtonRoute: (context) {
              return Navigator.pushAndRemoveUntil(
                context,
                MaterialPageRoute(
                  builder: (context) => Container(),
                ),
                (route) => false,
              );
            }),
        pages: onboardingPagesList,
        isSkippable = true,
        indicator: Indicator(
          indicatorDesign: IndicatorDesign.polygon(
            polygonDesign: PolygonDesign(
              polygon: DesignType.polygon_pentagon,
            ),
          ),
        ),
      )

    Onboarding(
        proceedButtonStyle: ProceedButtonStyle(
            proceedButtonRoute: (context) {
              return Navigator.pushAndRemoveUntil(
                context,
                MaterialPageRoute(
                  builder: (context) => Container(),
                ),
                (route) => false,
              );
            }),
        pages: onboardingPagesList,
        isSkippable = true,
        indicator: Indicator(
          indicatorDesign: IndicatorDesign.polygon(
            polygonDesign: PolygonDesign(
              polygon: DesignType.polygon_square,
              polygonSpacer: 14.0
            ),
          ),
        ),
      )

Comments
  • Change/customize position of buttons and indicator

    Change/customize position of buttons and indicator

    I'm evaluating this component for my own app. I have a couple of issues and I'm not sure if those points are possible. At first the text length of the sample is fine. However when I localize the text from skip to "Überspringen" the German translation the text is too long and will be displayed in two lines. IMHO the Buttons are a bit too small, but that is a different topic.

    Can I put the indicator above the buttons? I see there no way, is that true?

    There is also no support for a "gatekeeper" page like that you cannot skip or scroll to the next onboarding step without accepting the ToS or similar juristic requirements. In the context it would be great to get the option to change the button text per page in a easy way.

    Last question: How can I customize the colors of the screen? I'm no expert in Flutter so this might be a stupid question, a small sample would be great too.

    opened by rekire 5
  • Changing colors seems to be imposible

    Changing colors seems to be imposible

    I checked the code and it seems that all the colors are hardcoded in a utils class. This is not flexible at all. Please consider to change this behavior. In context of the current version 3.0.0 I do not understand why #4 was closed. This is a legit question where the answer is out of today: This is not possible right now.

    opened by rekire 4
  • Add Toggle Skip Functionality

    Add Toggle Skip Functionality

    Proposed Changes

    • add isSkippable named argument to the Onboarding class
    • use Visibility widget to maintain size when hidden (also hides from Accessibility software appropriately)
    opened by SupposedlySam 2
  • Expose

    Expose "Skip" button text

    Please expose the text for the Skip button the same way the proceedButtonText is exposed.

    Of particular note, the current state makes one button localizable, while the other is not, which makes for subpar user experience.

    opened by zmeggyesi 2
  • Swiping is laggy

    Swiping is laggy

    Is there a way to make the swipe more fluid? right now you have to sipe til the middle of the screen to have a transition. is there a way to make it less? Like just drag a little bit to have a transition to the next page?

    opened by Basha0 1
  • Restyling the Custom Indicator

    Restyling the Custom Indicator

    Is there a way to restyle the custom indicator? Like remove the border and give it a background color while it is not active/visited? It should also be possible to change the border color

    opened by SmilingFarood 1
  • Enable to swipe to next page on large screen

    Enable to swipe to next page on large screen

    Hello,

    Thank you for this package.

    I'm unable to change page on large screen (horizontal large handset, or tablet). Maybe because of the calculation in _onHorizontalDragUpdate

    opened by QuentinSc 1
  • Allow to skip straight to proceed

    Allow to skip straight to proceed

    I'd like to trigger proceed instead of skip when I press a skip button.

    I was thinking of a SkipMode.skip and SkipMode.proceed. I can craft a PR. What do you think?

    Thanks alot for your onboarding 👏

    opened by HugoHeneault 0
  • Add color blend mode parameter

    Add color blend mode parameter

    In short: please expose the colorBlendMode parameter of the image to the PageModel constructor.

    Reasoning: with pagesImageColor defaulting the value it does, and the blend mode in Flutter defaulting to BlendMode.srcIn, the source image is not rendered, only used as a mask. This potentially sets up the developer for a weird situation in which the seemingly-correctly referenced image is not actually displayed because it's fully masked with the page color.

    While setting pagesImageColor to null explicitly is a workaround, I believe there would be other potential aesthetic uses to exposing the blending mode.

    opened by zmeggyesi 0
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
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
An advance flutter UI Kit for developing responsive, cross platform applications.

Liquid Build fast, responsive, cross platform apps with Liquid. Liquid is an open source UI toolkit for developing cross platform apps in Flutter. Qui

StackOrient Pvt. Ltd. 29 Dec 9, 2022
A Flutter Log In Page using Flare Animations

Bear_log_in An example built using JCToon's Flare File as a custom UI component. Bear will follow the cursor as you type or move it around. Overview T

Apurv Jha 14 Oct 19, 2022
Page Transition Animation With Flutter

Page Transition Animation - Day 6 A new Flutter project. Screenshots Getting Started This project is a starting point for a Flutter application. A few

null 0 Oct 27, 2021
Page indicator for flutter, with multiple build-in layouts.

flutter_page_indicators Page indicator for flutter, with multiple build-in layouts. NOTE:This project is forked from flutter_page_indicator, because t

OpenFlutter 12 Jun 29, 2022
A Flutter Login Page UI project

flutter_login_ui A new Flutter Login Page UI project. Getting Started This project is a starting point for a Flutter application. A few resources to g

Jakariya (হাদি) 1 Dec 4, 2021
Mobile app onboarding, Login, Signup page with #flutter.

Welcome page, Login Page and Sign up page - Flutter UI Watch it on YouTube Packages we are using: flutter_svg: link We design 3 screens first one is a

Abu Anwar 1k Jan 6, 2023
Login Page UI Design and Animation For Flutter

Flutter Beautiful Login Page UI Design and Animation - Day 14 class Afgprogramme

Behruz Hurramov 0 Dec 24, 2021
Phone number authentication + OTP login page built with @flutter 😍

The Gorgeous Otp A login page built with flutter inspired by a design found on Uplabs Login Screen OTP Screen Tools This project uses the phone connec

Hugo EXTRAT 179 Nov 22, 2022
Flexible and easy to use page transitions.

flutter_villains What are heroes without villains? (Profile image from: https://unsplash.com/photos/pAs4IM6OGWI) Check out the article. What are villa

Norbert Kozsir 356 Dec 12, 2022
Page Transition package for multiple navigation types

f_page_transition A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to get you st

VAMSI KRISHNA THANIKANTI 1 Oct 29, 2021
🔔 A flutter package to create cool and beautiful text animations. [Flutter Favorite Package]

Animated Text Kit A flutter package which contains a collection of some cool and awesome text animations. Recommended package for text animations in C

Ayush Agarwal 1.4k Jan 6, 2023
This repository demonstrates use of various widgets in flutter and tricks to create beautiful UI elements in flutter for Android and IOS

AwesomeFlutterUI The purpose of this repository is to demonstrate the use of different widgets and tricks in flutter and how to use them in your proje

Subir Chakraborty 132 Nov 13, 2022
This is a Flutter URL preview plugin for Flutter that previews the content of a URL

flutter_link_preview This is a URL preview plugin that previews the content of a URL Language: English | 中文简体 Special feature Use multi-processing to

yung 67 Nov 2, 2022
Flutter liquid swipe - Liquid Swipe Animation Built With Flutter

Flutter Liquid Swipe liquid Swipe animation is amazing and its Created for iOS P

Jahongir Anvarov 6 Dec 1, 2022
A candy sorter game made with Flutter for the march flutter challenge.

A candy sorter game made with Flutter for the march flutter challenge.

Debjeet Das 1 Apr 9, 2022
✨ A collection of loading indicators animated with flutter. Heavily Inspired by http://tobiasahlin.com/spinkit.

✨ Flutter Spinkit A collection of loading indicators animated with flutter. Heavily inspired by @tobiasahlin's SpinKit. ?? Installing dependencies:

Jeremiah Ogbomo 2.7k Dec 30, 2022
A Flutter library for gradually painting SVG path objects on canvas (drawing line animation).

drawing_animation From static SVG assets See more examples in the showcasing app. Dynamically created from Path objects which are animated over time m

null 442 Dec 27, 2022