Git Product home page Git Product logo

app_intro's Introduction

App Intro

A light weight package that helps developers easily provide few introduction screens and describe about their app

Get the library | Example

  LinkedIn   Follow   Fork   Star   Watches

Get the library   Example

Supported Dart Versions

Dart SDK version >= 2.1.0

Demo

Demo

Usage

Import the package to your dart file

import 'package:app_intro/app_intro.dart';

Get ready with the stuff

Collect titles, description and relevant images for slides. Create a list of slides and pass it as a parameter *Note: Image path must be local

List<Slide> slides= [
    new Slide('Title-1','Description-1','image-1-path'),
    new Slide('Title-2','Description-2','image-2-path'),
    new Slide('Title-3','Description-3','image-3-path'),
    new Slide('Title-4','Description-4','image-4-path'),
    ...
  ];

The user is provided with two buttons

  • Terms and Conditions
  • General Button(You must provide what text should be shown there)

Create a terms and conditions page for your app and you can navigate to TnC page when the user clicks on the Terms and Conditions button. Also when these intro slides are finished, user clicks on Gerneral button, write the code what you need to do at then as below.

VoidCallback onTermsAndConditionsButtonClick = (){
// Write your code
// Ex: Navigating to Terms and Conditions Screen
}

VoidCallback onGeneralButtonClick = (){
// Write your code
// Ex: Navigating to home screen
}

Name the button

You should specify the name or text that should be shown on the button

String button_text = 'Login with OTP';

Create an instance of SingleButtonIntro

Create an instance for SingleButtonIntro and pass the variables you just created. *Note: No optional parameters here

SingleButtonIntro app_intro = new SingleButtonIntro(
                                    slides,
                                    onTermsAndConditionsButtonClick,
                                    button_text,
                                    onGeneralButtonClick
                                    );

Attatch app_intro to root

The final step is to place the app_intro object in the body of your screen

void main(){
    runApp(
        MaterialApp(
          title: 'Intro Screens',
          home:_appIntro,
        )
  );
}

app_intro's People

Contributors

fayaz07 avatar imgbotapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

app_intro's Issues

Error when i do Package Get

Hello !

Thanks for this wonderful package... but i have an error when i do Packages Get...

IU have the lastest Flutter version.

Here my pubspec.yaml :

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  scoped_model: ^1.0.1
  http: ^0.12.0+2
  app_intro: ^1.0.2

And when i click to get package et have this error :

Could not un-tar (exit code 2). Error:

7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Processing archive: C:\Users\pascal.IT-PC\AppData\Local\Temp\pub_e1b64441-86f8-11e9-9c4e-d8cb8a71a093\data.tar
...... etc.....

What should i do ? Is it an error in the package ?

Thanks a lot for your reply :)

HAve a great day !

Pascal

Run into an error

The page property cannot be read when multiple PageViews are attached to the same PageController.

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.