json_to_form_with_theme 0.0.1 json_to_form_with_theme: ^0.0.1 copied to clipboard
Simple Json to Form!.
This library aims to help developer get started quickly and create a form made out of json.
Features #
The JsonForm can be updated both from the user interaction but can also be notified from outside (check the example for the stream)
Getting started #
Usage #
to /example
folder.
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Floating Action Button'),
),
body: JsonForm(onValueChange, map: widget.json,
onValueChanged: (String d, dynamic s) {
// Do something with the data
}, theme: const DefaultTheme()),
/*form?.getForm(context),*/
floatingActionButton: FloatingActionButton(
onPressed: () {
counter++;
if (counter % 4 == 1) {
toggle++;
_onUserController.add({}..["1"] = toggle % 2); // toggle
}
if (counter % 4 == 2) {
_onUserController.add({}..["2"] =
"updated" + Random().nextInt(10).toString()); // toggle
}
if (counter % 4 == 3) {
_onUserController.add({}..["3"] =
"editUp" + Random().nextInt(10).toString()); // toggle
}
if (counter % 4 == 0) {
_onUserController.add({}..["4"] = list[toggle % 2]); // toggle
}
},
child: const Icon(Icons.navigation),
backgroundColor: Colors.green,
),
);
Additional information #
contribute to the package, how to file issues, what response they can expect from the package authors, and more.