Skip to content

Develop a flutter module that will read JSON. JSON file will have form fields detail required for the specific form in the app. This JSON could have different form field type data like Input Field, Drop Down, Radio button, Check Box, File Upload etc. It should be able to handle all the predefined standard form field types. It should support mult…

License

Notifications You must be signed in to change notification settings

dexbytes/dynamic_multi_form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic form

A flutter package that render dynamic form with different input field which is manage from API json response. This plugin supports both iOS and Android.

Android iOS
Support SDK 21+ 10.0+

Dynamic form Implementation Guide

Features

Use this plugin in your Flutter app to:

  • To manage dynamic from field from server according to field type.
  • Auto manage field validation according to field type.
  • Easy to manage field decoration by developers.

Getting started

This plugin relies on the flutter core.

Usage

To use the plugin you just need to add dynamic_multi_form: ^1.0.0 into your pubspec.yaml file and run pub get.

Add following into your package's pubspec.yaml (and run an implicit dart pub get):

dynamic_multi_form: ^1.0.0

Example

        Column(
         children: [
        //Get all fields of form
               DynamicFormScreen(jsonString,dynamicFormKey: _formKeyNew, finalSubmitCallBack: (Map<String, dynamic> data) async {
               Navigator.push(
               context,MaterialPageRoute(builder: (context) => SecondScreen(data: data)),);},),
            Align(alignment: Alignment.center,
              child: ElevatedButton(clipBehavior: Clip.hardEdge,
                onPressed: () async {
                  if(_formKeyNew.currentState!.validateFields()){
                 var data =  _formKeyNew.currentState!.getFormData();
                 if(data!.isNotEmpty){
                   Navigator.push(
                     context,
                     MaterialPageRoute(builder: (context) => SecondScreen(data: data)),
                   );
                 }
                 }
                },
                child: const Text('Submit Form'),
                //color: Colors.green,
              ),
            )
          ],
        )

Changelog

All notable changes to this project will be documented in this file.

Issues

To report your issues, submit them directly in the Issues section.

License

this file.

About

Develop a flutter module that will read JSON. JSON file will have form fields detail required for the specific form in the app. This JSON could have different form field type data like Input Field, Drop Down, Radio button, Check Box, File Upload etc. It should be able to handle all the predefined standard form field types. It should support mult…

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages