GithubHelp home page GithubHelp logo

weblineindia / flutter-intro-screens Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 8.27 MB

A Flutter based Reusable Intro Screens component that provides Application Startup Screens with configurable items which can be used in any Flutter application.

Home Page: https://www.weblineindia.com/software-development-resources.html

License: MIT License

Kotlin 4.17% Swift 4.02% Objective-C 0.37% Dart 91.44%
startup-screen flutter flutter-demo flutter-components flutter-examples flutter-plugin reusable-components flutter-library flutter-startup-screen flutter-intro-screen intro-screen intro-slider introduction-screen app-startup-screen app-onboarding onboarding-screen application-startup

flutter-intro-screens's Introduction

Flutter - Intro Screens

A Flutter based Reusable Intro Screens component that provides Application Startup Screens with configurable items which can be used in any Flutter application.

Table of contents

Flutter Support

Version - Flutter 1.17 (stable)

We have tested our program in above version, however you can use it in other versions as well.

Demo


Features

  • Introduction Screens handled with navigation using stateless widget.
  • Introduction Screens with less code of implementation and configurable UI options.

Getting started

  • Download this sample project and import app_startup_ui_widget.dart Widget file in your Flutter App.
  • Update images based on your requirements.

Usage

Setup process is described below to integrate in project.

Configure Intro Screens View in your widget by following below method steps

Methods

Step 1.Add 'provider' package to pubspec.yaml

Step 2. Add MultiProvider in Your application widget like below and provider StartupScreenNavigationProvider in providers list.

// Put BottomNavigatorProvider as mention below
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final MaterialColor colorCustom = MaterialColor(0xFFFACA58, color);
    return MultiProvider(
      providers: [
        ChangeNotifierProvider.value(
          value: StartupScreenNavigationProvider(),
        )
      ],
      child: MaterialApp(
        title: 'Flutter Demo',
        home: ...,
      ),
    );
  }
}

Step 3. User following StartUpScreen constructor for adding Intro Screen as user landing screen.

     List<PageItem> arrPageItems = [];
     Color pageIndicatorColor;
     Color pageIndicatorSelectedColor;
     Color buttonsColor;
     Color buttonsTextColor;
     Function(BuildContext, int) nextPageCallback;
     Function(BuildContext) skipScreenCallback;
     

     // ignore: sort_constructors_first
     StartUpScreen(
         {this.arrPageItems,
         this.pageIndicatorColor,
         this.pageIndicatorSelectedColor,
         this.buttonsColor,
         this.buttonsTextColor,
         this.skipScreenCallback,
         this.nextPageCallback});

Step 4. Pass PageItems to StartUpScreen widget.

  this.arrPageItems = [] // Pass PageItem in StartUpScreen widget for displaying and Use 'PageItem' helper class to create PageItems 

 //Use our helper class to create pageItems for StartUpScreen
 class PageItem {
   String imgPath;
   // ignore: sort_constructors_first
   PageItem({this.imgPath});
 }

Step 5.if you want to set various colors to StartUpScreen you can configure as below.

this.pageIndicatorColor // To set page indicators unselected color
this.pageIndicatorSelectedColor // To set page indicators selected color
this.buttonsColor // To set buttons color in StartUpScreen Widget
this.buttonsTextColor // To set buttons text color in StartUpScreen Widget

Step 6.if you want to Handle callbacks of StartUpScreen.

// Use below parameter of StartUpScreen widget for handle skip button callback
skipScreenCallback: (BuildContext context) {
  Navigator.pushReplacement(
      context, MaterialPageRoute(builder: (context) => YOUR_SCREEN()));
} 

// Use below parameter of StartUpScreen widget for handle next and last page callback of StartUpScreen 
nextPageCallback: (BuildContext context, int page) {
  if (page == arrItems.length - 1) {
    Navigator.pushReplacement(context,
        MaterialPageRoute(builder: (context) => YOUR_SCREEN()));
   }
   else {...}
}

Step 7. Adding StartUpScreen in your main app widget

MaterialApp(
  title: 'Flutter Demo',
  debugShowCheckedModeBanner: false,
  theme: ThemeData(
    primarySwatch: colorCustom,
  ),
  home: StartUpScreen(
    arrPageItems: arrItems,
    pageIndicatorColor: Colors.grey,
    pageIndicatorSelectedColor: colorCustom,
    buttonsColor: colorCustom,
    buttonsTextColor: Colors.white,
    skipScreenCallback: (BuildContext context) {
      Navigator.pushReplacement(
          context, MaterialPageRoute(builder: (context) => YOUR_SCREEN()));
    },
    nextPageCallback: (BuildContext context, int page) {
      if (page == arrItems.length - 1) {
        Navigator.pushReplacement(context,
            MaterialPageRoute(builder: (context) => YOUR_SCREEN()));
      }
    },
  ),
)

Want to Contribute?

  • Created something awesome, made this code better, added some functionality, or whatever (this is the hardest part).
  • Fork it.
  • Create new branch to contribute your changes.
  • Commit all your changes to your branch.
  • Submit a pull request.

Need Help?

If you need help then feel free to contact our Flutter developers.


Collection of Components

We have built many other components and free resources for software development in various programming languages. Kindly click here to view our Free Resources for Software Development.


Changelog

Detailed changes for each release are documented in CHANGELOG.

License

MIT

Keywords

Flutter-Intro-screens, Introduction-screens, App-startup-screen, App-onboarding-screen

flutter-intro-screens's People

Contributors

partners-wli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.