[SYNC]
This commit is contained in:
@@ -28,6 +28,7 @@ class FormGroupWrapper extends StatefulWidget {
|
||||
final Widget Function(List<Widget> children, String Function() addItem, void Function(int) removeItem) groupBuilder;
|
||||
final Widget Function(int index, String composedID, VoidCallback removeItem) itemBuilder;
|
||||
final int startLength;
|
||||
final bool isSubGroup;
|
||||
//!SECTION
|
||||
//
|
||||
const FormGroupWrapper({
|
||||
@@ -36,6 +37,7 @@ class FormGroupWrapper extends StatefulWidget {
|
||||
required this.groupID,
|
||||
required this.groupBuilder,
|
||||
required this.itemBuilder,
|
||||
this.isSubGroup = false,
|
||||
this.startLength = 0,
|
||||
});
|
||||
|
||||
@@ -66,7 +68,7 @@ class _FormGroupWrapperState extends State<FormGroupWrapper> {
|
||||
//s1 --State
|
||||
//
|
||||
//s1 --Controllers & Listeners
|
||||
instances = widget.formController.getFormGroupValue(widget.groupID)!.instances;
|
||||
instances = widget.formController.getFormGroupValue(widget.groupID, isSubGroup: widget.isSubGroup)!.instances;
|
||||
//s1 --Controllers & Listeners
|
||||
//
|
||||
//s1 --Late & Async Initializers
|
||||
@@ -74,20 +76,6 @@ class _FormGroupWrapperState extends State<FormGroupWrapper> {
|
||||
//!SECTION
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
//
|
||||
//SECTION - State Variables initializations & Listeners
|
||||
//s1 --State
|
||||
//s1 --State
|
||||
//
|
||||
//s1 --Controllers & Listeners
|
||||
//s1 --Controllers & Listeners
|
||||
//
|
||||
//!SECTION
|
||||
}
|
||||
|
||||
//SECTION - Dumb Widgets
|
||||
//!SECTION
|
||||
|
||||
@@ -117,8 +105,8 @@ class _FormGroupWrapperState extends State<FormGroupWrapper> {
|
||||
() {
|
||||
String id = '';
|
||||
setState(() {
|
||||
id = widget.formController.addInstanceToFormGroup(widget.groupID);
|
||||
instances = widget.formController.getFormGroupValue(widget.groupID)!.instances;
|
||||
id = widget.formController.addInstanceToFormGroup(widget.groupID,isSubGroup: widget.isSubGroup);
|
||||
instances = widget.formController.getFormGroupValue(widget.groupID,isSubGroup: widget.isSubGroup)!.instances;
|
||||
});
|
||||
return id;
|
||||
},
|
||||
@@ -130,8 +118,8 @@ class _FormGroupWrapperState extends State<FormGroupWrapper> {
|
||||
|
||||
void _removeItem(int i) {
|
||||
setState(() {
|
||||
widget.formController.removeInstanceFromFormGroup(widget.groupID, i);
|
||||
instances = widget.formController.getFormGroupValue(widget.groupID)!.instances;
|
||||
widget.formController.removeInstanceFromFormGroup(widget.groupID, i,isSubGroup: widget.isSubGroup);
|
||||
instances = widget.formController.getFormGroupValue(widget.groupID,isSubGroup: widget.isSubGroup)!.instances;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user