multi_page_form 1.0.4

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new59

Multi Page Form

This package helps you to create Multi Page Form in fewer liner of code.

Installation

Add multi_page_form: in your pubspec.yaml dependencies.

How to use

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

class Test extends StatefulWidget {
  _TestState createState() => _TestState();
}

class _TestState extends State<Test> {
  @override
  Widget build(BuildContext context) {
    return MultiPageForm(
        totalPage: 3,
        pageList: <Widget>[page1(), page2(), page3()],
        onFormSubmitted: () {
          print("Form is submitted");
        },
    );
  }
   Widget page1() {
      return Container(
        child: ListView(
          children: [
            Container(
              height: 20.0,
              width: 20.0,
              color: Colors.purple,
            ),
            Container(
              height: 20.0,
              width: 20.0,
              color: Colors.blue,
            )
          ],
        ),
      );
    }
  
    Widget page2() {
      return Container(
        child: ListView(
          children: [
            Container(
              height: 200.0,
              width: 200.0,
              color: Colors.yellow,
            )
          ],
        ),
      );
    }
  
    Widget page3() {
      return Container(
        child: ListView(
          children: [
            Container(
              height: 200.0,
              width: 200.0,
              color: Colors.green,
            )
          ],
        ),
      );
    }
}

Example

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

class Test extends StatefulWidget {
  _TestState createState() => _TestState();
}

class _TestState extends State<Test> {
  @override
  Widget build(BuildContext context) {
    return MultiPageForm(
        totalPage: 3,
        pageList: <Widget>[page1(), page2(), page3()],
        onFormSubmitted: () {
          print("Form is submitted");
        },
    );
  }
   Widget page1() {
      return Container(
        child: ListView(
          children: [
            Container(
              height: 20.0,
              width: 20.0,
              color: Colors.purple,
            )
          ],
        ),
      );
    }
  
    Widget page2() {
      return Container(
        child: ListView(
          children: [
            Container(
              height: 200.0,
              width: 200.0,
              color: Colors.yellow,
            )
          ],
        ),
      );
    }
  
    Widget page3() {
      return Container(
        child: ListView(
          children: [
            Container(
              height: 200.0,
              width: 200.0,
              color: Colors.green,
            )
          ],
        ),
      );
    }
}

Params

   PhoneAuthSimple(
   @required totalPage (int) 
   @required pageList (String)
   @required onFormSubmitted (VoidCallBack)
    
    progressIndicatorColor (Color)
  )

Upcoming Update

Working on making it more flexible and easy to use.

[0.0.1] - Release.

  • Added multi page form support.

[0.0.2] - Release.

  • Added documentation

example/main.dart

import 'package:flutter/material.dart';
import '../lib/multi_page_form.dart';

class Test extends StatefulWidget {
  _TestState createState() => _TestState();
}

class _TestState extends State<Test> {
  @override
  Widget build(BuildContext context) {
    return MultiPageForm(
      totalPage: 3,
      pageList: <Widget>[page1(), page2(), page3()],
      onFormSubmitted: () {
        print("Form is submitted");
      },
    );
  }
  Widget page1() {
    return Container(
      child: ListView(
        children: [
          Container(
            height: 20.0,
            width: 20.0,
            color: Colors.purple,
          )
        ],
      ),
    );
  }

  Widget page2() {
    return Container(
      child: ListView(
        children: [
          Container(
            height: 200.0,
            width: 200.0,
            color: Colors.yellow,
          )
        ],
      ),
    );
  }

  Widget page3() {
    return Container(
      child: ListView(
        children: [
          Container(
            height: 200.0,
            width: 200.0,
            color: Colors.green,
          )
        ],
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  multi_page_form: ^1.0.4

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:multi_page_form/multi_page_form.dart';
  
Version Uploaded Documentation Archive
1.0.4 Dec 11, 2018 Go to the documentation of multi_page_form 1.0.4 Download multi_page_form 1.0.4 archive
1.0.3 Dec 11, 2018 Go to the documentation of multi_page_form 1.0.3 Download multi_page_form 1.0.3 archive
1.0.2 Dec 11, 2018 Go to the documentation of multi_page_form 1.0.2 Download multi_page_form 1.0.2 archive
1.0.1 Dec 5, 2018 Go to the documentation of multi_page_form 1.0.1 Download multi_page_form 1.0.1 archive
1.0.0 Dec 5, 2018 Go to the documentation of multi_page_form 1.0.0 Download multi_page_form 1.0.0 archive
0.0.2 Dec 5, 2018 Go to the documentation of multi_page_form 0.0.2 Download multi_page_form 0.0.2 archive
0.0.1 Dec 5, 2018 Go to the documentation of multi_page_form 0.0.1 Download multi_page_form 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
19
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]
59
Learn more about scoring.

We analyzed this package on Dec 11, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

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
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test