app_intro 1.0.2

App Intro #

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

Get the library | Example

Demo #

ProgressDialog 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,
        )
  );
}

1.0.2 Maintainance release #

1.0.1 Fixed few bugs #

1.0.0 Initial Release #

example/README.md

Complete example #

import 'package:flutter/material.dart';
import 'package:app_intro/app_intro.dart';

void main(){

  List<Slide> _slides= [
    new Slide(
    'Flutter',
    'Flutter is an open-source mobile application development SDK created by Google. It is used to develop applications for Android and iOS, as well as being the primary method of creating applications for Google Fuchsia.',
    'assets/icons/flutter_icon.png'),

    new Slide(
    'Android',
    'Android is a mobile operating system developed by Google. It is based on a modified version of the Linux kernel and other open source software, and is designed primarily for touchscreen mobile devices such as smartphones and tablets.',
    'assets/icons/android.png'),

    new Slide(
    'Apple',
    'Apple Inc. is an American multinational technology company headquartered in Cupertino, California, that designs, develops, and sells consumer electronics, computer software, and online services. It is considered one of the Big Four of technology along with Amazon, Google and Facebook.',
    'assets/icons/apple.png')

  ];

  String button_text = "Login with OTP";
  VoidCallback _onTnCButtonClick = (){
                                print('Terms and conditions page');
                            };

  VoidCallback _onButtonClick = (){
                                print('Login with OTP');
                            };

  SingleButtonIntro _appIntro = new SingleButtonIntro(
                                _slides,
                                _onTnCButtonClick,
                                button_text,
                                _onButtonClick);

  runApp(
    MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Intro Screens',
      home: _appIntro,
    )
  );
}

Demo #

ProgressDialog Demo

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  app_intro: ^1.0.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:app_intro/app_intro.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
61
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
81
Learn more about scoring.

We analyzed this package on Jul 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/app_intro.dart. (-0.50 points)

Analysis of lib/app_intro.dart reported 1 hint:

line 180 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: Slide._height, Slide.title, Slide.description, Slide.icon

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test

Admin