diff --git a/packages/generator_tests/test/doc/animated_url_list_output_test.dart b/packages/generator_tests/test/doc/animated_url_list_output_test.dart index a0ff27db..431fd35e 100644 --- a/packages/generator_tests/test/doc/animated_url_list_output_test.dart +++ b/packages/generator_tests/test/doc/animated_url_list_output_test.dart @@ -103,7 +103,7 @@ class ReactiveAnimatedUrlLisOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -112,7 +112,8 @@ class ReactiveAnimatedUrlLisOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static AnimatedUrlLisOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -139,7 +140,7 @@ class ReactiveAnimatedUrlLisOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -160,7 +161,7 @@ class AnimatedUrlLisOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -171,7 +172,8 @@ class AnimatedUrlLisOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -265,7 +267,7 @@ class _AnimatedUrlLisOFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/animated_url_list_test.dart b/packages/generator_tests/test/doc/animated_url_list_test.dart index b5b06e07..9fa6a62a 100644 --- a/packages/generator_tests/test/doc/animated_url_list_test.dart +++ b/packages/generator_tests/test/doc/animated_url_list_test.dart @@ -103,7 +103,7 @@ class ReactiveAnimatedUrlListForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -112,7 +112,8 @@ class ReactiveAnimatedUrlListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static AnimatedUrlListForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -139,7 +140,7 @@ class ReactiveAnimatedUrlListForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -160,7 +161,7 @@ class AnimatedUrlListFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -171,7 +172,8 @@ class AnimatedUrlListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -265,7 +267,7 @@ class _AnimatedUrlListFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/annotateless_output_test.dart b/packages/generator_tests/test/doc/annotateless_output_test.dart index e693dbbd..15f37e5c 100644 --- a/packages/generator_tests/test/doc/annotateless_output_test.dart +++ b/packages/generator_tests/test/doc/annotateless_output_test.dart @@ -94,7 +94,7 @@ class ReactiveAnnotatelessOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -103,7 +103,8 @@ class ReactiveAnnotatelessOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static AnnotatelessOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -130,7 +131,7 @@ class ReactiveAnnotatelessOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -151,7 +152,7 @@ class AnnotatelessOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -162,7 +163,8 @@ class AnnotatelessOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -255,7 +257,7 @@ class _AnnotatelessOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/annotateless_test.dart b/packages/generator_tests/test/doc/annotateless_test.dart index cb1e9426..ec1efbf6 100644 --- a/packages/generator_tests/test/doc/annotateless_test.dart +++ b/packages/generator_tests/test/doc/annotateless_test.dart @@ -91,7 +91,7 @@ class ReactiveAnnotatelessForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -100,7 +100,8 @@ class ReactiveAnnotatelessForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static AnnotatelessForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -127,7 +128,7 @@ class ReactiveAnnotatelessForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -148,7 +149,7 @@ class AnnotatelessFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -159,7 +160,8 @@ class AnnotatelessFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -252,7 +254,7 @@ class _AnnotatelessFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/array_nullable_output_test.dart b/packages/generator_tests/test/doc/array_nullable_output_test.dart index 2fc6ca51..1bb47df1 100644 --- a/packages/generator_tests/test/doc/array_nullable_output_test.dart +++ b/packages/generator_tests/test/doc/array_nullable_output_test.dart @@ -106,7 +106,7 @@ class ReactiveArrayNullableOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -115,7 +115,8 @@ class ReactiveArrayNullableOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static ArrayNullableOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -142,7 +143,7 @@ class ReactiveArrayNullableOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -163,7 +164,7 @@ class ArrayNullableOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -174,7 +175,8 @@ class ArrayNullableOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -267,7 +269,7 @@ class _ArrayNullableOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/array_nullable_test.dart b/packages/generator_tests/test/doc/array_nullable_test.dart index b902db2b..4a0d77cc 100644 --- a/packages/generator_tests/test/doc/array_nullable_test.dart +++ b/packages/generator_tests/test/doc/array_nullable_test.dart @@ -109,7 +109,7 @@ class ReactiveArrayNullableForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -118,7 +118,8 @@ class ReactiveArrayNullableForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static ArrayNullableForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -145,7 +146,7 @@ class ReactiveArrayNullableForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -166,7 +167,7 @@ class ArrayNullableFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -177,7 +178,8 @@ class ArrayNullableFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -270,7 +272,7 @@ class _ArrayNullableFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/create_output_test.dart b/packages/generator_tests/test/doc/create_output_test.dart index fc2ff63e..6344fbce 100644 --- a/packages/generator_tests/test/doc/create_output_test.dart +++ b/packages/generator_tests/test/doc/create_output_test.dart @@ -155,7 +155,7 @@ class ReactiveMSICreateForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -164,7 +164,8 @@ class ReactiveMSICreateForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static MSICreateForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -189,7 +190,7 @@ class ReactiveMSICreateForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -209,7 +210,7 @@ class MSICreateFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -220,7 +221,8 @@ class MSICreateFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -311,7 +313,7 @@ class _MSICreateFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/delivery_list_output_test.dart b/packages/generator_tests/test/doc/delivery_list_output_test.dart index dafd8816..c0e6da54 100644 --- a/packages/generator_tests/test/doc/delivery_list_output_test.dart +++ b/packages/generator_tests/test/doc/delivery_list_output_test.dart @@ -147,7 +147,7 @@ class ReactiveDeliveryListOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -156,7 +156,8 @@ class ReactiveDeliveryListOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static DeliveryListOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -183,7 +184,7 @@ class ReactiveDeliveryListOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -204,7 +205,7 @@ class DeliveryListOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -215,7 +216,8 @@ class DeliveryListOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -308,7 +310,7 @@ class _DeliveryListOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -2596,7 +2598,7 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -2605,7 +2607,8 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static StandaloneDeliveryPointForm? of( BuildContext context, { @@ -2635,7 +2638,7 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -2656,7 +2659,7 @@ class StandaloneDeliveryPointFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -2667,7 +2670,8 @@ class StandaloneDeliveryPointFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -2766,7 +2770,7 @@ class _StandaloneDeliveryPointFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/delivery_list_test.dart b/packages/generator_tests/test/doc/delivery_list_test.dart index 592d3ae0..51bf1fa6 100644 --- a/packages/generator_tests/test/doc/delivery_list_test.dart +++ b/packages/generator_tests/test/doc/delivery_list_test.dart @@ -139,7 +139,7 @@ class ReactiveDeliveryListForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -148,7 +148,8 @@ class ReactiveDeliveryListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static DeliveryListForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -175,7 +176,7 @@ class ReactiveDeliveryListForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -196,7 +197,7 @@ class DeliveryListFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -207,7 +208,8 @@ class DeliveryListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -300,7 +302,7 @@ class _DeliveryListFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -2530,7 +2532,7 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -2539,7 +2541,8 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static StandaloneDeliveryPointForm? of( BuildContext context, { @@ -2569,7 +2572,7 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -2590,7 +2593,7 @@ class StandaloneDeliveryPointFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -2601,7 +2604,8 @@ class StandaloneDeliveryPointFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -2700,7 +2704,7 @@ class _StandaloneDeliveryPointFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/freezed_class_output_test.dart b/packages/generator_tests/test/doc/freezed_class_output_test.dart index 1d738ff2..7603af44 100644 --- a/packages/generator_tests/test/doc/freezed_class_output_test.dart +++ b/packages/generator_tests/test/doc/freezed_class_output_test.dart @@ -107,7 +107,7 @@ class ReactiveFreezedClassOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -116,7 +116,8 @@ class ReactiveFreezedClassOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static FreezedClassOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -143,7 +144,7 @@ class ReactiveFreezedClassOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -164,7 +165,7 @@ class FreezedClassOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -175,7 +176,8 @@ class FreezedClassOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -268,7 +270,7 @@ class _FreezedClassOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/freezed_class_test.dart b/packages/generator_tests/test/doc/freezed_class_test.dart index af7b64bc..44c5986b 100644 --- a/packages/generator_tests/test/doc/freezed_class_test.dart +++ b/packages/generator_tests/test/doc/freezed_class_test.dart @@ -106,7 +106,7 @@ class ReactiveFreezedClassForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -115,7 +115,8 @@ class ReactiveFreezedClassForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static FreezedClassForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -142,7 +143,7 @@ class ReactiveFreezedClassForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -163,7 +164,7 @@ class FreezedClassFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -174,7 +175,8 @@ class FreezedClassFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -267,7 +269,7 @@ class _FreezedClassFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/generic_output_test.dart b/packages/generator_tests/test/doc/generic_output_test.dart index 8a6be633..d3559256 100644 --- a/packages/generator_tests/test/doc/generic_output_test.dart +++ b/packages/generator_tests/test/doc/generic_output_test.dart @@ -86,7 +86,7 @@ class ReactiveTagsOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -95,7 +95,8 @@ class ReactiveTagsOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static TagsOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -120,7 +121,7 @@ class ReactiveTagsOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -140,7 +141,7 @@ class TagsOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -151,7 +152,8 @@ class TagsOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -242,7 +244,7 @@ class _TagsOFormBuilderState extends State> { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/generic_status_list_output_test.dart b/packages/generator_tests/test/doc/generic_status_list_output_test.dart index 052ceb22..d366b262 100644 --- a/packages/generator_tests/test/doc/generic_status_list_output_test.dart +++ b/packages/generator_tests/test/doc/generic_status_list_output_test.dart @@ -87,7 +87,7 @@ class ReactiveStatusListOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -96,7 +96,8 @@ class ReactiveStatusListOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static StatusListOForm? of( BuildContext context, { @@ -126,7 +127,7 @@ class ReactiveStatusListOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -147,7 +148,7 @@ class StatusListOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -158,7 +159,8 @@ class StatusListOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -252,7 +254,7 @@ class _StatusListOFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/generic_status_list_test.dart b/packages/generator_tests/test/doc/generic_status_list_test.dart index a8e83782..79e0f29c 100644 --- a/packages/generator_tests/test/doc/generic_status_list_test.dart +++ b/packages/generator_tests/test/doc/generic_status_list_test.dart @@ -87,7 +87,7 @@ class ReactiveStatusListForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -96,7 +96,8 @@ class ReactiveStatusListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static StatusListForm? of( BuildContext context, { @@ -126,7 +127,7 @@ class ReactiveStatusListForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -147,7 +148,7 @@ class StatusListFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -158,7 +159,8 @@ class StatusListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -252,7 +254,7 @@ class _StatusListFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/generic_test.dart b/packages/generator_tests/test/doc/generic_test.dart index 13d7816c..a81436ed 100644 --- a/packages/generator_tests/test/doc/generic_test.dart +++ b/packages/generator_tests/test/doc/generic_test.dart @@ -86,7 +86,7 @@ class ReactiveTagsForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -95,7 +95,8 @@ class ReactiveTagsForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static TagsForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -120,7 +121,7 @@ class ReactiveTagsForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -139,7 +140,7 @@ class TagsFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -150,7 +151,8 @@ class TagsFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -241,7 +243,7 @@ class _TagsFormBuilderState extends State> { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/group_output_test.dart b/packages/generator_tests/test/doc/group_output_test.dart index 34844d31..c9627dc4 100644 --- a/packages/generator_tests/test/doc/group_output_test.dart +++ b/packages/generator_tests/test/doc/group_output_test.dart @@ -136,7 +136,7 @@ class ReactiveGroupOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -145,7 +145,8 @@ class ReactiveGroupOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static GroupOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -168,7 +169,7 @@ class ReactiveGroupOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -187,7 +188,7 @@ class GroupOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -198,7 +199,8 @@ class GroupOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -285,7 +287,7 @@ class _GroupOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/group_test.dart b/packages/generator_tests/test/doc/group_test.dart index 5befe174..cf5ba5b1 100644 --- a/packages/generator_tests/test/doc/group_test.dart +++ b/packages/generator_tests/test/doc/group_test.dart @@ -133,7 +133,7 @@ class ReactiveGroupForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -142,7 +142,8 @@ class ReactiveGroupForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static GroupForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -165,7 +166,7 @@ class ReactiveGroupForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -184,7 +185,7 @@ class GroupFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -195,7 +196,8 @@ class GroupFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -282,7 +284,7 @@ class _GroupFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/login_extended_nullable_output_test.dart b/packages/generator_tests/test/doc/login_extended_nullable_output_test.dart index 7c46276a..169d9805 100644 --- a/packages/generator_tests/test/doc/login_extended_nullable_output_test.dart +++ b/packages/generator_tests/test/doc/login_extended_nullable_output_test.dart @@ -109,7 +109,7 @@ class ReactiveLoginExtendedNullableOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -118,7 +118,8 @@ class ReactiveLoginExtendedNullableOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static LoginExtendedNullableOForm? of( BuildContext context, { @@ -148,7 +149,7 @@ class ReactiveLoginExtendedNullableOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -169,7 +170,7 @@ class LoginExtendedNullableOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -180,7 +181,8 @@ class LoginExtendedNullableOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -279,7 +281,7 @@ class _LoginExtendedNullableOFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/login_extended_nullable_test.dart b/packages/generator_tests/test/doc/login_extended_nullable_test.dart index 2cf420d1..b8c4ba45 100644 --- a/packages/generator_tests/test/doc/login_extended_nullable_test.dart +++ b/packages/generator_tests/test/doc/login_extended_nullable_test.dart @@ -109,7 +109,7 @@ class ReactiveLoginExtendedNullableForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -118,7 +118,8 @@ class ReactiveLoginExtendedNullableForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static LoginExtendedNullableForm? of( BuildContext context, { @@ -148,7 +149,7 @@ class ReactiveLoginExtendedNullableForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -169,7 +170,7 @@ class LoginExtendedNullableFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -180,7 +181,8 @@ class LoginExtendedNullableFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -279,7 +281,7 @@ class _LoginExtendedNullableFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/login_extended_output_test.dart b/packages/generator_tests/test/doc/login_extended_output_test.dart index 82b132bd..f4adf65f 100644 --- a/packages/generator_tests/test/doc/login_extended_output_test.dart +++ b/packages/generator_tests/test/doc/login_extended_output_test.dart @@ -163,7 +163,7 @@ class ReactiveLoginExtendedOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -172,7 +172,8 @@ class ReactiveLoginExtendedOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static LoginExtendedOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -199,7 +200,7 @@ class ReactiveLoginExtendedOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -220,7 +221,7 @@ class LoginExtendedOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -231,7 +232,8 @@ class LoginExtendedOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -324,7 +326,7 @@ class _LoginExtendedOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/login_extended_test.dart b/packages/generator_tests/test/doc/login_extended_test.dart index 4832a2ef..00492194 100644 --- a/packages/generator_tests/test/doc/login_extended_test.dart +++ b/packages/generator_tests/test/doc/login_extended_test.dart @@ -158,7 +158,7 @@ class ReactiveLoginExtendedForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -167,7 +167,8 @@ class ReactiveLoginExtendedForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static LoginExtendedForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -194,7 +195,7 @@ class ReactiveLoginExtendedForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -215,7 +216,7 @@ class LoginExtendedFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -226,7 +227,8 @@ class LoginExtendedFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -319,7 +321,7 @@ class _LoginExtendedFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/login_output_test.dart b/packages/generator_tests/test/doc/login_output_test.dart index 1e28ca45..1d4348dc 100644 --- a/packages/generator_tests/test/doc/login_output_test.dart +++ b/packages/generator_tests/test/doc/login_output_test.dart @@ -124,7 +124,7 @@ class ReactiveLoginOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -133,7 +133,8 @@ class ReactiveLoginOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static LoginOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -156,7 +157,7 @@ class ReactiveLoginOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -175,7 +176,7 @@ class LoginOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -186,7 +187,8 @@ class LoginOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -273,7 +275,7 @@ class _LoginOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/login_test.dart b/packages/generator_tests/test/doc/login_test.dart index 9261b6b7..eb6e186a 100644 --- a/packages/generator_tests/test/doc/login_test.dart +++ b/packages/generator_tests/test/doc/login_test.dart @@ -108,7 +108,7 @@ class ReactiveLoginForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -117,7 +117,8 @@ class ReactiveLoginForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static LoginForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -140,7 +141,7 @@ class ReactiveLoginForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -159,7 +160,7 @@ class LoginFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -170,7 +171,8 @@ class LoginFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -257,7 +259,7 @@ class _LoginFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/mailing_list_output_test.dart b/packages/generator_tests/test/doc/mailing_list_output_test.dart index b27181e1..0028e0df 100644 --- a/packages/generator_tests/test/doc/mailing_list_output_test.dart +++ b/packages/generator_tests/test/doc/mailing_list_output_test.dart @@ -102,7 +102,7 @@ class ReactiveMailingListOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -111,7 +111,8 @@ class ReactiveMailingListOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static MailingListOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -138,7 +139,7 @@ class ReactiveMailingListOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -159,7 +160,7 @@ class MailingListOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -170,7 +171,8 @@ class MailingListOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -263,7 +265,7 @@ class _MailingListOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/mailing_list_test.dart b/packages/generator_tests/test/doc/mailing_list_test.dart index 9c4b1fd1..104c96d4 100644 --- a/packages/generator_tests/test/doc/mailing_list_test.dart +++ b/packages/generator_tests/test/doc/mailing_list_test.dart @@ -102,7 +102,7 @@ class ReactiveMailingListForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -111,7 +111,8 @@ class ReactiveMailingListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static MailingListForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -138,7 +139,7 @@ class ReactiveMailingListForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -158,7 +159,7 @@ class MailingListFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -169,7 +170,8 @@ class MailingListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -261,7 +263,7 @@ class _MailingListFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/nested_generics_output_test.dart b/packages/generator_tests/test/doc/nested_generics_output_test.dart index 144b90a3..ea4ad20e 100644 --- a/packages/generator_tests/test/doc/nested_generics_output_test.dart +++ b/packages/generator_tests/test/doc/nested_generics_output_test.dart @@ -126,7 +126,7 @@ class ReactiveProductDetailsOForm

required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -135,7 +135,8 @@ class ReactiveProductDetailsOForm

final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static ProductDetailsOForm? of

( BuildContext context, { @@ -165,7 +166,7 @@ class ReactiveProductDetailsOForm

stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -189,7 +190,7 @@ class ProductDetailsOFormBuilder

this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -200,7 +201,8 @@ class ProductDetailsOFormBuilder

final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -297,7 +299,7 @@ class _ProductDetailsOFormBuilderState

child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -1460,7 +1462,7 @@ class ReactiveIdOForm

required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -1469,7 +1471,8 @@ class ReactiveIdOForm

final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static IdOForm? of

( BuildContext context, { @@ -1497,7 +1500,7 @@ class ReactiveIdOForm

stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -1518,7 +1521,7 @@ class IdOFormBuilder

extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -1529,7 +1532,8 @@ class IdOFormBuilder

extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1621,7 +1625,7 @@ class _IdOFormBuilderState

child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/nested_generics_test.dart b/packages/generator_tests/test/doc/nested_generics_test.dart index 94116b23..f79224fe 100644 --- a/packages/generator_tests/test/doc/nested_generics_test.dart +++ b/packages/generator_tests/test/doc/nested_generics_test.dart @@ -126,7 +126,7 @@ class ReactiveProductDetailsForm

required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -135,7 +135,8 @@ class ReactiveProductDetailsForm

final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static ProductDetailsForm? of

( BuildContext context, { @@ -165,7 +166,7 @@ class ReactiveProductDetailsForm

stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -189,7 +190,7 @@ class ProductDetailsFormBuilder

this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -200,7 +201,8 @@ class ProductDetailsFormBuilder

final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -294,7 +296,7 @@ class _ProductDetailsFormBuilderState

child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -1429,7 +1431,7 @@ class ReactiveIdForm

required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -1438,7 +1440,8 @@ class ReactiveIdForm

final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static IdForm? of

( BuildContext context, { @@ -1466,7 +1469,7 @@ class ReactiveIdForm

stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -1487,7 +1490,7 @@ class IdFormBuilder

extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -1498,7 +1501,8 @@ class IdFormBuilder

extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1590,7 +1594,7 @@ class _IdFormBuilderState

child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/nested_output.test.dart b/packages/generator_tests/test/doc/nested_output.test.dart index 27d4fc33..964b0481 100644 --- a/packages/generator_tests/test/doc/nested_output.test.dart +++ b/packages/generator_tests/test/doc/nested_output.test.dart @@ -118,7 +118,7 @@ class ReactiveSubGroupOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -127,7 +127,8 @@ class ReactiveSubGroupOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static SubGroupOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -152,7 +153,7 @@ class ReactiveSubGroupOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -172,7 +173,7 @@ class SubGroupOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -183,7 +184,8 @@ class SubGroupOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -274,7 +276,7 @@ class _SubGroupOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -862,7 +864,7 @@ class ReactiveGroupOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -871,7 +873,8 @@ class ReactiveGroupOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static GroupOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -894,7 +897,7 @@ class ReactiveGroupOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -913,7 +916,7 @@ class GroupOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -924,7 +927,8 @@ class GroupOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1011,7 +1015,7 @@ class _GroupOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -1767,7 +1771,7 @@ class ReactiveNestedOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -1776,7 +1780,8 @@ class ReactiveNestedOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static NestedOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -1801,7 +1806,7 @@ class ReactiveNestedOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -1820,7 +1825,7 @@ class NestedOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -1831,7 +1836,8 @@ class NestedOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1922,7 +1928,7 @@ class _NestedOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/profile_output_test.dart b/packages/generator_tests/test/doc/profile_output_test.dart index a7c85b44..d204d759 100644 --- a/packages/generator_tests/test/doc/profile_output_test.dart +++ b/packages/generator_tests/test/doc/profile_output_test.dart @@ -339,7 +339,7 @@ class ReactiveProfileOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -348,7 +348,8 @@ class ReactiveProfileOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static ProfileOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -373,7 +374,7 @@ class ReactiveProfileOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -393,7 +394,7 @@ class ProfileOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -404,7 +405,8 @@ class ProfileOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -495,7 +497,7 @@ class _ProfileOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/profile_test.dart b/packages/generator_tests/test/doc/profile_test.dart index b42210aa..800db34e 100644 --- a/packages/generator_tests/test/doc/profile_test.dart +++ b/packages/generator_tests/test/doc/profile_test.dart @@ -334,7 +334,7 @@ class ReactiveProfileForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -343,7 +343,8 @@ class ReactiveProfileForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static ProfileForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -368,7 +369,7 @@ class ReactiveProfileForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -387,7 +388,7 @@ class ProfileFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -398,7 +399,8 @@ class ProfileFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -489,7 +491,7 @@ class _ProfileFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/recursive_test.dart b/packages/generator_tests/test/doc/recursive_test.dart index 07eb2209..2a98d8fb 100644 --- a/packages/generator_tests/test/doc/recursive_test.dart +++ b/packages/generator_tests/test/doc/recursive_test.dart @@ -109,7 +109,7 @@ class ReactiveSecuredAreaForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -118,7 +118,8 @@ class ReactiveSecuredAreaForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static SecuredAreaForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -145,7 +146,7 @@ class ReactiveSecuredAreaForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -165,7 +166,7 @@ class SecuredAreaFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -176,7 +177,8 @@ class SecuredAreaFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -268,7 +270,7 @@ class _SecuredAreaFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/renamed_basic_output_test.dart b/packages/generator_tests/test/doc/renamed_basic_output_test.dart index 233296a7..4f3b121a 100644 --- a/packages/generator_tests/test/doc/renamed_basic_output_test.dart +++ b/packages/generator_tests/test/doc/renamed_basic_output_test.dart @@ -99,7 +99,7 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -108,7 +108,8 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static SomeWiredNameForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -135,7 +136,7 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -156,7 +157,7 @@ class SomeWiredNameFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -167,7 +168,8 @@ class SomeWiredNameFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -260,7 +262,7 @@ class _SomeWiredNameFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/renamed_basic_test.dart b/packages/generator_tests/test/doc/renamed_basic_test.dart index ccb04a7a..941e403d 100644 --- a/packages/generator_tests/test/doc/renamed_basic_test.dart +++ b/packages/generator_tests/test/doc/renamed_basic_test.dart @@ -99,7 +99,7 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -108,7 +108,8 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static SomeWiredNameForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -135,7 +136,7 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -156,7 +157,7 @@ class SomeWiredNameFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -167,7 +168,8 @@ class SomeWiredNameFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -260,7 +262,7 @@ class _SomeWiredNameFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/user_profile_output_test.dart b/packages/generator_tests/test/doc/user_profile_output_test.dart index 6e1dfe4a..06c7e282 100644 --- a/packages/generator_tests/test/doc/user_profile_output_test.dart +++ b/packages/generator_tests/test/doc/user_profile_output_test.dart @@ -125,7 +125,7 @@ class ReactiveUserProfileOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -134,7 +134,8 @@ class ReactiveUserProfileOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static UserProfileOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -161,7 +162,7 @@ class ReactiveUserProfileOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -182,7 +183,7 @@ class UserProfileOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -193,7 +194,8 @@ class UserProfileOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -286,7 +288,7 @@ class _UserProfileOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/generator_tests/test/doc/user_profile_test.dart b/packages/generator_tests/test/doc/user_profile_test.dart index 42a9a8e8..b421b513 100644 --- a/packages/generator_tests/test/doc/user_profile_test.dart +++ b/packages/generator_tests/test/doc/user_profile_test.dart @@ -125,7 +125,7 @@ class ReactiveUserProfileForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -134,7 +134,8 @@ class ReactiveUserProfileForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static UserProfileForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -161,7 +162,7 @@ class ReactiveUserProfileForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -181,7 +182,7 @@ class UserProfileFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -192,7 +193,8 @@ class UserProfileFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -284,7 +286,7 @@ class _UserProfileFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_annotations/CHANGELOG.md b/packages/reactive_forms_annotations/CHANGELOG.md index 38600dbe..30df6424 100644 --- a/packages/reactive_forms_annotations/CHANGELOG.md +++ b/packages/reactive_forms_annotations/CHANGELOG.md @@ -1,3 +1,15 @@ +## [8.1.0-beta2] + +* build 4 + +## [8.1.0-beta0] + +* build 3 + +## [8.0.1] + +* bugfix + ## [8.0.0] * Rf18 diff --git a/packages/reactive_forms_annotations/pubspec.yaml b/packages/reactive_forms_annotations/pubspec.yaml index 42fc5e3e..4c9fa644 100644 --- a/packages/reactive_forms_annotations/pubspec.yaml +++ b/packages/reactive_forms_annotations/pubspec.yaml @@ -2,14 +2,14 @@ name: reactive_forms_annotations description: Annotations for reactive_forms_generator repository: https://github.com/artflutter/reactive_forms_generator -version: 7.5.0-beta-1 +version: 8.1.0-beta2 environment: sdk: ">=3.8.0 <4.0.0" resolution: workspace dependencies: - reactive_forms: ^17.0.0 + reactive_forms: ^18.0.0 collection: ^1.18.0 logging: ^1.3.0 flutter: diff --git a/packages/reactive_forms_generator/CHANGELOG.md b/packages/reactive_forms_generator/CHANGELOG.md index 44cd59eb..1990038a 100644 --- a/packages/reactive_forms_generator/CHANGELOG.md +++ b/packages/reactive_forms_generator/CHANGELOG.md @@ -1,3 +1,27 @@ +## [8.1.0-beta2] + +* build 4 + +## [8.1.0-beta0] + +* build 3 + +## [8.0.3] + +* Recursive forms bugfix fix + +## [8.0.1] + +* bugfix + +## [8.0.0] + +* Rf18 + +## [8.0.0-beta0] + +* Rf18 + ## [7.5.0-beta1] * properly handle missing controls in form @@ -48,7 +72,23 @@ ## [7.0.4] -* fixes +* ReactiveFormArrayItemBuilder + +## [7.0.3] + +* fix + +## [7.0.2] + +* fix + +## [7.0.1] + +* array builder improvements + +## [7.0.0] + +* v7 release ## [7.0.0-beta4] diff --git a/packages/reactive_forms_generator/example/lib/docs/animated_url_list/animated_url_list.gform.dart b/packages/reactive_forms_generator/example/lib/docs/animated_url_list/animated_url_list.gform.dart index ca81c12d..20a19807 100644 --- a/packages/reactive_forms_generator/example/lib/docs/animated_url_list/animated_url_list.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/animated_url_list/animated_url_list.gform.dart @@ -53,7 +53,7 @@ class ReactiveAnimatedUrlListForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveAnimatedUrlListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static AnimatedUrlListForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveAnimatedUrlListForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class AnimatedUrlListFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class AnimatedUrlListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -215,7 +217,7 @@ class _AnimatedUrlListFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/animated_url_list/animated_url_list_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/animated_url_list/animated_url_list_output.gform.dart index 200ffa9f..3565e3c6 100644 --- a/packages/reactive_forms_generator/example/lib/docs/animated_url_list/animated_url_list_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/animated_url_list/animated_url_list_output.gform.dart @@ -53,7 +53,7 @@ class ReactiveAnimatedUrlLisOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveAnimatedUrlLisOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static AnimatedUrlLisOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveAnimatedUrlLisOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class AnimatedUrlLisOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class AnimatedUrlLisOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -215,7 +217,7 @@ class _AnimatedUrlLisOFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -1038,7 +1040,6 @@ class UrlEntityOForm implements FormModel { @Rf(output: true) class AnimatedUrlLisOOutput { final List urlList; - AnimatedUrlLisOOutput({@RfArray() required this.urlList}); } @@ -1046,7 +1047,6 @@ class AnimatedUrlLisOOutput { class UrlEntityOOutput { final String label; final String url; - UrlEntityOOutput({ @RfControl(validators: [RequiredValidator()]) required this.label, @RfControl(validators: [RequiredValidator()]) required this.url, diff --git a/packages/reactive_forms_generator/example/lib/docs/annotateless/annotateless.gform.dart b/packages/reactive_forms_generator/example/lib/docs/annotateless/annotateless.gform.dart index 6d3babe7..7987cf08 100644 --- a/packages/reactive_forms_generator/example/lib/docs/annotateless/annotateless.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/annotateless/annotateless.gform.dart @@ -53,7 +53,7 @@ class ReactiveAnnotatelessForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveAnnotatelessForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static AnnotatelessForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveAnnotatelessForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class AnnotatelessFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class AnnotatelessFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _AnnotatelessFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/annotateless/annotateless_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/annotateless/annotateless_output.gform.dart index b7f6707a..58949cb3 100644 --- a/packages/reactive_forms_generator/example/lib/docs/annotateless/annotateless_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/annotateless/annotateless_output.gform.dart @@ -53,7 +53,7 @@ class ReactiveAnnotatelessOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveAnnotatelessOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static AnnotatelessOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveAnnotatelessOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class AnnotatelessOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class AnnotatelessOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _AnnotatelessOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/array_nullable/array_nullable.gform.dart b/packages/reactive_forms_generator/example/lib/docs/array_nullable/array_nullable.gform.dart index 79c4d7fd..c1167bc0 100644 --- a/packages/reactive_forms_generator/example/lib/docs/array_nullable/array_nullable.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/array_nullable/array_nullable.gform.dart @@ -53,7 +53,7 @@ class ReactiveArrayNullableForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveArrayNullableForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static ArrayNullableForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveArrayNullableForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class ArrayNullableFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class ArrayNullableFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _ArrayNullableFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/array_nullable/array_nullable_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/array_nullable/array_nullable_output.gform.dart index 7abb7680..0d8dd611 100644 --- a/packages/reactive_forms_generator/example/lib/docs/array_nullable/array_nullable_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/array_nullable/array_nullable_output.gform.dart @@ -53,7 +53,7 @@ class ReactiveArrayNullableOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveArrayNullableOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static ArrayNullableOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveArrayNullableOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class ArrayNullableOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class ArrayNullableOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _ArrayNullableOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/create/create_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/create/create_output.gform.dart index 194141d9..dbcd0ef6 100644 --- a/packages/reactive_forms_generator/example/lib/docs/create/create_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/create/create_output.gform.dart @@ -53,7 +53,7 @@ class ReactiveMSICreateForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveMSICreateForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static MSICreateForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -87,7 +88,7 @@ class ReactiveMSICreateForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -107,7 +108,7 @@ class MSICreateFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -118,7 +119,8 @@ class MSICreateFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -209,7 +211,7 @@ class _MSICreateFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/delivery_list/delivery_list.gform.dart b/packages/reactive_forms_generator/example/lib/docs/delivery_list/delivery_list.gform.dart index 653ff1c9..93b01820 100644 --- a/packages/reactive_forms_generator/example/lib/docs/delivery_list/delivery_list.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/delivery_list/delivery_list.gform.dart @@ -53,7 +53,7 @@ class ReactiveDeliveryListForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveDeliveryListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static DeliveryListForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveDeliveryListForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class DeliveryListFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class DeliveryListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _DeliveryListFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -2444,7 +2446,7 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -2453,7 +2455,8 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static StandaloneDeliveryPointForm? of( BuildContext context, { @@ -2483,7 +2486,7 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -2504,7 +2507,7 @@ class StandaloneDeliveryPointFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -2515,7 +2518,8 @@ class StandaloneDeliveryPointFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -2614,7 +2618,7 @@ class _StandaloneDeliveryPointFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/delivery_list/delivery_list_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/delivery_list/delivery_list_output.gform.dart index 81275f12..a90f8cfb 100644 --- a/packages/reactive_forms_generator/example/lib/docs/delivery_list/delivery_list_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/delivery_list/delivery_list_output.gform.dart @@ -53,7 +53,7 @@ class ReactiveDeliveryListOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveDeliveryListOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static DeliveryListOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveDeliveryListOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class DeliveryListOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class DeliveryListOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _DeliveryListOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -2502,7 +2504,7 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -2511,7 +2513,8 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static StandaloneDeliveryPointForm? of( BuildContext context, { @@ -2541,7 +2544,7 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -2562,7 +2565,7 @@ class StandaloneDeliveryPointFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -2573,7 +2576,8 @@ class StandaloneDeliveryPointFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -2672,7 +2676,7 @@ class _StandaloneDeliveryPointFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/freezed/freezed_class.gform.dart b/packages/reactive_forms_generator/example/lib/docs/freezed/freezed_class.gform.dart index 75b6174a..391a5c5d 100644 --- a/packages/reactive_forms_generator/example/lib/docs/freezed/freezed_class.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/freezed/freezed_class.gform.dart @@ -53,7 +53,7 @@ class ReactiveFreezedClassForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveFreezedClassForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static FreezedClassForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveFreezedClassForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class FreezedClassFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class FreezedClassFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _FreezedClassFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/freezed/freezed_class_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/freezed/freezed_class_output.gform.dart index 412dd485..f960d575 100644 --- a/packages/reactive_forms_generator/example/lib/docs/freezed/freezed_class_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/freezed/freezed_class_output.gform.dart @@ -53,7 +53,7 @@ class ReactiveFreezedClassOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveFreezedClassOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static FreezedClassOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveFreezedClassOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class FreezedClassOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class FreezedClassOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _FreezedClassOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/freezed2/test.gform.dart b/packages/reactive_forms_generator/example/lib/docs/freezed2/test.gform.dart index 72a1bb1f..3dcedaa8 100644 --- a/packages/reactive_forms_generator/example/lib/docs/freezed2/test.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/freezed2/test.gform.dart @@ -46,7 +46,7 @@ class ReactiveTestForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -55,7 +55,8 @@ class ReactiveTestForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static TestForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -78,7 +79,7 @@ class ReactiveTestForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -97,7 +98,7 @@ class TestFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -108,7 +109,8 @@ class TestFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function(BuildContext context, TestForm formModel, Widget? child) builder; @@ -191,7 +193,7 @@ class _TestFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/generic/generic.gform.dart b/packages/reactive_forms_generator/example/lib/docs/generic/generic.gform.dart index e24b0e61..c535d3c2 100644 --- a/packages/reactive_forms_generator/example/lib/docs/generic/generic.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/generic/generic.gform.dart @@ -50,7 +50,7 @@ class ReactiveTagsForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -59,7 +59,8 @@ class ReactiveTagsForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static TagsForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -84,7 +85,7 @@ class ReactiveTagsForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -103,7 +104,7 @@ class TagsFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -114,7 +115,8 @@ class TagsFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -205,7 +207,7 @@ class _TagsFormBuilderState extends State> { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/generic/generic_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/generic/generic_output.gform.dart index 1704a8e8..1f6b2df4 100644 --- a/packages/reactive_forms_generator/example/lib/docs/generic/generic_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/generic/generic_output.gform.dart @@ -50,7 +50,7 @@ class ReactiveTagsOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -59,7 +59,8 @@ class ReactiveTagsOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static TagsOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -84,7 +85,7 @@ class ReactiveTagsOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -104,7 +105,7 @@ class TagsOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -115,7 +116,8 @@ class TagsOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -206,7 +208,7 @@ class _TagsOFormBuilderState extends State> { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/generic_status_list/generic_status_list.gform.dart b/packages/reactive_forms_generator/example/lib/docs/generic_status_list/generic_status_list.gform.dart index 78c42dff..b0e249df 100644 --- a/packages/reactive_forms_generator/example/lib/docs/generic_status_list/generic_status_list.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/generic_status_list/generic_status_list.gform.dart @@ -54,7 +54,7 @@ class ReactiveStatusListForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -63,7 +63,8 @@ class ReactiveStatusListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static StatusListForm? of( BuildContext context, { @@ -93,7 +94,7 @@ class ReactiveStatusListForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -114,7 +115,7 @@ class StatusListFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -125,7 +126,8 @@ class StatusListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -219,7 +221,7 @@ class _StatusListFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/generic_status_list/generic_status_list_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/generic_status_list/generic_status_list_output.gform.dart index d51f8812..9d31d365 100644 --- a/packages/reactive_forms_generator/example/lib/docs/generic_status_list/generic_status_list_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/generic_status_list/generic_status_list_output.gform.dart @@ -54,7 +54,7 @@ class ReactiveStatusListOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -63,7 +63,8 @@ class ReactiveStatusListOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static StatusListOForm? of( BuildContext context, { @@ -93,7 +94,7 @@ class ReactiveStatusListOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -114,7 +115,7 @@ class StatusListOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -125,7 +126,8 @@ class StatusListOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -219,7 +221,7 @@ class _StatusListOFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/group/group.gform.dart b/packages/reactive_forms_generator/example/lib/docs/group/group.gform.dart index d24cada0..08d6bc26 100644 --- a/packages/reactive_forms_generator/example/lib/docs/group/group.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/group/group.gform.dart @@ -50,7 +50,7 @@ class ReactiveGroupForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -59,7 +59,8 @@ class ReactiveGroupForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static GroupForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -82,7 +83,7 @@ class ReactiveGroupForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -101,7 +102,7 @@ class GroupFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -112,7 +113,8 @@ class GroupFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -199,7 +201,7 @@ class _GroupFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/group/group_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/group/group_output.gform.dart index 39b6120b..2faab827 100644 --- a/packages/reactive_forms_generator/example/lib/docs/group/group_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/group/group_output.gform.dart @@ -53,7 +53,7 @@ class ReactiveGroupOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveGroupOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static GroupOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -85,7 +86,7 @@ class ReactiveGroupOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -104,7 +105,7 @@ class GroupOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -115,7 +116,8 @@ class GroupOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -202,7 +204,7 @@ class _GroupOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/login/login.gform.dart b/packages/reactive_forms_generator/example/lib/docs/login/login.gform.dart index 5a7aa425..adfc9ff5 100644 --- a/packages/reactive_forms_generator/example/lib/docs/login/login.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/login/login.gform.dart @@ -50,7 +50,7 @@ class ReactiveLoginForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -59,7 +59,8 @@ class ReactiveLoginForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static LoginForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -82,7 +83,7 @@ class ReactiveLoginForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -101,7 +102,7 @@ class LoginFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -112,7 +113,8 @@ class LoginFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -199,7 +201,7 @@ class _LoginFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/login/login_form.dart b/packages/reactive_forms_generator/example/lib/docs/login/login_form.dart index 298cc84b..91ea116e 100644 --- a/packages/reactive_forms_generator/example/lib/docs/login/login_form.dart +++ b/packages/reactive_forms_generator/example/lib/docs/login/login_form.dart @@ -23,7 +23,7 @@ class _LoginFormWidgetState extends State { title: const Text('Login'), body: LoginFormBuilder( canPop: (formGroup) => true, - onPopInvoked: (formGroup, didPop) => {}, + onPopInvokedWithResult: (formGroup, didPop, result) => {}, model: _emptyModel, builder: (context, formModel, child) { return Column( diff --git a/packages/reactive_forms_generator/example/lib/docs/login/login_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/login/login_output.gform.dart index 9fde7b4f..d439a967 100644 --- a/packages/reactive_forms_generator/example/lib/docs/login/login_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/login/login_output.gform.dart @@ -53,7 +53,7 @@ class ReactiveLoginOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveLoginOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static LoginOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -85,7 +86,7 @@ class ReactiveLoginOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -104,7 +105,7 @@ class LoginOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -115,7 +116,8 @@ class LoginOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -202,7 +204,7 @@ class _LoginOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/login_extended/login_extended.gform.dart b/packages/reactive_forms_generator/example/lib/docs/login_extended/login_extended.gform.dart index 8caf2c29..4b34735f 100644 --- a/packages/reactive_forms_generator/example/lib/docs/login_extended/login_extended.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/login_extended/login_extended.gform.dart @@ -53,7 +53,7 @@ class ReactiveLoginExtendedForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveLoginExtendedForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static LoginExtendedForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveLoginExtendedForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class LoginExtendedFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class LoginExtendedFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _LoginExtendedFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/login_extended/login_extended_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/login_extended/login_extended_output.gform.dart index 8bbf5502..59fe4166 100644 --- a/packages/reactive_forms_generator/example/lib/docs/login_extended/login_extended_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/login_extended/login_extended_output.gform.dart @@ -53,7 +53,7 @@ class ReactiveLoginExtendedOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveLoginExtendedOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static LoginExtendedOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveLoginExtendedOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class LoginExtendedOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class LoginExtendedOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _LoginExtendedOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/login_extended_nullable/login_extended_nullable.gform.dart b/packages/reactive_forms_generator/example/lib/docs/login_extended_nullable/login_extended_nullable.gform.dart index b7609e1a..f7e839af 100644 --- a/packages/reactive_forms_generator/example/lib/docs/login_extended_nullable/login_extended_nullable.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/login_extended_nullable/login_extended_nullable.gform.dart @@ -54,7 +54,7 @@ class ReactiveLoginExtendedNullableForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -63,7 +63,8 @@ class ReactiveLoginExtendedNullableForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static LoginExtendedNullableForm? of( BuildContext context, { @@ -93,7 +94,7 @@ class ReactiveLoginExtendedNullableForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -114,7 +115,7 @@ class LoginExtendedNullableFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -125,7 +126,8 @@ class LoginExtendedNullableFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -224,7 +226,7 @@ class _LoginExtendedNullableFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/login_extended_nullable/login_extended_nullable_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/login_extended_nullable/login_extended_nullable_output.gform.dart index f65bedf4..0a49d046 100644 --- a/packages/reactive_forms_generator/example/lib/docs/login_extended_nullable/login_extended_nullable_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/login_extended_nullable/login_extended_nullable_output.gform.dart @@ -54,7 +54,7 @@ class ReactiveLoginExtendedNullableOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -63,7 +63,8 @@ class ReactiveLoginExtendedNullableOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static LoginExtendedNullableOForm? of( BuildContext context, { @@ -93,7 +94,7 @@ class ReactiveLoginExtendedNullableOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -114,7 +115,7 @@ class LoginExtendedNullableOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -125,7 +126,8 @@ class LoginExtendedNullableOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -224,7 +226,7 @@ class _LoginExtendedNullableOFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/mailing_list/mailing_list.gform.dart b/packages/reactive_forms_generator/example/lib/docs/mailing_list/mailing_list.gform.dart index ad61f703..ffd928e4 100644 --- a/packages/reactive_forms_generator/example/lib/docs/mailing_list/mailing_list.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/mailing_list/mailing_list.gform.dart @@ -53,7 +53,7 @@ class ReactiveMailingListForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveMailingListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static MailingListForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveMailingListForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -109,7 +110,7 @@ class MailingListFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -120,7 +121,8 @@ class MailingListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -212,7 +214,7 @@ class _MailingListFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/mailing_list/mailing_list_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/mailing_list/mailing_list_output.gform.dart index 31ba0b4e..62cbc78a 100644 --- a/packages/reactive_forms_generator/example/lib/docs/mailing_list/mailing_list_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/mailing_list/mailing_list_output.gform.dart @@ -53,7 +53,7 @@ class ReactiveMailingListOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveMailingListOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static MailingListOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveMailingListOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class MailingListOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class MailingListOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _MailingListOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/model_extends/model_extends.gform.dart b/packages/reactive_forms_generator/example/lib/docs/model_extends/model_extends.gform.dart index 31a712f7..f7b8c1f9 100644 --- a/packages/reactive_forms_generator/example/lib/docs/model_extends/model_extends.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/model_extends/model_extends.gform.dart @@ -53,7 +53,7 @@ class ReactiveModelExtendsForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveModelExtendsForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static ModelExtendsForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveModelExtendsForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class ModelExtendsFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class ModelExtendsFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _ModelExtendsFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/model_implements/model_implements.gform.dart b/packages/reactive_forms_generator/example/lib/docs/model_implements/model_implements.gform.dart index a42d02d0..b596c782 100644 --- a/packages/reactive_forms_generator/example/lib/docs/model_implements/model_implements.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/model_implements/model_implements.gform.dart @@ -53,7 +53,7 @@ class ReactiveModelImplementsForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveModelImplementsForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static ModelImplementsForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveModelImplementsForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class ModelImplementsFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class ModelImplementsFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -215,7 +217,7 @@ class _ModelImplementsFormBuilderState child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/nested/nested.gform.dart b/packages/reactive_forms_generator/example/lib/docs/nested/nested.gform.dart index cc25cab8..cd570650 100644 --- a/packages/reactive_forms_generator/example/lib/docs/nested/nested.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/nested/nested.gform.dart @@ -53,7 +53,7 @@ class ReactiveSubGroupForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveSubGroupForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static SubGroupForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -87,7 +88,7 @@ class ReactiveSubGroupForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -107,7 +108,7 @@ class SubGroupFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -118,7 +119,8 @@ class SubGroupFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -209,7 +211,7 @@ class _SubGroupFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -759,7 +761,7 @@ class ReactiveGroupForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -768,7 +770,8 @@ class ReactiveGroupForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static GroupForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -791,7 +794,7 @@ class ReactiveGroupForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -810,7 +813,7 @@ class GroupFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -821,7 +824,8 @@ class GroupFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -908,7 +912,7 @@ class _GroupFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -1659,7 +1663,7 @@ class ReactiveNestedForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -1668,7 +1672,8 @@ class ReactiveNestedForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static NestedForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -1691,7 +1696,7 @@ class ReactiveNestedForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -1710,7 +1715,7 @@ class NestedFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -1721,7 +1726,8 @@ class NestedFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1808,7 +1814,7 @@ class _NestedFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/nested/nested_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/nested/nested_output.gform.dart index fa6215bc..447b49d2 100644 --- a/packages/reactive_forms_generator/example/lib/docs/nested/nested_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/nested/nested_output.gform.dart @@ -53,7 +53,7 @@ class ReactiveSubGroupOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveSubGroupOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static SubGroupOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -87,7 +88,7 @@ class ReactiveSubGroupOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -107,7 +108,7 @@ class SubGroupOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -118,7 +119,8 @@ class SubGroupOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -209,7 +211,7 @@ class _SubGroupOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -797,7 +799,7 @@ class ReactiveGroupOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -806,7 +808,8 @@ class ReactiveGroupOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static GroupOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -829,7 +832,7 @@ class ReactiveGroupOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -848,7 +851,7 @@ class GroupOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -859,7 +862,8 @@ class GroupOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -946,7 +950,7 @@ class _GroupOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -1702,7 +1706,7 @@ class ReactiveNestedOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -1711,7 +1715,8 @@ class ReactiveNestedOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static NestedOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -1736,7 +1741,7 @@ class ReactiveNestedOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -1755,7 +1760,7 @@ class NestedOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -1766,7 +1771,8 @@ class NestedOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1857,7 +1863,7 @@ class _NestedOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/nested_generics/nested_generics.gform.dart b/packages/reactive_forms_generator/example/lib/docs/nested_generics/nested_generics.gform.dart index d027d22d..27a24fcc 100644 --- a/packages/reactive_forms_generator/example/lib/docs/nested_generics/nested_generics.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/nested_generics/nested_generics.gform.dart @@ -56,7 +56,7 @@ class ReactiveProductDetailsForm

required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -65,7 +65,8 @@ class ReactiveProductDetailsForm

final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static ProductDetailsForm? of

( BuildContext context, { @@ -95,7 +96,7 @@ class ReactiveProductDetailsForm

stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -119,7 +120,7 @@ class ProductDetailsFormBuilder

this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -130,7 +131,8 @@ class ProductDetailsFormBuilder

final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -224,7 +226,7 @@ class _ProductDetailsFormBuilderState

child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -1359,7 +1361,7 @@ class ReactiveIdForm

required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -1368,7 +1370,8 @@ class ReactiveIdForm

final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static IdForm? of

( BuildContext context, { @@ -1396,7 +1399,7 @@ class ReactiveIdForm

stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -1417,7 +1420,7 @@ class IdFormBuilder

extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -1428,7 +1431,8 @@ class IdFormBuilder

extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1520,7 +1524,7 @@ class _IdFormBuilderState

child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/nested_generics/nested_generics_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/nested_generics/nested_generics_output.gform.dart index 0fef5d7f..76ed6587 100644 --- a/packages/reactive_forms_generator/example/lib/docs/nested_generics/nested_generics_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/nested_generics/nested_generics_output.gform.dart @@ -56,7 +56,7 @@ class ReactiveProductDetailsOForm

required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -65,7 +65,8 @@ class ReactiveProductDetailsOForm

final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static ProductDetailsOForm? of

( BuildContext context, { @@ -95,7 +96,7 @@ class ReactiveProductDetailsOForm

stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -119,7 +120,7 @@ class ProductDetailsOFormBuilder

this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -130,7 +131,8 @@ class ProductDetailsOFormBuilder

final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -227,7 +229,7 @@ class _ProductDetailsOFormBuilderState

child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, @@ -1390,7 +1392,7 @@ class ReactiveIdOForm

required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -1399,7 +1401,8 @@ class ReactiveIdOForm

final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static IdOForm? of

( BuildContext context, { @@ -1427,7 +1430,7 @@ class ReactiveIdOForm

stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -1448,7 +1451,7 @@ class IdOFormBuilder

extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -1459,7 +1462,8 @@ class IdOFormBuilder

extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1551,7 +1555,7 @@ class _IdOFormBuilderState

child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/profile/profile.gform.dart b/packages/reactive_forms_generator/example/lib/docs/profile/profile.gform.dart index d281b721..da6d0e7f 100644 --- a/packages/reactive_forms_generator/example/lib/docs/profile/profile.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/profile/profile.gform.dart @@ -53,7 +53,7 @@ class ReactiveProfileForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveProfileForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static ProfileForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -87,7 +88,7 @@ class ReactiveProfileForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -106,7 +107,7 @@ class ProfileFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -117,7 +118,8 @@ class ProfileFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -208,7 +210,7 @@ class _ProfileFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/profile/profile_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/profile/profile_output.gform.dart index 00d4c835..fc8dfa58 100644 --- a/packages/reactive_forms_generator/example/lib/docs/profile/profile_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/profile/profile_output.gform.dart @@ -53,7 +53,7 @@ class ReactiveProfileOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveProfileOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static ProfileOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -87,7 +88,7 @@ class ReactiveProfileOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -107,7 +108,7 @@ class ProfileOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -118,7 +119,8 @@ class ProfileOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -209,7 +211,7 @@ class _ProfileOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/recursive/recursive.gform.dart b/packages/reactive_forms_generator/example/lib/docs/recursive/recursive.gform.dart index ae9d87e2..5be19c8e 100644 --- a/packages/reactive_forms_generator/example/lib/docs/recursive/recursive.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/recursive/recursive.gform.dart @@ -53,7 +53,7 @@ class ReactiveSecuredAreaForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveSecuredAreaForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static SecuredAreaForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveSecuredAreaForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -109,7 +110,7 @@ class SecuredAreaFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -120,7 +121,8 @@ class SecuredAreaFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -212,7 +214,7 @@ class _SecuredAreaFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/renamed_basic/renamed_basic.gform.dart b/packages/reactive_forms_generator/example/lib/docs/renamed_basic/renamed_basic.gform.dart index b4496240..dda9f32d 100644 --- a/packages/reactive_forms_generator/example/lib/docs/renamed_basic/renamed_basic.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/renamed_basic/renamed_basic.gform.dart @@ -53,7 +53,7 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static SomeWiredNameForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class SomeWiredNameFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class SomeWiredNameFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _SomeWiredNameFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/renamed_basic/renamed_basic_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/renamed_basic/renamed_basic_output.gform.dart index f06e64ca..7b390ab9 100644 --- a/packages/reactive_forms_generator/example/lib/docs/renamed_basic/renamed_basic_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/renamed_basic/renamed_basic_output.gform.dart @@ -53,7 +53,7 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static SomeWiredNameForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class SomeWiredNameFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class SomeWiredNameFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _SomeWiredNameFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/user_profile/user_profile.gform.dart b/packages/reactive_forms_generator/example/lib/docs/user_profile/user_profile.gform.dart index e6fc5097..a571b697 100644 --- a/packages/reactive_forms_generator/example/lib/docs/user_profile/user_profile.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/user_profile/user_profile.gform.dart @@ -53,7 +53,7 @@ class ReactiveUserProfileForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveUserProfileForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static UserProfileForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveUserProfileForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -109,7 +110,7 @@ class UserProfileFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -120,7 +121,8 @@ class UserProfileFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -212,7 +214,7 @@ class _UserProfileFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/lib/docs/user_profile/user_profile_output.gform.dart b/packages/reactive_forms_generator/example/lib/docs/user_profile/user_profile_output.gform.dart index 0820b57e..5449687b 100644 --- a/packages/reactive_forms_generator/example/lib/docs/user_profile/user_profile_output.gform.dart +++ b/packages/reactive_forms_generator/example/lib/docs/user_profile/user_profile_output.gform.dart @@ -53,7 +53,7 @@ class ReactiveUserProfileOForm extends StatelessWidget { required this.form, required this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, }) : super(key: key); final Widget child; @@ -62,7 +62,8 @@ class ReactiveUserProfileOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; static UserProfileOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -89,7 +90,7 @@ class ReactiveUserProfileOForm extends StatelessWidget { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); @@ -110,7 +111,7 @@ class UserProfileOFormBuilder extends StatefulWidget { this.model, this.child, this.canPop, - this.onPopInvoked, + this.onPopInvokedWithResult, required this.builder, this.initState, }) : super(key: key); @@ -121,7 +122,8 @@ class UserProfileOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; - final void Function(FormGroup formGroup, bool didPop)? onPopInvoked; + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -214,7 +216,7 @@ class _UserProfileOFormBuilderState extends State { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, diff --git a/packages/reactive_forms_generator/example/pubspec.yaml b/packages/reactive_forms_generator/example/pubspec.yaml index f439a447..4ed7971e 100644 --- a/packages/reactive_forms_generator/example/pubspec.yaml +++ b/packages/reactive_forms_generator/example/pubspec.yaml @@ -13,14 +13,17 @@ dependencies: sdk: flutter reactive_forms_annotations: path: ../../reactive_forms_annotations - reactive_forms: ^17.0.1 + reactive_forms: ^18.0.0 intl: ">=0.19.0 <1.0.0" freezed_annotation: ^3.1.0 dartz: ^0.10.1 json_annotation: ^4.9.0 # reactive_text_field: ^1.0.0 equatable: ^2.0.7 - reactive_forms_lbc: ^4.0.5 + reactive_forms_lbc: ^4.0.4 + +dependency_overrides: + reactive_forms: ^18.0.0 dev_dependencies: reactive_forms_generator: diff --git a/packages/reactive_forms_generator/lib/src/reactive_forms/reactive_form.dart b/packages/reactive_forms_generator/lib/src/reactive_forms/reactive_form.dart index b2c62682..8d0036e2 100644 --- a/packages/reactive_forms_generator/lib/src/reactive_forms/reactive_form.dart +++ b/packages/reactive_forms_generator/lib/src/reactive_forms/reactive_form.dart @@ -44,7 +44,7 @@ class ReactiveForm { ), Parameter( (b) => b - ..name = 'onPopInvoked' + ..name = 'onPopInvokedWithResult' ..toThis = true ..named = true, ), @@ -83,10 +83,10 @@ class ReactiveForm { ), Field( (b) => b - ..name = 'onPopInvoked' + ..name = 'onPopInvokedWithResult' ..modifier = FieldModifier.final$ ..type = const Reference( - 'void Function(FormGroup formGroup, bool didPop)?', + 'ReactiveFormPopInvokedWithResultCallback?', ), ), ]) @@ -145,7 +145,7 @@ class ReactiveForm { stream: form.form.statusChanged, child: ReactiveFormPopScope( canPop: canPop, - onPopInvoked: onPopInvoked, + onPopInvokedWithResult: onPopInvokedWithResult, child: child, ), ); diff --git a/packages/reactive_forms_generator/lib/src/reactive_forms/reactive_form_builder.dart b/packages/reactive_forms_generator/lib/src/reactive_forms/reactive_form_builder.dart index a4b05eb2..9e34a422 100644 --- a/packages/reactive_forms_generator/lib/src/reactive_forms/reactive_form_builder.dart +++ b/packages/reactive_forms_generator/lib/src/reactive_forms/reactive_form_builder.dart @@ -70,7 +70,7 @@ class ReactiveFormBuilder { ), Parameter( (b) => b - ..name = 'onPopInvoked' + ..name = 'onPopInvokedWithResult' ..named = true ..toThis = true, ), @@ -117,11 +117,11 @@ class ReactiveFormBuilder { ), Field( (b) => b - ..name = 'onPopInvoked' + ..name = 'onPopInvokedWithResult' + ..modifier = FieldModifier.final$ ..type = const Reference( - 'void Function(FormGroup formGroup, bool didPop)?', - ) - ..modifier = FieldModifier.final$, + 'ReactiveFormPopInvokedWithResultCallback?', + ), ), Field( (b) => b @@ -250,7 +250,7 @@ class ReactiveFormBuilder { child: ReactiveFormBuilder( form: () => _formModel.form, canPop: widget.canPop, - onPopInvoked: widget.onPopInvoked, + onPopInvokedWithResult: widget.onPopInvokedWithResult, builder: (context, formGroup, child) => widget.builder(context, _formModel, widget.child), child: widget.child, ), diff --git a/packages/reactive_forms_generator/pubspec.yaml b/packages/reactive_forms_generator/pubspec.yaml index a17ddf77..45503068 100644 --- a/packages/reactive_forms_generator/pubspec.yaml +++ b/packages/reactive_forms_generator/pubspec.yaml @@ -2,7 +2,7 @@ name: reactive_forms_generator description: Generator for reactive_forms. Generates form classes based on model. repository: https://github.com/artflutter/reactive_forms_generator -version: 7.5.0-beta1 +version: 8.1.0-beta2 environment: sdk: ">=3.8.0 <4.0.0" diff --git a/pubspec.lock b/pubspec.lock index ded7be08..24fe9117 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -585,13 +585,13 @@ packages: source: hosted version: "1.5.0" reactive_forms: - dependency: transitive + dependency: "direct overridden" description: name: reactive_forms - sha256: "9b1fb18e0aae9c50cfa0aaabaaa38bc4d78eefc9b7b95fa9c947b051f6524b8e" + sha256: dc840a9c1fbc3dc6c97e791801e96b0b0be6d9c7b41cc676fdc4043878dbc714 url: "https://pub.dev" source: hosted - version: "17.0.1" + version: "18.2.0" reactive_forms_lbc: dependency: transitive description: