multi_page_form 1.0.4 copy "multi_page_form: ^1.0.4" to clipboard
multi_page_form: ^1.0.4 copied to clipboard

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

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.

8
likes
25
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

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

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on multi_page_form