From 1e7decb04c9dea56e91f867b440294e29a53c571 Mon Sep 17 00:00:00 2001 From: Vasiliy Ditsyak Date: Sat, 24 May 2025 12:22:08 +0200 Subject: [PATCH 1/3] test fixes flutter-version: 3.27.4 bugfix rf18 --- .../test/doc/array_nullable_output_test.dart | 14 ++++--- .../test/doc/array_nullable_test.dart | 14 ++++--- .../test/doc/create_output_test.dart | 14 ++++--- .../test/doc/delivery_list_output_test.dart | 28 +++++++------ .../test/doc/delivery_list_test.dart | 28 +++++++------ .../test/doc/freezed_class_output_test.dart | 14 ++++--- .../test/doc/freezed_class_test.dart | 14 ++++--- .../test/doc/generic_output_test.dart | 14 ++++--- .../doc/generic_status_list_output_test.dart | 14 ++++--- .../test/doc/generic_status_list_test.dart | 14 ++++--- .../test/doc/generic_test.dart | 14 ++++--- .../test/doc/group_output_test.dart | 14 ++++--- .../generator_tests/test/doc/group_test.dart | 14 ++++--- .../login_extended_nullable_output_test.dart | 14 ++++--- .../doc/login_extended_nullable_test.dart | 14 ++++--- .../test/doc/login_extended_output_test.dart | 14 ++++--- .../test/doc/login_extended_test.dart | 14 ++++--- .../test/doc/login_output_test.dart | 14 ++++--- .../generator_tests/test/doc/login_test.dart | 14 ++++--- .../test/doc/mailing_list_output_test.dart | 14 ++++--- .../test/doc/mailing_list_test.dart | 14 ++++--- .../test/doc/nested_generics_output_test.dart | 28 +++++++------ .../test/doc/nested_generics_test.dart | 28 +++++++------ .../test/doc/profile_output_test.dart | 14 ++++--- .../test/doc/profile_test.dart | 14 ++++--- .../test/doc/renamed_basic_output_test.dart | 14 ++++--- .../test/doc/renamed_basic_test.dart | 14 ++++--- .../test/doc/user_profile_output_test.dart | 14 ++++--- .../test/doc/user_profile_test.dart | 14 ++++--- .../reactive_forms_annotations/CHANGELOG.md | 8 ++++ .../reactive_forms_annotations/pubspec.yaml | 4 +- .../reactive_forms_generator/CHANGELOG.md | 38 ++++++++++++++++- .../animated_url_list.gform.dart | 14 ++++--- .../animated_url_list_output.gform.dart | 14 ++++--- .../docs/annotateless/annotateless.gform.dart | 14 ++++--- .../annotateless_output.gform.dart | 14 ++++--- .../array_nullable/array_nullable.gform.dart | 14 ++++--- .../array_nullable_output.gform.dart | 14 ++++--- .../lib/docs/create/create_output.gform.dart | 14 ++++--- .../delivery_list/delivery_list.gform.dart | 28 +++++++------ .../delivery_list_output.gform.dart | 28 +++++++------ .../lib/docs/freezed/freezed_class.gform.dart | 14 ++++--- .../freezed/freezed_class_output.gform.dart | 14 ++++--- .../example/lib/docs/freezed2/test.gform.dart | 14 ++++--- .../lib/docs/generic/generic.gform.dart | 14 ++++--- .../docs/generic/generic_output.gform.dart | 14 ++++--- .../generic_status_list.gform.dart | 14 ++++--- .../generic_status_list_output.gform.dart | 14 ++++--- .../example/lib/docs/group/group.gform.dart | 14 ++++--- .../lib/docs/group/group_output.gform.dart | 14 ++++--- .../example/lib/docs/login/login.gform.dart | 14 ++++--- .../example/lib/docs/login/login_form.dart | 2 +- .../lib/docs/login/login_output.gform.dart | 14 ++++--- .../login_extended/login_extended.gform.dart | 14 ++++--- .../login_extended_output.gform.dart | 14 ++++--- .../login_extended_nullable.gform.dart | 14 ++++--- .../login_extended_nullable_output.gform.dart | 14 ++++--- .../docs/mailing_list/mailing_list.gform.dart | 14 ++++--- .../mailing_list_output.gform.dart | 14 ++++--- .../model_extends/model_extends.gform.dart | 14 ++++--- .../model_implements.gform.dart | 14 ++++--- .../example/lib/docs/nested/nested.gform.dart | 42 +++++++++++-------- .../lib/docs/nested/nested_output.gform.dart | 42 +++++++++++-------- .../nested_generics.gform.dart | 28 +++++++------ .../nested_generics_output.gform.dart | 28 +++++++------ .../lib/docs/profile/profile.gform.dart | 14 ++++--- .../docs/profile/profile_output.gform.dart | 14 ++++--- .../lib/docs/recursive/recursive.gform.dart | 14 ++++--- .../renamed_basic/renamed_basic.gform.dart | 14 ++++--- .../renamed_basic_output.gform.dart | 14 ++++--- .../docs/user_profile/user_profile.gform.dart | 14 ++++--- .../user_profile_output.gform.dart | 14 ++++--- .../example/pubspec.yaml | 7 +++- .../lib/src/reactive_forms/reactive_form.dart | 13 +++--- .../reactive_forms/reactive_form_builder.dart | 13 +++--- .../reactive_forms_generator/pubspec.yaml | 2 +- 76 files changed, 706 insertions(+), 501 deletions(-) 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..b0985443 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..bb019267 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..063f552e 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..b310cd75 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..f0c7f14f 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..19fe41ea 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..0bcaad98 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..f95b5889 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..37884270 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..e8b42354 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..17de0909 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..c2e834cb 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..f8c5700d 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..c2642027 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..85edc814 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..4231a204 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..937e824c 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..ca999613 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..c7c2404c 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..81b411eb 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..3889a81c 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..0dd99adf 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..3421bbd4 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/profile_output_test.dart b/packages/generator_tests/test/doc/profile_output_test.dart index a7c85b44..59dc1940 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..8ee31ad7 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/renamed_basic_output_test.dart b/packages/generator_tests/test/doc/renamed_basic_output_test.dart index 233296a7..014c9aaa 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..b1795da5 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..698c2c48 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..951b034b 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..e258057f 100644 --- a/packages/reactive_forms_annotations/CHANGELOG.md +++ b/packages/reactive_forms_annotations/CHANGELOG.md @@ -1,3 +1,11 @@ +## [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..53274a6e 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-beta0 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..e706e4ae 100644 --- a/packages/reactive_forms_generator/CHANGELOG.md +++ b/packages/reactive_forms_generator/CHANGELOG.md @@ -1,3 +1,23 @@ +## [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 +68,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..328fb9cf 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..8a8f2626 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, 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..31f33f1d 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..5d3e5a57 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..3612889a 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..5e41ec32 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..385be965 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..384ea161 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..fa636ef7 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..b61b88b1 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..2f5a8450 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..5cb1181f 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..264dd946 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..50d874ba 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..2aed5b4d 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..45bcdc51 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..28999c6f 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..d2a69b0b 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..b7666740 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..8102aa62 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..c4e94be1 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..d9a1e8cd 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..862dc653 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..8472a885 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..68a20b8d 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..cf4eba26 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..95626989 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..2ccddf02 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..0a6e11f4 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..78975a3f 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..9880ba41 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..8c313f35 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..b27a82ab 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..bda3287f 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..d660ee14 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..040a00b2 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..283a13dc 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..09ca95af 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..39f80c53 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..401511cf 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 @@ -43,8 +43,8 @@ class ReactiveForm { ..named = true, ), Parameter( - (b) => b - ..name = 'onPopInvoked' + (b) => b + ..name = 'onPopInvokedWithResult' ..toThis = true ..named = true, ), @@ -82,12 +82,11 @@ class ReactiveForm { ..type = const Reference('bool Function(FormGroup formGroup)?'), ), Field( - (b) => b - ..name = 'onPopInvoked' + (b) => b + ..name = 'onPopInvokedWithResult' ..modifier = FieldModifier.final$ ..type = const Reference( - 'void Function(FormGroup formGroup, bool didPop)?', - ), + 'ReactiveFormPopInvokedWithResultCallback?'), ), ]) ..methods.addAll([ @@ -145,7 +144,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..ebce6f07 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, ), @@ -116,12 +116,11 @@ class ReactiveFormBuilder { ..modifier = FieldModifier.final$, ), Field( - (b) => b - ..name = 'onPopInvoked' + (b) => b + ..name = 'onPopInvokedWithResult' + ..modifier = FieldModifier.final$ ..type = const Reference( - 'void Function(FormGroup formGroup, bool didPop)?', - ) - ..modifier = FieldModifier.final$, + 'ReactiveFormPopInvokedWithResultCallback?'), ), Field( (b) => b @@ -250,7 +249,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..f02480dc 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-beta0 environment: sdk: ">=3.8.0 <4.0.0" From 8e0be5cfe05292d1f00dcf2e6e9f4f572989ab9d Mon Sep 17 00:00:00 2001 From: Vasiliy Ditsyak Date: Sun, 30 Nov 2025 15:19:57 +0100 Subject: [PATCH 2/3] build 4 --- .../doc/animated_url_list_output_test.dart | 14 ++++--- .../test/doc/animated_url_list_test.dart | 14 ++++--- .../test/doc/annotateless_output_test.dart | 14 ++++--- .../test/doc/annotateless_test.dart | 14 ++++--- .../test/doc/array_nullable_output_test.dart | 4 +- .../test/doc/array_nullable_test.dart | 4 +- .../test/doc/create_output_test.dart | 4 +- .../test/doc/delivery_list_output_test.dart | 8 ++-- .../test/doc/delivery_list_test.dart | 8 ++-- .../test/doc/freezed_class_output_test.dart | 4 +- .../test/doc/freezed_class_test.dart | 4 +- .../test/doc/generic_output_test.dart | 4 +- .../doc/generic_status_list_output_test.dart | 4 +- .../test/doc/generic_status_list_test.dart | 4 +- .../test/doc/generic_test.dart | 4 +- .../test/doc/group_output_test.dart | 4 +- .../generator_tests/test/doc/group_test.dart | 4 +- .../login_extended_nullable_output_test.dart | 4 +- .../doc/login_extended_nullable_test.dart | 4 +- .../test/doc/login_extended_output_test.dart | 4 +- .../test/doc/login_extended_test.dart | 4 +- .../test/doc/login_output_test.dart | 4 +- .../generator_tests/test/doc/login_test.dart | 4 +- .../test/doc/mailing_list_output_test.dart | 4 +- .../test/doc/mailing_list_test.dart | 4 +- .../test/doc/nested_generics_output_test.dart | 8 ++-- .../test/doc/nested_generics_test.dart | 8 ++-- .../test/doc/nested_output.test.dart | 42 +++++++++++-------- .../test/doc/profile_output_test.dart | 4 +- .../test/doc/profile_test.dart | 4 +- .../test/doc/recursive_test.dart | 14 ++++--- .../test/doc/renamed_basic_output_test.dart | 4 +- .../test/doc/renamed_basic_test.dart | 4 +- .../test/doc/user_profile_output_test.dart | 4 +- .../test/doc/user_profile_test.dart | 4 +- .../reactive_forms_annotations/CHANGELOG.md | 4 ++ .../reactive_forms_annotations/pubspec.yaml | 2 +- .../reactive_forms_generator/CHANGELOG.md | 4 ++ .../animated_url_list.gform.dart | 4 +- .../animated_url_list_output.gform.dart | 6 +-- .../docs/annotateless/annotateless.gform.dart | 4 +- .../annotateless_output.gform.dart | 4 +- .../array_nullable/array_nullable.gform.dart | 4 +- .../array_nullable_output.gform.dart | 4 +- .../lib/docs/create/create_output.gform.dart | 4 +- .../delivery_list/delivery_list.gform.dart | 8 ++-- .../delivery_list_output.gform.dart | 8 ++-- .../lib/docs/freezed/freezed_class.gform.dart | 4 +- .../freezed/freezed_class_output.gform.dart | 4 +- .../example/lib/docs/freezed2/test.gform.dart | 4 +- .../lib/docs/generic/generic.gform.dart | 4 +- .../docs/generic/generic_output.gform.dart | 4 +- .../generic_status_list.gform.dart | 4 +- .../generic_status_list_output.gform.dart | 4 +- .../example/lib/docs/group/group.gform.dart | 4 +- .../lib/docs/group/group_output.gform.dart | 4 +- .../example/lib/docs/login/login.gform.dart | 4 +- .../lib/docs/login/login_output.gform.dart | 4 +- .../login_extended/login_extended.gform.dart | 4 +- .../login_extended_output.gform.dart | 4 +- .../login_extended_nullable.gform.dart | 4 +- .../login_extended_nullable_output.gform.dart | 4 +- .../docs/mailing_list/mailing_list.gform.dart | 4 +- .../mailing_list_output.gform.dart | 4 +- .../model_extends/model_extends.gform.dart | 4 +- .../model_implements.gform.dart | 4 +- .../example/lib/docs/nested/nested.gform.dart | 12 +++--- .../lib/docs/nested/nested_output.gform.dart | 12 +++--- .../nested_generics.gform.dart | 8 ++-- .../nested_generics_output.gform.dart | 8 ++-- .../lib/docs/profile/profile.gform.dart | 4 +- .../docs/profile/profile_output.gform.dart | 4 +- .../lib/docs/recursive/recursive.gform.dart | 4 +- .../renamed_basic/renamed_basic.gform.dart | 4 +- .../renamed_basic_output.gform.dart | 4 +- .../docs/user_profile/user_profile.gform.dart | 4 +- .../user_profile_output.gform.dart | 4 +- .../lib/src/reactive_forms/reactive_form.dart | 7 ++-- .../reactive_forms/reactive_form_builder.dart | 5 ++- .../reactive_forms_generator/pubspec.yaml | 2 +- pubspec.lock | 6 +-- 81 files changed, 244 insertions(+), 220 deletions(-) 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 b0985443..1bb47df1 100644 --- a/packages/generator_tests/test/doc/array_nullable_output_test.dart +++ b/packages/generator_tests/test/doc/array_nullable_output_test.dart @@ -116,7 +116,7 @@ class ReactiveArrayNullableOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static ArrayNullableOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -176,7 +176,7 @@ class ArrayNullableOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/array_nullable_test.dart b/packages/generator_tests/test/doc/array_nullable_test.dart index bb019267..4a0d77cc 100644 --- a/packages/generator_tests/test/doc/array_nullable_test.dart +++ b/packages/generator_tests/test/doc/array_nullable_test.dart @@ -119,7 +119,7 @@ class ReactiveArrayNullableForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static ArrayNullableForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -179,7 +179,7 @@ class ArrayNullableFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/create_output_test.dart b/packages/generator_tests/test/doc/create_output_test.dart index 063f552e..6344fbce 100644 --- a/packages/generator_tests/test/doc/create_output_test.dart +++ b/packages/generator_tests/test/doc/create_output_test.dart @@ -165,7 +165,7 @@ class ReactiveMSICreateForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static MSICreateForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -222,7 +222,7 @@ class MSICreateFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 b310cd75..c0e6da54 100644 --- a/packages/generator_tests/test/doc/delivery_list_output_test.dart +++ b/packages/generator_tests/test/doc/delivery_list_output_test.dart @@ -157,7 +157,7 @@ class ReactiveDeliveryListOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static DeliveryListOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -217,7 +217,7 @@ class DeliveryListOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -2608,7 +2608,7 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static StandaloneDeliveryPointForm? of( BuildContext context, { @@ -2671,7 +2671,7 @@ class StandaloneDeliveryPointFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/delivery_list_test.dart b/packages/generator_tests/test/doc/delivery_list_test.dart index f0c7f14f..51bf1fa6 100644 --- a/packages/generator_tests/test/doc/delivery_list_test.dart +++ b/packages/generator_tests/test/doc/delivery_list_test.dart @@ -149,7 +149,7 @@ class ReactiveDeliveryListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static DeliveryListForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -209,7 +209,7 @@ class DeliveryListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -2542,7 +2542,7 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static StandaloneDeliveryPointForm? of( BuildContext context, { @@ -2605,7 +2605,7 @@ class StandaloneDeliveryPointFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 19fe41ea..7603af44 100644 --- a/packages/generator_tests/test/doc/freezed_class_output_test.dart +++ b/packages/generator_tests/test/doc/freezed_class_output_test.dart @@ -117,7 +117,7 @@ class ReactiveFreezedClassOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static FreezedClassOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -177,7 +177,7 @@ class FreezedClassOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/freezed_class_test.dart b/packages/generator_tests/test/doc/freezed_class_test.dart index 0bcaad98..44c5986b 100644 --- a/packages/generator_tests/test/doc/freezed_class_test.dart +++ b/packages/generator_tests/test/doc/freezed_class_test.dart @@ -116,7 +116,7 @@ class ReactiveFreezedClassForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static FreezedClassForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -176,7 +176,7 @@ class FreezedClassFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/generic_output_test.dart b/packages/generator_tests/test/doc/generic_output_test.dart index f95b5889..d3559256 100644 --- a/packages/generator_tests/test/doc/generic_output_test.dart +++ b/packages/generator_tests/test/doc/generic_output_test.dart @@ -96,7 +96,7 @@ class ReactiveTagsOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static TagsOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -153,7 +153,7 @@ class TagsOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 37884270..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 @@ -97,7 +97,7 @@ class ReactiveStatusListOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static StatusListOForm? of( BuildContext context, { @@ -160,7 +160,7 @@ class StatusListOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 e8b42354..79e0f29c 100644 --- a/packages/generator_tests/test/doc/generic_status_list_test.dart +++ b/packages/generator_tests/test/doc/generic_status_list_test.dart @@ -97,7 +97,7 @@ class ReactiveStatusListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static StatusListForm? of( BuildContext context, { @@ -160,7 +160,7 @@ class StatusListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/generic_test.dart b/packages/generator_tests/test/doc/generic_test.dart index 17de0909..a81436ed 100644 --- a/packages/generator_tests/test/doc/generic_test.dart +++ b/packages/generator_tests/test/doc/generic_test.dart @@ -96,7 +96,7 @@ class ReactiveTagsForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static TagsForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -152,7 +152,7 @@ class TagsFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/group_output_test.dart b/packages/generator_tests/test/doc/group_output_test.dart index c2e834cb..c9627dc4 100644 --- a/packages/generator_tests/test/doc/group_output_test.dart +++ b/packages/generator_tests/test/doc/group_output_test.dart @@ -146,7 +146,7 @@ class ReactiveGroupOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static GroupOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -200,7 +200,7 @@ class GroupOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/group_test.dart b/packages/generator_tests/test/doc/group_test.dart index f8c5700d..cf5ba5b1 100644 --- a/packages/generator_tests/test/doc/group_test.dart +++ b/packages/generator_tests/test/doc/group_test.dart @@ -143,7 +143,7 @@ class ReactiveGroupForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static GroupForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -197,7 +197,7 @@ class GroupFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 c2642027..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 @@ -119,7 +119,7 @@ class ReactiveLoginExtendedNullableOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static LoginExtendedNullableOForm? of( BuildContext context, { @@ -182,7 +182,7 @@ class LoginExtendedNullableOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 85edc814..b8c4ba45 100644 --- a/packages/generator_tests/test/doc/login_extended_nullable_test.dart +++ b/packages/generator_tests/test/doc/login_extended_nullable_test.dart @@ -119,7 +119,7 @@ class ReactiveLoginExtendedNullableForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static LoginExtendedNullableForm? of( BuildContext context, { @@ -182,7 +182,7 @@ class LoginExtendedNullableFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 4231a204..f4adf65f 100644 --- a/packages/generator_tests/test/doc/login_extended_output_test.dart +++ b/packages/generator_tests/test/doc/login_extended_output_test.dart @@ -173,7 +173,7 @@ class ReactiveLoginExtendedOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static LoginExtendedOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -233,7 +233,7 @@ class LoginExtendedOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/login_extended_test.dart b/packages/generator_tests/test/doc/login_extended_test.dart index 937e824c..00492194 100644 --- a/packages/generator_tests/test/doc/login_extended_test.dart +++ b/packages/generator_tests/test/doc/login_extended_test.dart @@ -168,7 +168,7 @@ class ReactiveLoginExtendedForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static LoginExtendedForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -228,7 +228,7 @@ class LoginExtendedFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/login_output_test.dart b/packages/generator_tests/test/doc/login_output_test.dart index ca999613..1d4348dc 100644 --- a/packages/generator_tests/test/doc/login_output_test.dart +++ b/packages/generator_tests/test/doc/login_output_test.dart @@ -134,7 +134,7 @@ class ReactiveLoginOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static LoginOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -188,7 +188,7 @@ class LoginOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/login_test.dart b/packages/generator_tests/test/doc/login_test.dart index c7c2404c..eb6e186a 100644 --- a/packages/generator_tests/test/doc/login_test.dart +++ b/packages/generator_tests/test/doc/login_test.dart @@ -118,7 +118,7 @@ class ReactiveLoginForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static LoginForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -172,7 +172,7 @@ class LoginFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 81b411eb..0028e0df 100644 --- a/packages/generator_tests/test/doc/mailing_list_output_test.dart +++ b/packages/generator_tests/test/doc/mailing_list_output_test.dart @@ -112,7 +112,7 @@ class ReactiveMailingListOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static MailingListOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -172,7 +172,7 @@ class MailingListOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/mailing_list_test.dart b/packages/generator_tests/test/doc/mailing_list_test.dart index 3889a81c..104c96d4 100644 --- a/packages/generator_tests/test/doc/mailing_list_test.dart +++ b/packages/generator_tests/test/doc/mailing_list_test.dart @@ -112,7 +112,7 @@ class ReactiveMailingListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static MailingListForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -171,7 +171,7 @@ class MailingListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 0dd99adf..ea4ad20e 100644 --- a/packages/generator_tests/test/doc/nested_generics_output_test.dart +++ b/packages/generator_tests/test/doc/nested_generics_output_test.dart @@ -136,7 +136,7 @@ class ReactiveProductDetailsOForm

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

( BuildContext context, { @@ -202,7 +202,7 @@ class ProductDetailsOFormBuilder

final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1472,7 +1472,7 @@ class ReactiveIdOForm

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

( BuildContext context, { @@ -1533,7 +1533,7 @@ class IdOFormBuilder

extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/nested_generics_test.dart b/packages/generator_tests/test/doc/nested_generics_test.dart index 3421bbd4..f79224fe 100644 --- a/packages/generator_tests/test/doc/nested_generics_test.dart +++ b/packages/generator_tests/test/doc/nested_generics_test.dart @@ -136,7 +136,7 @@ class ReactiveProductDetailsForm

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

( BuildContext context, { @@ -202,7 +202,7 @@ class ProductDetailsFormBuilder

final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1441,7 +1441,7 @@ class ReactiveIdForm

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

( BuildContext context, { @@ -1502,7 +1502,7 @@ class IdFormBuilder

extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 59dc1940..d204d759 100644 --- a/packages/generator_tests/test/doc/profile_output_test.dart +++ b/packages/generator_tests/test/doc/profile_output_test.dart @@ -349,7 +349,7 @@ class ReactiveProfileOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static ProfileOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -406,7 +406,7 @@ class ProfileOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/profile_test.dart b/packages/generator_tests/test/doc/profile_test.dart index 8ee31ad7..800db34e 100644 --- a/packages/generator_tests/test/doc/profile_test.dart +++ b/packages/generator_tests/test/doc/profile_test.dart @@ -344,7 +344,7 @@ class ReactiveProfileForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static ProfileForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -400,7 +400,7 @@ class ProfileFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 014c9aaa..4f3b121a 100644 --- a/packages/generator_tests/test/doc/renamed_basic_output_test.dart +++ b/packages/generator_tests/test/doc/renamed_basic_output_test.dart @@ -109,7 +109,7 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static SomeWiredNameForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -169,7 +169,7 @@ class SomeWiredNameFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/renamed_basic_test.dart b/packages/generator_tests/test/doc/renamed_basic_test.dart index b1795da5..941e403d 100644 --- a/packages/generator_tests/test/doc/renamed_basic_test.dart +++ b/packages/generator_tests/test/doc/renamed_basic_test.dart @@ -109,7 +109,7 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static SomeWiredNameForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -169,7 +169,7 @@ class SomeWiredNameFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 698c2c48..06c7e282 100644 --- a/packages/generator_tests/test/doc/user_profile_output_test.dart +++ b/packages/generator_tests/test/doc/user_profile_output_test.dart @@ -135,7 +135,7 @@ class ReactiveUserProfileOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static UserProfileOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -195,7 +195,7 @@ class UserProfileOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/generator_tests/test/doc/user_profile_test.dart b/packages/generator_tests/test/doc/user_profile_test.dart index 951b034b..b421b513 100644 --- a/packages/generator_tests/test/doc/user_profile_test.dart +++ b/packages/generator_tests/test/doc/user_profile_test.dart @@ -135,7 +135,7 @@ class ReactiveUserProfileForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static UserProfileForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -194,7 +194,7 @@ class UserProfileFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, diff --git a/packages/reactive_forms_annotations/CHANGELOG.md b/packages/reactive_forms_annotations/CHANGELOG.md index e258057f..30df6424 100644 --- a/packages/reactive_forms_annotations/CHANGELOG.md +++ b/packages/reactive_forms_annotations/CHANGELOG.md @@ -1,3 +1,7 @@ +## [8.1.0-beta2] + +* build 4 + ## [8.1.0-beta0] * build 3 diff --git a/packages/reactive_forms_annotations/pubspec.yaml b/packages/reactive_forms_annotations/pubspec.yaml index 53274a6e..4c9fa644 100644 --- a/packages/reactive_forms_annotations/pubspec.yaml +++ b/packages/reactive_forms_annotations/pubspec.yaml @@ -2,7 +2,7 @@ name: reactive_forms_annotations description: Annotations for reactive_forms_generator repository: https://github.com/artflutter/reactive_forms_generator -version: 8.1.0-beta0 +version: 8.1.0-beta2 environment: sdk: ">=3.8.0 <4.0.0" diff --git a/packages/reactive_forms_generator/CHANGELOG.md b/packages/reactive_forms_generator/CHANGELOG.md index e706e4ae..1990038a 100644 --- a/packages/reactive_forms_generator/CHANGELOG.md +++ b/packages/reactive_forms_generator/CHANGELOG.md @@ -1,3 +1,7 @@ +## [8.1.0-beta2] + +* build 4 + ## [8.1.0-beta0] * build 3 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 328fb9cf..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 @@ -63,7 +63,7 @@ class ReactiveAnimatedUrlListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static AnimatedUrlListForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class AnimatedUrlListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 8a8f2626..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 @@ -63,7 +63,7 @@ class ReactiveAnimatedUrlLisOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static AnimatedUrlLisOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class AnimatedUrlLisOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1040,7 +1040,6 @@ class UrlEntityOForm implements FormModel { @Rf(output: true) class AnimatedUrlLisOOutput { final List urlList; - AnimatedUrlLisOOutput({@RfArray() required this.urlList}); } @@ -1048,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 31f33f1d..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 @@ -63,7 +63,7 @@ class ReactiveAnnotatelessForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static AnnotatelessForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class AnnotatelessFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 5d3e5a57..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 @@ -63,7 +63,7 @@ class ReactiveAnnotatelessOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static AnnotatelessOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class AnnotatelessOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 3612889a..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 @@ -63,7 +63,7 @@ class ReactiveArrayNullableForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static ArrayNullableForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class ArrayNullableFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 5e41ec32..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 @@ -63,7 +63,7 @@ class ReactiveArrayNullableOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static ArrayNullableOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class ArrayNullableOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 385be965..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 @@ -63,7 +63,7 @@ class ReactiveMSICreateForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static MSICreateForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -120,7 +120,7 @@ class MSICreateFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 384ea161..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 @@ -63,7 +63,7 @@ class ReactiveDeliveryListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static DeliveryListForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class DeliveryListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -2456,7 +2456,7 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static StandaloneDeliveryPointForm? of( BuildContext context, { @@ -2519,7 +2519,7 @@ class StandaloneDeliveryPointFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 fa636ef7..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 @@ -63,7 +63,7 @@ class ReactiveDeliveryListOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static DeliveryListOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class DeliveryListOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -2514,7 +2514,7 @@ class ReactiveStandaloneDeliveryPointForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static StandaloneDeliveryPointForm? of( BuildContext context, { @@ -2577,7 +2577,7 @@ class StandaloneDeliveryPointFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 b61b88b1..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 @@ -63,7 +63,7 @@ class ReactiveFreezedClassForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static FreezedClassForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class FreezedClassFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 2f5a8450..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 @@ -63,7 +63,7 @@ class ReactiveFreezedClassOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static FreezedClassOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class FreezedClassOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 5cb1181f..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 @@ -56,7 +56,7 @@ class ReactiveTestForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static TestForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -110,7 +110,7 @@ class TestFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function(BuildContext context, TestForm formModel, Widget? child) builder; 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 264dd946..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 @@ -60,7 +60,7 @@ class ReactiveTagsForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static TagsForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -116,7 +116,7 @@ class TagsFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 50d874ba..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 @@ -60,7 +60,7 @@ class ReactiveTagsOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static TagsOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -117,7 +117,7 @@ class TagsOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 2aed5b4d..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 @@ -64,7 +64,7 @@ class ReactiveStatusListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static StatusListForm? of( BuildContext context, { @@ -127,7 +127,7 @@ class StatusListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 45bcdc51..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 @@ -64,7 +64,7 @@ class ReactiveStatusListOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static StatusListOForm? of( BuildContext context, { @@ -127,7 +127,7 @@ class StatusListOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 28999c6f..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 @@ -60,7 +60,7 @@ class ReactiveGroupForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static GroupForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -114,7 +114,7 @@ class GroupFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 d2a69b0b..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 @@ -63,7 +63,7 @@ class ReactiveGroupOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static GroupOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -117,7 +117,7 @@ class GroupOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 b7666740..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 @@ -60,7 +60,7 @@ class ReactiveLoginForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static LoginForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -114,7 +114,7 @@ class LoginFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 8102aa62..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 @@ -63,7 +63,7 @@ class ReactiveLoginOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static LoginOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -117,7 +117,7 @@ class LoginOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 c4e94be1..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 @@ -63,7 +63,7 @@ class ReactiveLoginExtendedForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static LoginExtendedForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class LoginExtendedFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 d9a1e8cd..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 @@ -63,7 +63,7 @@ class ReactiveLoginExtendedOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static LoginExtendedOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class LoginExtendedOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 862dc653..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 @@ -64,7 +64,7 @@ class ReactiveLoginExtendedNullableForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static LoginExtendedNullableForm? of( BuildContext context, { @@ -127,7 +127,7 @@ class LoginExtendedNullableFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 8472a885..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 @@ -64,7 +64,7 @@ class ReactiveLoginExtendedNullableOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static LoginExtendedNullableOForm? of( BuildContext context, { @@ -127,7 +127,7 @@ class LoginExtendedNullableOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 68a20b8d..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 @@ -63,7 +63,7 @@ class ReactiveMailingListForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static MailingListForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -122,7 +122,7 @@ class MailingListFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 cf4eba26..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 @@ -63,7 +63,7 @@ class ReactiveMailingListOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static MailingListOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class MailingListOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 95626989..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 @@ -63,7 +63,7 @@ class ReactiveModelExtendsForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static ModelExtendsForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class ModelExtendsFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 2ccddf02..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 @@ -63,7 +63,7 @@ class ReactiveModelImplementsForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static ModelImplementsForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class ModelImplementsFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 0a6e11f4..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 @@ -63,7 +63,7 @@ class ReactiveSubGroupForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static SubGroupForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -120,7 +120,7 @@ class SubGroupFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -771,7 +771,7 @@ class ReactiveGroupForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static GroupForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -825,7 +825,7 @@ class GroupFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1673,7 +1673,7 @@ class ReactiveNestedForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static NestedForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -1727,7 +1727,7 @@ class NestedFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 78975a3f..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 @@ -63,7 +63,7 @@ class ReactiveSubGroupOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static SubGroupOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -120,7 +120,7 @@ class SubGroupOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -809,7 +809,7 @@ class ReactiveGroupOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static GroupOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -863,7 +863,7 @@ class GroupOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1716,7 +1716,7 @@ class ReactiveNestedOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static NestedOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -1772,7 +1772,7 @@ class NestedOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 9880ba41..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 @@ -66,7 +66,7 @@ class ReactiveProductDetailsForm

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

( BuildContext context, { @@ -132,7 +132,7 @@ class ProductDetailsFormBuilder

final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1371,7 +1371,7 @@ class ReactiveIdForm

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

( BuildContext context, { @@ -1432,7 +1432,7 @@ class IdFormBuilder

extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 8c313f35..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 @@ -66,7 +66,7 @@ class ReactiveProductDetailsOForm

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

( BuildContext context, { @@ -132,7 +132,7 @@ class ProductDetailsOFormBuilder

final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, @@ -1402,7 +1402,7 @@ class ReactiveIdOForm

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

( BuildContext context, { @@ -1463,7 +1463,7 @@ class IdOFormBuilder

extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 b27a82ab..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 @@ -63,7 +63,7 @@ class ReactiveProfileForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static ProfileForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -119,7 +119,7 @@ class ProfileFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 bda3287f..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 @@ -63,7 +63,7 @@ class ReactiveProfileOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static ProfileOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -120,7 +120,7 @@ class ProfileOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 d660ee14..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 @@ -63,7 +63,7 @@ class ReactiveSecuredAreaForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static SecuredAreaForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -122,7 +122,7 @@ class SecuredAreaFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 040a00b2..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 @@ -63,7 +63,7 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static SomeWiredNameForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class SomeWiredNameFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 283a13dc..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 @@ -63,7 +63,7 @@ class ReactiveSomeWiredNameForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static SomeWiredNameForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class SomeWiredNameFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 09ca95af..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 @@ -63,7 +63,7 @@ class ReactiveUserProfileForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static UserProfileForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -122,7 +122,7 @@ class UserProfileFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 39f80c53..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 @@ -63,7 +63,7 @@ class ReactiveUserProfileOForm extends StatelessWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; static UserProfileOForm? of(BuildContext context, {bool listen = true}) { if (listen) { @@ -123,7 +123,7 @@ class UserProfileOFormBuilder extends StatefulWidget { final bool Function(FormGroup formGroup)? canPop; final ReactiveFormPopInvokedWithResultCallback? - onPopInvokedWithResult; + onPopInvokedWithResult; final Widget Function( BuildContext context, 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 401511cf..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 @@ -43,7 +43,7 @@ class ReactiveForm { ..named = true, ), Parameter( - (b) => b + (b) => b ..name = 'onPopInvokedWithResult' ..toThis = true ..named = true, @@ -82,11 +82,12 @@ class ReactiveForm { ..type = const Reference('bool Function(FormGroup formGroup)?'), ), Field( - (b) => b + (b) => b ..name = 'onPopInvokedWithResult' ..modifier = FieldModifier.final$ ..type = const Reference( - 'ReactiveFormPopInvokedWithResultCallback?'), + 'ReactiveFormPopInvokedWithResultCallback?', + ), ), ]) ..methods.addAll([ 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 ebce6f07..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 @@ -116,11 +116,12 @@ class ReactiveFormBuilder { ..modifier = FieldModifier.final$, ), Field( - (b) => b + (b) => b ..name = 'onPopInvokedWithResult' ..modifier = FieldModifier.final$ ..type = const Reference( - 'ReactiveFormPopInvokedWithResultCallback?'), + 'ReactiveFormPopInvokedWithResultCallback?', + ), ), Field( (b) => b diff --git a/packages/reactive_forms_generator/pubspec.yaml b/packages/reactive_forms_generator/pubspec.yaml index f02480dc..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: 8.1.0-beta0 +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: From 484313b8a6f6be7c5f8869f6aab29ddbd1e09473 Mon Sep 17 00:00:00 2001 From: Vasiliy Ditsyak Date: Tue, 24 Mar 2026 10:07:00 +0100 Subject: [PATCH 3/3] errors fix --- .../doc/animated_url_list_output_test.dart | 6 +- .../test/doc/animated_url_list_test.dart | 6 +- .../test/doc/annotateless_output_test.dart | 4 +- .../test/doc/annotateless_test.dart | 4 +- .../test/doc/array_nullable_output_test.dart | 11 +- .../test/doc/array_nullable_test.dart | 13 +- .../test/doc/create_output_test.dart | 41 +- .../test/doc/delivery_list_output_test.dart | 22 +- .../test/doc/delivery_list_test.dart | 22 +- .../test/doc/freezed_class_output_test.dart | 18 +- .../test/doc/freezed_class_test.dart | 12 +- .../test/doc/generic_output_test.dart | 2 +- .../doc/generic_status_list_output_test.dart | 2 +- .../test/doc/generic_status_list_test.dart | 2 +- .../test/doc/generic_test.dart | 2 +- .../test/doc/group_output_test.dart | 22 +- .../generator_tests/test/doc/group_test.dart | 22 +- .../login_extended_nullable_output_test.dart | 14 +- .../doc/login_extended_nullable_test.dart | 14 +- .../test/doc/login_extended_output_test.dart | 20 +- .../test/doc/login_extended_test.dart | 18 +- .../test/doc/login_output_test.dart | 4 +- .../generator_tests/test/doc/login_test.dart | 4 +- .../test/doc/mailing_list_output_test.dart | 2 +- .../test/doc/mailing_list_test.dart | 2 +- .../test/doc/nested_generics_output_test.dart | 8 +- .../test/doc/nested_generics_test.dart | 8 +- .../test/doc/nested_output.test.dart | 8 +- .../test/doc/profile_output_test.dart | 40 +- .../test/doc/profile_test.dart | 40 +- .../test/doc/recursive_test.dart | 14 +- .../test/doc/renamed_basic_output_test.dart | 4 +- .../test/doc/renamed_basic_test.dart | 4 +- .../test/doc/user_profile_output_test.dart | 16 +- .../test/doc/user_profile_test.dart | 16 +- .../reactive_forms_annotations/pubspec.yaml | 4 +- .../animated_url_list.gform.dart | 6 +- .../animated_url_list_output.gform.dart | 6 +- .../docs/annotateless/annotateless.gform.dart | 4 +- .../annotateless_output.gform.dart | 4 +- .../array_nullable/array_nullable.gform.dart | 13 +- .../array_nullable_output.gform.dart | 11 +- .../lib/docs/create/create_output.gform.dart | 41 +- .../delivery_list/delivery_list.gform.dart | 22 +- .../delivery_list_output.gform.dart | 22 +- .../lib/docs/freezed/freezed_class.gform.dart | 12 +- .../freezed/freezed_class_output.gform.dart | 18 +- .../example/lib/docs/freezed2/test.gform.dart | 4 +- .../lib/docs/generic/generic.gform.dart | 2 +- .../docs/generic/generic_output.gform.dart | 2 +- .../generic_status_list.gform.dart | 2 +- .../generic_status_list_output.gform.dart | 2 +- .../example/lib/docs/group/group.gform.dart | 22 +- .../lib/docs/group/group_output.gform.dart | 22 +- .../example/lib/docs/issue_203/issue_203.dart | 19 + .../lib/docs/issue_203/issue_203.gform.dart | 1021 +++++++++++++++++ .../example/lib/docs/login/login.gform.dart | 4 +- .../lib/docs/login/login_output.gform.dart | 4 +- .../login_extended/login_extended.gform.dart | 18 +- .../login_extended_output.gform.dart | 20 +- .../login_extended_nullable.gform.dart | 14 +- .../login_extended_nullable_output.gform.dart | 14 +- .../docs/mailing_list/mailing_list.gform.dart | 2 +- .../mailing_list_output.gform.dart | 2 +- .../model_extends/model_extends.gform.dart | 4 +- .../model_implements.gform.dart | 4 +- .../example/lib/docs/nested/nested.gform.dart | 8 +- .../lib/docs/nested/nested_output.gform.dart | 8 +- .../nested_generics.gform.dart | 8 +- .../nested_generics_output.gform.dart | 8 +- .../lib/docs/profile/profile.gform.dart | 40 +- .../docs/profile/profile_output.gform.dart | 40 +- .../lib/docs/recursive/recursive.gform.dart | 14 +- .../renamed_basic/renamed_basic.gform.dart | 4 +- .../renamed_basic_output.gform.dart | 4 +- .../docs/user_profile/user_profile.gform.dart | 16 +- .../user_profile_output.gform.dart | 16 +- .../example/pubspec.yaml | 4 +- .../errors_method.dart | 2 +- .../reactive_forms_generator/pubspec.yaml | 2 +- pubspec.lock | 28 +- 81 files changed, 1516 insertions(+), 478 deletions(-) create mode 100644 packages/reactive_forms_generator/example/lib/docs/issue_203/issue_203.dart create mode 100644 packages/reactive_forms_generator/example/lib/docs/issue_203/issue_203.gform.dart 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 431fd35e..e5f771b4 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 @@ -314,7 +314,7 @@ class AnimatedUrlLisOForm } } - Map get urlListErrors => urlListControl.errors; + Map get urlListErrors => urlListControl.errors; void get urlListFocus => form.focus(urlListControlPath()); @@ -721,9 +721,9 @@ class UrlEntityOForm implements FormModel { } } - Map? get labelErrors => labelControl.errors; + Map? get labelErrors => labelControl.errors; - Map? get urlErrors => urlControl.errors; + Map? get urlErrors => urlControl.errors; void get labelFocus => form.focus(labelControlPath()); 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 9fa6a62a..e99d5e9e 100644 --- a/packages/generator_tests/test/doc/animated_url_list_test.dart +++ b/packages/generator_tests/test/doc/animated_url_list_test.dart @@ -314,7 +314,7 @@ class AnimatedUrlListForm } } - Map get urlListErrors => urlListControl.errors; + Map get urlListErrors => urlListControl.errors; void get urlListFocus => form.focus(urlListControlPath()); @@ -720,9 +720,9 @@ class UrlEntityForm implements FormModel { } } - Map get labelErrors => labelControl.errors; + Map get labelErrors => labelControl.errors; - Map get urlErrors => urlControl.errors; + Map get urlErrors => urlControl.errors; void get labelFocus => form.focus(labelControlPath()); diff --git a/packages/generator_tests/test/doc/annotateless_output_test.dart b/packages/generator_tests/test/doc/annotateless_output_test.dart index 15f37e5c..daba54fc 100644 --- a/packages/generator_tests/test/doc/annotateless_output_test.dart +++ b/packages/generator_tests/test/doc/annotateless_output_test.dart @@ -319,9 +319,9 @@ class AnnotatelessOForm } } - Map get emailErrors => emailControl.errors; + Map get emailErrors => emailControl.errors; - Map get passwordErrors => passwordControl.errors; + Map get passwordErrors => passwordControl.errors; void get emailFocus => form.focus(emailControlPath()); diff --git a/packages/generator_tests/test/doc/annotateless_test.dart b/packages/generator_tests/test/doc/annotateless_test.dart index ec1efbf6..93256827 100644 --- a/packages/generator_tests/test/doc/annotateless_test.dart +++ b/packages/generator_tests/test/doc/annotateless_test.dart @@ -315,9 +315,9 @@ class AnnotatelessForm implements FormModel { } } - Map get emailErrors => emailControl.errors; + Map get emailErrors => emailControl.errors; - Map get passwordErrors => passwordControl.errors; + Map get passwordErrors => passwordControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 1bb47df1..4895f598 100644 --- a/packages/generator_tests/test/doc/array_nullable_output_test.dart +++ b/packages/generator_tests/test/doc/array_nullable_output_test.dart @@ -396,15 +396,16 @@ class ArrayNullableOForm } } - Map? get someListErrors => someListControl.errors; + Map? get someListErrors => someListControl.errors; - Map get emailListErrors => emailListControl.errors; + Map get emailListErrors => emailListControl.errors; - Map get fruitListErrors => fruitListControl.errors; + Map get fruitListErrors => fruitListControl.errors; - Map? get vegetablesListErrors => vegetablesListControl.errors; + Map? get vegetablesListErrors => + vegetablesListControl.errors; - Map? get modeListErrors => modeListControl.errors; + Map? get modeListErrors => modeListControl.errors; void get someListFocus => form.focus(someListControlPath()); diff --git a/packages/generator_tests/test/doc/array_nullable_test.dart b/packages/generator_tests/test/doc/array_nullable_test.dart index 4a0d77cc..9a5e5696 100644 --- a/packages/generator_tests/test/doc/array_nullable_test.dart +++ b/packages/generator_tests/test/doc/array_nullable_test.dart @@ -418,18 +418,19 @@ class ArrayNullableForm implements FormModel { } } - Map? get someListErrors => someListControl.errors; + Map? get someListErrors => someListControl.errors; - Map get someListRequiredErrors => + Map get someListRequiredErrors => someListRequiredControl.errors; - Map get emailListErrors => emailListControl.errors; + Map get emailListErrors => emailListControl.errors; - Map get fruitListErrors => fruitListControl.errors; + Map get fruitListErrors => fruitListControl.errors; - Map? get vegetablesListErrors => vegetablesListControl.errors; + Map? get vegetablesListErrors => + vegetablesListControl.errors; - Map? get modeListErrors => modeListControl.errors; + Map? get modeListErrors => modeListControl.errors; void get someListFocus => form.focus(someListControlPath()); diff --git a/packages/generator_tests/test/doc/create_output_test.dart b/packages/generator_tests/test/doc/create_output_test.dart index 6344fbce..f23e45d2 100644 --- a/packages/generator_tests/test/doc/create_output_test.dart +++ b/packages/generator_tests/test/doc/create_output_test.dart @@ -520,26 +520,27 @@ class MSICreateForm implements FormModel { } } - Map? get idErrors => idControl.errors; + Map? get idErrors => idControl.errors; - Map? get businessNumberErrors => businessNumberControl.errors; + Map? get businessNumberErrors => + businessNumberControl.errors; - Map? get fileIdsErrors => fileIdsControl.errors; + Map? get fileIdsErrors => fileIdsControl.errors; - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; - Map get sameMailingAddressAsCompanyErrors => + Map get sameMailingAddressAsCompanyErrors => sameMailingAddressAsCompanyControl.errors; - Map get companyAddressErrors => companyAddressControl.errors; + Map get companyAddressErrors => companyAddressControl.errors; - Map get primaryContactErrors => primaryContactControl.errors; + Map get primaryContactErrors => primaryContactControl.errors; - Map get mailingAddressErrors => mailingAddressControl.errors; + Map get mailingAddressErrors => mailingAddressControl.errors; - Map get adminsErrors => adminsControl.errors; + Map get adminsErrors => adminsControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1749,14 +1750,14 @@ class AddressForm implements FormModel { } } - Map? get streetErrors => streetControl.errors; + Map? get streetErrors => streetControl.errors; - Map? get cityErrors => cityControl.errors; + Map? get cityErrors => cityControl.errors; - Map? get stateOrProvinceErrors => + Map? get stateOrProvinceErrors => stateOrProvinceControl.errors; - Map? get zipCodeErrors => zipCodeControl.errors; + Map? get zipCodeErrors => zipCodeControl.errors; void get streetFocus => form.focus(streetControlPath()); @@ -2389,11 +2390,11 @@ class PrimaryContactForm } } - Map? get fullNameErrors => fullNameControl.errors; + Map? get fullNameErrors => fullNameControl.errors; - Map? get jobTitleErrors => jobTitleControl.errors; + Map? get jobTitleErrors => jobTitleControl.errors; - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; void get fullNameFocus => form.focus(fullNameControlPath()); @@ -2932,11 +2933,11 @@ class AdminContactInformationForm } } - Map? get firstNameErrors => firstNameControl.errors; + Map? get firstNameErrors => firstNameControl.errors; - Map? get lastNameErrors => lastNameControl.errors; + Map? get lastNameErrors => lastNameControl.errors; - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; void get firstNameFocus => form.focus(firstNameControlPath()); 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 c0e6da54..d436bfd6 100644 --- a/packages/generator_tests/test/doc/delivery_list_output_test.dart +++ b/packages/generator_tests/test/doc/delivery_list_output_test.dart @@ -378,9 +378,9 @@ class DeliveryListOForm } } - Map get deliveryListErrors => deliveryListControl.errors; + Map get deliveryListErrors => deliveryListControl.errors; - Map? get clientListErrors => clientListControl.errors; + Map? get clientListErrors => clientListControl.errors; void get deliveryListFocus => form.focus(deliveryListControlPath()); @@ -1003,9 +1003,9 @@ class DeliveryPointOForm } } - Map get nameErrors => nameControl.errors; + Map get nameErrors => nameControl.errors; - Map? get addressErrors => addressControl.errors; + Map? get addressErrors => addressControl.errors; void get nameFocus => form.focus(nameControlPath()); @@ -1393,9 +1393,9 @@ class AddressOForm implements FormModel { } } - Map? get streetErrors => streetControl.errors; + Map? get streetErrors => streetControl.errors; - Map? get cityErrors => cityControl.errors; + Map? get cityErrors => cityControl.errors; void get streetFocus => form.focus(streetControlPath()); @@ -1827,11 +1827,11 @@ class ClientOForm implements FormModel { } } - Map get clientTypeErrors => clientTypeControl.errors; + Map get clientTypeErrors => clientTypeControl.errors; - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; - Map? get notesErrors => notesControl.errors; + Map? get notesErrors => notesControl.errors; void get clientTypeFocus => form.focus(clientTypeControlPath()); @@ -2836,9 +2836,9 @@ class StandaloneDeliveryPointForm } } - Map get nameErrors => nameControl.errors; + Map get nameErrors => nameControl.errors; - Map? get addressErrors => addressControl.errors; + Map? get addressErrors => addressControl.errors; void get nameFocus => form.focus(nameControlPath()); diff --git a/packages/generator_tests/test/doc/delivery_list_test.dart b/packages/generator_tests/test/doc/delivery_list_test.dart index 51bf1fa6..f5acd682 100644 --- a/packages/generator_tests/test/doc/delivery_list_test.dart +++ b/packages/generator_tests/test/doc/delivery_list_test.dart @@ -369,9 +369,9 @@ class DeliveryListForm implements FormModel { } } - Map get deliveryListErrors => deliveryListControl.errors; + Map get deliveryListErrors => deliveryListControl.errors; - Map? get clientListErrors => clientListControl.errors; + Map? get clientListErrors => clientListControl.errors; void get deliveryListFocus => form.focus(deliveryListControlPath()); @@ -991,9 +991,9 @@ class DeliveryPointForm implements FormModel { } } - Map get nameErrors => nameControl.errors; + Map get nameErrors => nameControl.errors; - Map? get addressErrors => addressControl.errors; + Map? get addressErrors => addressControl.errors; void get nameFocus => form.focus(nameControlPath()); @@ -1380,9 +1380,9 @@ class AddressForm implements FormModel { } } - Map? get streetErrors => streetControl.errors; + Map? get streetErrors => streetControl.errors; - Map? get cityErrors => cityControl.errors; + Map? get cityErrors => cityControl.errors; void get streetFocus => form.focus(streetControlPath()); @@ -1813,11 +1813,11 @@ class ClientForm implements FormModel { } } - Map get clientTypeErrors => clientTypeControl.errors; + Map get clientTypeErrors => clientTypeControl.errors; - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; - Map? get notesErrors => notesControl.errors; + Map? get notesErrors => notesControl.errors; void get clientTypeFocus => form.focus(clientTypeControlPath()); @@ -2769,9 +2769,9 @@ class StandaloneDeliveryPointForm } } - Map get nameErrors => nameControl.errors; + Map get nameErrors => nameControl.errors; - Map? get addressErrors => addressControl.errors; + Map? get addressErrors => addressControl.errors; void get nameFocus => form.focus(nameControlPath()); 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 7603af44..467fb533 100644 --- a/packages/generator_tests/test/doc/freezed_class_output_test.dart +++ b/packages/generator_tests/test/doc/freezed_class_output_test.dart @@ -453,23 +453,23 @@ class FreezedClassOForm } } - Map? get genderErrors => genderControl.errors; + Map? get genderErrors => genderControl.errors; - Map? get genderRErrors => genderRControl.errors; + Map? get genderRErrors => genderRControl.errors; - Map? get idErrors => idControl.errors; + Map? get idErrors => idControl.errors; - Map? get idRErrors => idRControl.errors; + Map? get idRErrors => idRControl.errors; - Map get idR2Errors => idR2Control.errors; + Map get idR2Errors => idR2Control.errors; - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; - Map? get logoImageErrors => logoImageControl.errors; + Map? get logoImageErrors => logoImageControl.errors; - Map? get yearErrors => yearControl.errors; + Map? get yearErrors => yearControl.errors; - Map get selectedSpacesErrors => selectedSpacesControl.errors; + Map get selectedSpacesErrors => selectedSpacesControl.errors; void get genderFocus => form.focus(genderControlPath()); diff --git a/packages/generator_tests/test/doc/freezed_class_test.dart b/packages/generator_tests/test/doc/freezed_class_test.dart index 44c5986b..189a0577 100644 --- a/packages/generator_tests/test/doc/freezed_class_test.dart +++ b/packages/generator_tests/test/doc/freezed_class_test.dart @@ -400,17 +400,17 @@ class FreezedClassForm implements FormModel { } } - Map? get genderErrors => genderControl.errors; + Map? get genderErrors => genderControl.errors; - Map? get idErrors => idControl.errors; + Map? get idErrors => idControl.errors; - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; - Map? get logoImageErrors => logoImageControl.errors; + Map? get logoImageErrors => logoImageControl.errors; - Map? get yearErrors => yearControl.errors; + Map? get yearErrors => yearControl.errors; - Map get selectedSpacesErrors => selectedSpacesControl.errors; + Map get selectedSpacesErrors => selectedSpacesControl.errors; void get genderFocus => form.focus(genderControlPath()); diff --git a/packages/generator_tests/test/doc/generic_output_test.dart b/packages/generator_tests/test/doc/generic_output_test.dart index d3559256..8a16869a 100644 --- a/packages/generator_tests/test/doc/generic_output_test.dart +++ b/packages/generator_tests/test/doc/generic_output_test.dart @@ -287,7 +287,7 @@ class TagsOForm implements FormModel, TagsOOutput> { } } - Map? get tagsErrors => tagsControl.errors; + Map? get tagsErrors => tagsControl.errors; void get tagsFocus => form.focus(tagsControlPath()); 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 d366b262..8a7ef3db 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 @@ -299,7 +299,7 @@ class StatusListOForm } } - Map get listErrors => listControl.errors; + Map get listErrors => listControl.errors; void get listFocus => form.focus(listControlPath()); 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 79e0f29c..3868b7cd 100644 --- a/packages/generator_tests/test/doc/generic_status_list_test.dart +++ b/packages/generator_tests/test/doc/generic_status_list_test.dart @@ -299,7 +299,7 @@ class StatusListForm } } - Map get listErrors => listControl.errors; + Map get listErrors => listControl.errors; void get listFocus => form.focus(listControlPath()); diff --git a/packages/generator_tests/test/doc/generic_test.dart b/packages/generator_tests/test/doc/generic_test.dart index a81436ed..a0b99ad1 100644 --- a/packages/generator_tests/test/doc/generic_test.dart +++ b/packages/generator_tests/test/doc/generic_test.dart @@ -286,7 +286,7 @@ class TagsForm implements FormModel, Tags> { } } - Map? get tagsErrors => tagsControl.errors; + Map? get tagsErrors => tagsControl.errors; void get tagsFocus => form.focus(tagsControlPath()); diff --git a/packages/generator_tests/test/doc/group_output_test.dart b/packages/generator_tests/test/doc/group_output_test.dart index c9627dc4..032302ad 100644 --- a/packages/generator_tests/test/doc/group_output_test.dart +++ b/packages/generator_tests/test/doc/group_output_test.dart @@ -387,13 +387,13 @@ class GroupOForm implements FormModel { } } - Map? get personalErrors => personalControl.errors; + Map? get personalErrors => personalControl.errors; - Map? get phoneErrors => phoneControl.errors; + Map? get phoneErrors => phoneControl.errors; - Map? get addressErrors => addressControl.errors; + Map? get addressErrors => addressControl.errors; - Map? get address2Errors => address2Control.errors; + Map? get address2Errors => address2Control.errors; void get personalFocus => form.focus(personalControlPath()); @@ -986,9 +986,9 @@ class PersonalOForm implements FormModel { } } - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; void get nameFocus => form.focus(nameControlPath()); @@ -1407,9 +1407,9 @@ class PhoneOForm implements FormModel { } } - Map? get phoneNumberErrors => phoneNumberControl.errors; + Map? get phoneNumberErrors => phoneNumberControl.errors; - Map? get countryIsoErrors => countryIsoControl.errors; + Map? get countryIsoErrors => countryIsoControl.errors; void get phoneNumberFocus => form.focus(phoneNumberControlPath()); @@ -1847,11 +1847,11 @@ class AddressOForm implements FormModel { } } - Map? get streetErrors => streetControl.errors; + Map? get streetErrors => streetControl.errors; - Map? get cityErrors => cityControl.errors; + Map? get cityErrors => cityControl.errors; - Map? get zipErrors => zipControl.errors; + Map? get zipErrors => zipControl.errors; void get streetFocus => form.focus(streetControlPath()); diff --git a/packages/generator_tests/test/doc/group_test.dart b/packages/generator_tests/test/doc/group_test.dart index cf5ba5b1..f2fc81d7 100644 --- a/packages/generator_tests/test/doc/group_test.dart +++ b/packages/generator_tests/test/doc/group_test.dart @@ -381,13 +381,13 @@ class GroupForm implements FormModel { } } - Map? get personalErrors => personalControl.errors; + Map? get personalErrors => personalControl.errors; - Map? get phoneErrors => phoneControl.errors; + Map? get phoneErrors => phoneControl.errors; - Map? get addressErrors => addressControl.errors; + Map? get addressErrors => addressControl.errors; - Map? get address2Errors => address2Control.errors; + Map? get address2Errors => address2Control.errors; void get personalFocus => form.focus(personalControlPath()); @@ -975,9 +975,9 @@ class PersonalForm implements FormModel { } } - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; void get nameFocus => form.focus(nameControlPath()); @@ -1395,9 +1395,9 @@ class PhoneForm implements FormModel { } } - Map? get phoneNumberErrors => phoneNumberControl.errors; + Map? get phoneNumberErrors => phoneNumberControl.errors; - Map? get countryIsoErrors => countryIsoControl.errors; + Map? get countryIsoErrors => countryIsoControl.errors; void get phoneNumberFocus => form.focus(phoneNumberControlPath()); @@ -1828,11 +1828,11 @@ class AddressForm implements FormModel { } } - Map? get streetErrors => streetControl.errors; + Map? get streetErrors => streetControl.errors; - Map? get cityErrors => cityControl.errors; + Map? get cityErrors => cityControl.errors; - Map? get zipErrors => zipControl.errors; + Map? get zipErrors => zipControl.errors; void get streetFocus => form.focus(streetControlPath()); 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 169d9805..1792fa6f 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 @@ -433,19 +433,19 @@ class LoginExtendedNullableOForm } } - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; - Map? get passwordErrors => passwordControl.errors; + Map? get passwordErrors => passwordControl.errors; - Map? get rememberMeErrors => rememberMeControl.errors; + Map? get rememberMeErrors => rememberMeControl.errors; - Map? get themeErrors => themeControl.errors; + Map? get themeErrors => themeControl.errors; - Map? get modeErrors => modeControl.errors; + Map? get modeErrors => modeControl.errors; - Map? get timeoutErrors => timeoutControl.errors; + Map? get timeoutErrors => timeoutControl.errors; - Map? get heightErrors => heightControl.errors; + Map? get heightErrors => heightControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 b8c4ba45..2c6cd01a 100644 --- a/packages/generator_tests/test/doc/login_extended_nullable_test.dart +++ b/packages/generator_tests/test/doc/login_extended_nullable_test.dart @@ -433,19 +433,19 @@ class LoginExtendedNullableForm } } - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; - Map? get passwordErrors => passwordControl.errors; + Map? get passwordErrors => passwordControl.errors; - Map? get rememberMeErrors => rememberMeControl.errors; + Map? get rememberMeErrors => rememberMeControl.errors; - Map? get themeErrors => themeControl.errors; + Map? get themeErrors => themeControl.errors; - Map? get modeErrors => modeControl.errors; + Map? get modeErrors => modeControl.errors; - Map? get timeoutErrors => timeoutControl.errors; + Map? get timeoutErrors => timeoutControl.errors; - Map? get heightErrors => heightControl.errors; + Map? get heightErrors => heightControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 f4adf65f..8bf0f7ba 100644 --- a/packages/generator_tests/test/doc/login_extended_output_test.dart +++ b/packages/generator_tests/test/doc/login_extended_output_test.dart @@ -526,25 +526,25 @@ class LoginExtendedOForm } } - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; - Map get email2Errors => email2Control.errors; + Map get email2Errors => email2Control.errors; - Map get passwordErrors => passwordControl.errors; + Map get passwordErrors => passwordControl.errors; - Map get rememberMeErrors => rememberMeControl.errors; + Map get rememberMeErrors => rememberMeControl.errors; - Map get themeErrors => themeControl.errors; + Map get themeErrors => themeControl.errors; - Map get modeErrors => modeControl.errors; + Map get modeErrors => modeControl.errors; - Map get timeoutErrors => timeoutControl.errors; + Map get timeoutErrors => timeoutControl.errors; - Map get heightErrors => heightControl.errors; + Map get heightErrors => heightControl.errors; - Map? get unAnnotatedErrors => unAnnotatedControl.errors; + Map? get unAnnotatedErrors => unAnnotatedControl.errors; - Map get someIntListErrors => someIntListControl.errors; + Map get someIntListErrors => someIntListControl.errors; void get emailFocus => form.focus(emailControlPath()); diff --git a/packages/generator_tests/test/doc/login_extended_test.dart b/packages/generator_tests/test/doc/login_extended_test.dart index 00492194..6aba0296 100644 --- a/packages/generator_tests/test/doc/login_extended_test.dart +++ b/packages/generator_tests/test/doc/login_extended_test.dart @@ -503,23 +503,23 @@ class LoginExtendedForm implements FormModel { } } - Map get emailErrors => emailControl.errors; + Map get emailErrors => emailControl.errors; - Map get passwordErrors => passwordControl.errors; + Map get passwordErrors => passwordControl.errors; - Map get rememberMeErrors => rememberMeControl.errors; + Map get rememberMeErrors => rememberMeControl.errors; - Map get themeErrors => themeControl.errors; + Map get themeErrors => themeControl.errors; - Map get modeErrors => modeControl.errors; + Map get modeErrors => modeControl.errors; - Map get timeoutErrors => timeoutControl.errors; + Map get timeoutErrors => timeoutControl.errors; - Map get heightErrors => heightControl.errors; + Map get heightErrors => heightControl.errors; - Map? get unAnnotatedErrors => unAnnotatedControl.errors; + Map? get unAnnotatedErrors => unAnnotatedControl.errors; - Map get someIntListErrors => someIntListControl.errors; + Map get someIntListErrors => someIntListControl.errors; void get emailFocus => form.focus(emailControlPath()); diff --git a/packages/generator_tests/test/doc/login_output_test.dart b/packages/generator_tests/test/doc/login_output_test.dart index 1d4348dc..378d5020 100644 --- a/packages/generator_tests/test/doc/login_output_test.dart +++ b/packages/generator_tests/test/doc/login_output_test.dart @@ -336,9 +336,9 @@ class LoginOForm implements FormModel { } } - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; - Map? get passwordErrors => passwordControl.errors; + Map? get passwordErrors => passwordControl.errors; void get emailFocus => form.focus(emailControlPath()); diff --git a/packages/generator_tests/test/doc/login_test.dart b/packages/generator_tests/test/doc/login_test.dart index eb6e186a..06e96e7b 100644 --- a/packages/generator_tests/test/doc/login_test.dart +++ b/packages/generator_tests/test/doc/login_test.dart @@ -319,9 +319,9 @@ class LoginForm implements FormModel { } } - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; - Map get passwordErrors => passwordControl.errors; + Map get passwordErrors => passwordControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 0028e0df..6110f280 100644 --- a/packages/generator_tests/test/doc/mailing_list_output_test.dart +++ b/packages/generator_tests/test/doc/mailing_list_output_test.dart @@ -311,7 +311,7 @@ class MailingListOForm implements FormModel { } } - Map get emailListErrors => emailListControl.errors; + Map get emailListErrors => emailListControl.errors; void get emailListFocus => form.focus(emailListControlPath()); diff --git a/packages/generator_tests/test/doc/mailing_list_test.dart b/packages/generator_tests/test/doc/mailing_list_test.dart index 104c96d4..99fe08f3 100644 --- a/packages/generator_tests/test/doc/mailing_list_test.dart +++ b/packages/generator_tests/test/doc/mailing_list_test.dart @@ -309,7 +309,7 @@ class MailingListForm implements FormModel { } } - Map get emailListErrors => emailListControl.errors; + Map get emailListErrors => emailListControl.errors; void get emailListFocus => form.focus(emailListControlPath()); 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 ea4ad20e..84fc42a5 100644 --- a/packages/generator_tests/test/doc/nested_generics_output_test.dart +++ b/packages/generator_tests/test/doc/nested_generics_output_test.dart @@ -363,9 +363,9 @@ class ProductDetailsOForm

} } - Map? get descriptionErrors => descriptionControl.errors; + Map? get descriptionErrors => descriptionControl.errors; - Map? get idErrors => idControl.errors; + Map? get idErrors => idControl.errors; void get descriptionFocus => form.focus(descriptionControlPath()); @@ -783,9 +783,9 @@ class IdOForm

} } - Map? get companyNameErrors => companyNameControl.errors; + Map? get companyNameErrors => companyNameControl.errors; - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; void get companyNameFocus => form.focus(companyNameControlPath()); diff --git a/packages/generator_tests/test/doc/nested_generics_test.dart b/packages/generator_tests/test/doc/nested_generics_test.dart index f79224fe..4d8e31f2 100644 --- a/packages/generator_tests/test/doc/nested_generics_test.dart +++ b/packages/generator_tests/test/doc/nested_generics_test.dart @@ -360,9 +360,9 @@ class ProductDetailsForm

} } - Map? get descriptionErrors => descriptionControl.errors; + Map? get descriptionErrors => descriptionControl.errors; - Map? get idErrors => idControl.errors; + Map? get idErrors => idControl.errors; void get descriptionFocus => form.focus(descriptionControlPath()); @@ -776,9 +776,9 @@ class IdForm

} } - Map? get companyNameErrors => companyNameControl.errors; + Map? get companyNameErrors => companyNameControl.errors; - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; void get companyNameFocus => form.focus(companyNameControlPath()); diff --git a/packages/generator_tests/test/doc/nested_output.test.dart b/packages/generator_tests/test/doc/nested_output.test.dart index 964b0481..c86cd893 100644 --- a/packages/generator_tests/test/doc/nested_output.test.dart +++ b/packages/generator_tests/test/doc/nested_output.test.dart @@ -320,7 +320,7 @@ class SubGroupOForm implements FormModel { } } - Map get idErrors => idControl.errors; + Map get idErrors => idControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1077,9 +1077,9 @@ class GroupOForm implements FormModel { } } - Map get idErrors => idControl.errors; + Map get idErrors => idControl.errors; - Map get subGroupListErrors => subGroupListControl.errors; + Map get subGroupListErrors => subGroupListControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1973,7 +1973,7 @@ class NestedOForm implements FormModel { } } - Map get groupListErrors => groupListControl.errors; + Map get groupListErrors => groupListControl.errors; void get groupListFocus => form.focus(groupListControlPath()); diff --git a/packages/generator_tests/test/doc/profile_output_test.dart b/packages/generator_tests/test/doc/profile_output_test.dart index d204d759..1faf181f 100644 --- a/packages/generator_tests/test/doc/profile_output_test.dart +++ b/packages/generator_tests/test/doc/profile_output_test.dart @@ -702,28 +702,28 @@ class ProfileOForm implements FormModel { } } - Map get idErrors => idControl.errors; + Map get idErrors => idControl.errors; - Map get anotherIdErrors => anotherIdControl.errors; + Map get anotherIdErrors => anotherIdControl.errors; - Map get nameErrors => nameControl.errors; + Map get nameErrors => nameControl.errors; - Map get chartingOrderErrors => chartingOrderControl.errors; + Map get chartingOrderErrors => chartingOrderControl.errors; - Map get numberingStandardErrors => + Map get numberingStandardErrors => numberingStandardControl.errors; - Map get measurementTypeErrors => + Map get measurementTypeErrors => measurementTypeControl.errors; - Map get audioGuidanceErrors => audioGuidanceControl.errors; + Map get audioGuidanceErrors => audioGuidanceControl.errors; - Map get incidenceFilterErrors => + Map get incidenceFilterErrors => incidenceFilterControl.errors; - Map get thresholdErrors => thresholdControl.errors; + Map get thresholdErrors => thresholdControl.errors; - Map get timerErrors => timerControl.errors; + Map get timerErrors => timerControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1739,22 +1739,22 @@ class IncidenceFilterOForm } } - Map get isMobilityEnabledErrors => + Map get isMobilityEnabledErrors => isMobilityEnabledControl.errors; - Map get isFurcationEnabledErrors => + Map get isFurcationEnabledErrors => isFurcationEnabledControl.errors; - Map get isBleedingEnabledErrors => + Map get isBleedingEnabledErrors => isBleedingEnabledControl.errors; - Map get isSuppurationEnabledErrors => + Map get isSuppurationEnabledErrors => isSuppurationEnabledControl.errors; - Map get isCalculusEnabledErrors => + Map get isCalculusEnabledErrors => isCalculusEnabledControl.errors; - Map get isPlaqueEnabledErrors => + Map get isPlaqueEnabledErrors => isPlaqueEnabledControl.errors; void get isMobilityEnabledFocus => form.focus(isMobilityEnabledControlPath()); @@ -2419,9 +2419,9 @@ class ThresholdSettingOForm } } - Map get isEnabledErrors => isEnabledControl.errors; + Map get isEnabledErrors => isEnabledControl.errors; - Map get valueErrors => valueControl.errors; + Map get valueErrors => valueControl.errors; void get isEnabledFocus => form.focus(isEnabledControlPath()); @@ -2799,9 +2799,9 @@ class TimerSettingOForm } } - Map get isEnabledErrors => isEnabledControl.errors; + Map get isEnabledErrors => isEnabledControl.errors; - Map get valueErrors => valueControl.errors; + Map get valueErrors => valueControl.errors; void get isEnabledFocus => form.focus(isEnabledControlPath()); diff --git a/packages/generator_tests/test/doc/profile_test.dart b/packages/generator_tests/test/doc/profile_test.dart index 800db34e..e8e11417 100644 --- a/packages/generator_tests/test/doc/profile_test.dart +++ b/packages/generator_tests/test/doc/profile_test.dart @@ -696,28 +696,28 @@ class ProfileForm implements FormModel { } } - Map get idErrors => idControl.errors; + Map get idErrors => idControl.errors; - Map get anotherIdErrors => anotherIdControl.errors; + Map get anotherIdErrors => anotherIdControl.errors; - Map get nameErrors => nameControl.errors; + Map get nameErrors => nameControl.errors; - Map get chartingOrderErrors => chartingOrderControl.errors; + Map get chartingOrderErrors => chartingOrderControl.errors; - Map get numberingStandardErrors => + Map get numberingStandardErrors => numberingStandardControl.errors; - Map get measurementTypeErrors => + Map get measurementTypeErrors => measurementTypeControl.errors; - Map get audioGuidanceErrors => audioGuidanceControl.errors; + Map get audioGuidanceErrors => audioGuidanceControl.errors; - Map get incidenceFilterErrors => + Map get incidenceFilterErrors => incidenceFilterControl.errors; - Map get thresholdErrors => thresholdControl.errors; + Map get thresholdErrors => thresholdControl.errors; - Map get timerErrors => timerControl.errors; + Map get timerErrors => timerControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1732,22 +1732,22 @@ class IncidenceFilterForm } } - Map get isMobilityEnabledErrors => + Map get isMobilityEnabledErrors => isMobilityEnabledControl.errors; - Map get isFurcationEnabledErrors => + Map get isFurcationEnabledErrors => isFurcationEnabledControl.errors; - Map get isBleedingEnabledErrors => + Map get isBleedingEnabledErrors => isBleedingEnabledControl.errors; - Map get isSuppurationEnabledErrors => + Map get isSuppurationEnabledErrors => isSuppurationEnabledControl.errors; - Map get isCalculusEnabledErrors => + Map get isCalculusEnabledErrors => isCalculusEnabledControl.errors; - Map get isPlaqueEnabledErrors => + Map get isPlaqueEnabledErrors => isPlaqueEnabledControl.errors; void get isMobilityEnabledFocus => form.focus(isMobilityEnabledControlPath()); @@ -2410,9 +2410,9 @@ class ThresholdSettingForm } } - Map get isEnabledErrors => isEnabledControl.errors; + Map get isEnabledErrors => isEnabledControl.errors; - Map get valueErrors => valueControl.errors; + Map get valueErrors => valueControl.errors; void get isEnabledFocus => form.focus(isEnabledControlPath()); @@ -2785,9 +2785,9 @@ class TimerSettingForm implements FormModel { } } - Map get isEnabledErrors => isEnabledControl.errors; + Map get isEnabledErrors => isEnabledControl.errors; - Map get valueErrors => valueControl.errors; + Map get valueErrors => valueControl.errors; void get isEnabledFocus => form.focus(isEnabledControlPath()); diff --git a/packages/generator_tests/test/doc/recursive_test.dart b/packages/generator_tests/test/doc/recursive_test.dart index 2a98d8fb..8762d4a8 100644 --- a/packages/generator_tests/test/doc/recursive_test.dart +++ b/packages/generator_tests/test/doc/recursive_test.dart @@ -372,13 +372,13 @@ class SecuredAreaForm implements FormModel { } } - Map? get idErrors => idControl.errors; + Map? get idErrors => idControl.errors; - Map? get securedAreaErrors => securedAreaControl.errors; + Map? get securedAreaErrors => securedAreaControl.errors; - Map? get parcelSystemErrors => parcelSystemControl.errors; + Map? get parcelSystemErrors => parcelSystemControl.errors; - Map get subSecuredAreasErrors => + Map get subSecuredAreasErrors => subSecuredAreasControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1074,10 +1074,10 @@ class ParcelSystemForm implements FormModel { } } - Map get hasParcelSystemErrors => + Map get hasParcelSystemErrors => hasParcelSystemControl.errors; - Map get dataErrors => dataControl.errors; + Map get dataErrors => dataControl.errors; void get hasParcelSystemFocus => form.focus(hasParcelSystemControlPath()); @@ -1431,7 +1431,7 @@ class ParcelSystemDataForm } } - Map? get idErrors => idControl.errors; + Map? get idErrors => idControl.errors; void get idFocus => form.focus(idControlPath()); 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 4f3b121a..c10375cc 100644 --- a/packages/generator_tests/test/doc/renamed_basic_output_test.dart +++ b/packages/generator_tests/test/doc/renamed_basic_output_test.dart @@ -325,9 +325,9 @@ class SomeWiredNameForm } } - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; - Map? get passwordErrors => passwordControl.errors; + Map? get passwordErrors => passwordControl.errors; void get emailFocus => form.focus(emailControlPath()); diff --git a/packages/generator_tests/test/doc/renamed_basic_test.dart b/packages/generator_tests/test/doc/renamed_basic_test.dart index 941e403d..da7d63f4 100644 --- a/packages/generator_tests/test/doc/renamed_basic_test.dart +++ b/packages/generator_tests/test/doc/renamed_basic_test.dart @@ -323,9 +323,9 @@ class SomeWiredNameForm implements FormModel { } } - Map get emailErrors => emailControl.errors; + Map get emailErrors => emailControl.errors; - Map get passwordErrors => passwordControl.errors; + Map get passwordErrors => passwordControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 06c7e282..abc82a6d 100644 --- a/packages/generator_tests/test/doc/user_profile_output_test.dart +++ b/packages/generator_tests/test/doc/user_profile_output_test.dart @@ -402,15 +402,15 @@ class UserProfileOForm implements FormModel { } } - Map get idErrors => idControl.errors; + Map get idErrors => idControl.errors; - Map? get firstNameErrors => firstNameControl.errors; + Map? get firstNameErrors => firstNameControl.errors; - Map? get lastNameErrors => lastNameControl.errors; + Map? get lastNameErrors => lastNameControl.errors; - Map get homeErrors => homeControl.errors; + Map get homeErrors => homeControl.errors; - Map? get officeErrors => officeControl.errors; + Map? get officeErrors => officeControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1071,11 +1071,11 @@ class AddressOForm implements FormModel { } } - Map? get streetErrors => streetControl.errors; + Map? get streetErrors => streetControl.errors; - Map? get cityErrors => cityControl.errors; + Map? get cityErrors => cityControl.errors; - Map? get zipErrors => zipControl.errors; + Map? get zipErrors => zipControl.errors; void get streetFocus => form.focus(streetControlPath()); diff --git a/packages/generator_tests/test/doc/user_profile_test.dart b/packages/generator_tests/test/doc/user_profile_test.dart index b421b513..add9ce22 100644 --- a/packages/generator_tests/test/doc/user_profile_test.dart +++ b/packages/generator_tests/test/doc/user_profile_test.dart @@ -398,15 +398,15 @@ class UserProfileForm implements FormModel { } } - Map get idErrors => idControl.errors; + Map get idErrors => idControl.errors; - Map get firstNameErrors => firstNameControl.errors; + Map get firstNameErrors => firstNameControl.errors; - Map get lastNameErrors => lastNameControl.errors; + Map get lastNameErrors => lastNameControl.errors; - Map get homeErrors => homeControl.errors; + Map get homeErrors => homeControl.errors; - Map? get officeErrors => officeControl.errors; + Map? get officeErrors => officeControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1020,11 +1020,11 @@ class AddressForm implements FormModel { } } - Map? get streetErrors => streetControl.errors; + Map? get streetErrors => streetControl.errors; - Map? get cityErrors => cityControl.errors; + Map? get cityErrors => cityControl.errors; - Map? get zipErrors => zipControl.errors; + Map? get zipErrors => zipControl.errors; void get streetFocus => form.focus(streetControlPath()); diff --git a/packages/reactive_forms_annotations/pubspec.yaml b/packages/reactive_forms_annotations/pubspec.yaml index 4c9fa644..8b5ae7a9 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: 8.1.0-beta2 +version: 8.2.0 environment: sdk: ">=3.8.0 <4.0.0" resolution: workspace dependencies: - reactive_forms: ^18.0.0 + reactive_forms: ^18.2.2 collection: ^1.18.0 logging: ^1.3.0 flutter: 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 20a19807..ad752b89 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 @@ -264,7 +264,7 @@ class AnimatedUrlListForm } } - Map get urlListErrors => urlListControl.errors; + Map get urlListErrors => urlListControl.errors; void get urlListFocus => form.focus(urlListControlPath()); @@ -670,9 +670,9 @@ class UrlEntityForm implements FormModel { } } - Map get labelErrors => labelControl.errors; + Map get labelErrors => labelControl.errors; - Map get urlErrors => urlControl.errors; + Map get urlErrors => urlControl.errors; void get labelFocus => form.focus(labelControlPath()); 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 3565e3c6..4a4fa788 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 @@ -264,7 +264,7 @@ class AnimatedUrlLisOForm } } - Map get urlListErrors => urlListControl.errors; + Map get urlListErrors => urlListControl.errors; void get urlListFocus => form.focus(urlListControlPath()); @@ -671,9 +671,9 @@ class UrlEntityOForm implements FormModel { } } - Map? get labelErrors => labelControl.errors; + Map? get labelErrors => labelControl.errors; - Map? get urlErrors => urlControl.errors; + Map? get urlErrors => urlControl.errors; void get labelFocus => form.focus(labelControlPath()); 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 7987cf08..954ce156 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 @@ -277,9 +277,9 @@ class AnnotatelessForm implements FormModel { } } - Map get emailErrors => emailControl.errors; + Map get emailErrors => emailControl.errors; - Map get passwordErrors => passwordControl.errors; + Map get passwordErrors => passwordControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 58949cb3..d8018e4c 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 @@ -278,9 +278,9 @@ class AnnotatelessOForm } } - Map get emailErrors => emailControl.errors; + Map get emailErrors => emailControl.errors; - Map get passwordErrors => passwordControl.errors; + Map get passwordErrors => passwordControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 c1167bc0..230e0720 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 @@ -362,18 +362,19 @@ class ArrayNullableForm implements FormModel { } } - Map? get someListErrors => someListControl.errors; + Map? get someListErrors => someListControl.errors; - Map get someListRequiredErrors => + Map get someListRequiredErrors => someListRequiredControl.errors; - Map get emailListErrors => emailListControl.errors; + Map get emailListErrors => emailListControl.errors; - Map get fruitListErrors => fruitListControl.errors; + Map get fruitListErrors => fruitListControl.errors; - Map? get vegetablesListErrors => vegetablesListControl.errors; + Map? get vegetablesListErrors => + vegetablesListControl.errors; - Map? get modeListErrors => modeListControl.errors; + Map? get modeListErrors => modeListControl.errors; void get someListFocus => form.focus(someListControlPath()); 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 0d8dd611..48f47903 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 @@ -343,15 +343,16 @@ class ArrayNullableOForm } } - Map? get someListErrors => someListControl.errors; + Map? get someListErrors => someListControl.errors; - Map get emailListErrors => emailListControl.errors; + Map get emailListErrors => emailListControl.errors; - Map get fruitListErrors => fruitListControl.errors; + Map get fruitListErrors => fruitListControl.errors; - Map? get vegetablesListErrors => vegetablesListControl.errors; + Map? get vegetablesListErrors => + vegetablesListControl.errors; - Map? get modeListErrors => modeListControl.errors; + Map? get modeListErrors => modeListControl.errors; void get someListFocus => form.focus(someListControlPath()); 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 dbcd0ef6..82e1873a 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 @@ -418,26 +418,27 @@ class MSICreateForm implements FormModel { } } - Map? get idErrors => idControl.errors; + Map? get idErrors => idControl.errors; - Map? get businessNumberErrors => businessNumberControl.errors; + Map? get businessNumberErrors => + businessNumberControl.errors; - Map? get fileIdsErrors => fileIdsControl.errors; + Map? get fileIdsErrors => fileIdsControl.errors; - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; - Map get sameMailingAddressAsCompanyErrors => + Map get sameMailingAddressAsCompanyErrors => sameMailingAddressAsCompanyControl.errors; - Map get companyAddressErrors => companyAddressControl.errors; + Map get companyAddressErrors => companyAddressControl.errors; - Map get primaryContactErrors => primaryContactControl.errors; + Map get primaryContactErrors => primaryContactControl.errors; - Map get mailingAddressErrors => mailingAddressControl.errors; + Map get mailingAddressErrors => mailingAddressControl.errors; - Map get adminsErrors => adminsControl.errors; + Map get adminsErrors => adminsControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1647,14 +1648,14 @@ class AddressForm implements FormModel { } } - Map? get streetErrors => streetControl.errors; + Map? get streetErrors => streetControl.errors; - Map? get cityErrors => cityControl.errors; + Map? get cityErrors => cityControl.errors; - Map? get stateOrProvinceErrors => + Map? get stateOrProvinceErrors => stateOrProvinceControl.errors; - Map? get zipCodeErrors => zipCodeControl.errors; + Map? get zipCodeErrors => zipCodeControl.errors; void get streetFocus => form.focus(streetControlPath()); @@ -2287,11 +2288,11 @@ class PrimaryContactForm } } - Map? get fullNameErrors => fullNameControl.errors; + Map? get fullNameErrors => fullNameControl.errors; - Map? get jobTitleErrors => jobTitleControl.errors; + Map? get jobTitleErrors => jobTitleControl.errors; - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; void get fullNameFocus => form.focus(fullNameControlPath()); @@ -2830,11 +2831,11 @@ class AdminContactInformationForm } } - Map? get firstNameErrors => firstNameControl.errors; + Map? get firstNameErrors => firstNameControl.errors; - Map? get lastNameErrors => lastNameControl.errors; + Map? get lastNameErrors => lastNameControl.errors; - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; void get firstNameFocus => form.focus(firstNameControlPath()); 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 93b01820..61277527 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 @@ -283,9 +283,9 @@ class DeliveryListForm implements FormModel { } } - Map get deliveryListErrors => deliveryListControl.errors; + Map get deliveryListErrors => deliveryListControl.errors; - Map? get clientListErrors => clientListControl.errors; + Map? get clientListErrors => clientListControl.errors; void get deliveryListFocus => form.focus(deliveryListControlPath()); @@ -905,9 +905,9 @@ class DeliveryPointForm implements FormModel { } } - Map get nameErrors => nameControl.errors; + Map get nameErrors => nameControl.errors; - Map? get addressErrors => addressControl.errors; + Map? get addressErrors => addressControl.errors; void get nameFocus => form.focus(nameControlPath()); @@ -1294,9 +1294,9 @@ class AddressForm implements FormModel { } } - Map? get streetErrors => streetControl.errors; + Map? get streetErrors => streetControl.errors; - Map? get cityErrors => cityControl.errors; + Map? get cityErrors => cityControl.errors; void get streetFocus => form.focus(streetControlPath()); @@ -1727,11 +1727,11 @@ class ClientForm implements FormModel { } } - Map get clientTypeErrors => clientTypeControl.errors; + Map get clientTypeErrors => clientTypeControl.errors; - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; - Map? get notesErrors => notesControl.errors; + Map? get notesErrors => notesControl.errors; void get clientTypeFocus => form.focus(clientTypeControlPath()); @@ -2683,9 +2683,9 @@ class StandaloneDeliveryPointForm } } - Map get nameErrors => nameControl.errors; + Map get nameErrors => nameControl.errors; - Map? get addressErrors => addressControl.errors; + Map? get addressErrors => addressControl.errors; void get nameFocus => form.focus(nameControlPath()); 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 a90f8cfb..5ef4a483 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 @@ -284,9 +284,9 @@ class DeliveryListOForm } } - Map get deliveryListErrors => deliveryListControl.errors; + Map get deliveryListErrors => deliveryListControl.errors; - Map? get clientListErrors => clientListControl.errors; + Map? get clientListErrors => clientListControl.errors; void get deliveryListFocus => form.focus(deliveryListControlPath()); @@ -909,9 +909,9 @@ class DeliveryPointOForm } } - Map get nameErrors => nameControl.errors; + Map get nameErrors => nameControl.errors; - Map? get addressErrors => addressControl.errors; + Map? get addressErrors => addressControl.errors; void get nameFocus => form.focus(nameControlPath()); @@ -1299,9 +1299,9 @@ class AddressOForm implements FormModel { } } - Map? get streetErrors => streetControl.errors; + Map? get streetErrors => streetControl.errors; - Map? get cityErrors => cityControl.errors; + Map? get cityErrors => cityControl.errors; void get streetFocus => form.focus(streetControlPath()); @@ -1733,11 +1733,11 @@ class ClientOForm implements FormModel { } } - Map get clientTypeErrors => clientTypeControl.errors; + Map get clientTypeErrors => clientTypeControl.errors; - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; - Map? get notesErrors => notesControl.errors; + Map? get notesErrors => notesControl.errors; void get clientTypeFocus => form.focus(clientTypeControlPath()); @@ -2742,9 +2742,9 @@ class StandaloneDeliveryPointForm } } - Map get nameErrors => nameControl.errors; + Map get nameErrors => nameControl.errors; - Map? get addressErrors => addressControl.errors; + Map? get addressErrors => addressControl.errors; void get nameFocus => form.focus(nameControlPath()); 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 391a5c5d..db163103 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 @@ -347,17 +347,17 @@ class FreezedClassForm implements FormModel { } } - Map? get genderErrors => genderControl.errors; + Map? get genderErrors => genderControl.errors; - Map? get idErrors => idControl.errors; + Map? get idErrors => idControl.errors; - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; - Map? get logoImageErrors => logoImageControl.errors; + Map? get logoImageErrors => logoImageControl.errors; - Map? get yearErrors => yearControl.errors; + Map? get yearErrors => yearControl.errors; - Map get selectedSpacesErrors => selectedSpacesControl.errors; + Map get selectedSpacesErrors => selectedSpacesControl.errors; void get genderFocus => form.focus(genderControlPath()); 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 f960d575..9cd2ed9e 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 @@ -399,23 +399,23 @@ class FreezedClassOForm } } - Map? get genderErrors => genderControl.errors; + Map? get genderErrors => genderControl.errors; - Map? get genderRErrors => genderRControl.errors; + Map? get genderRErrors => genderRControl.errors; - Map? get idErrors => idControl.errors; + Map? get idErrors => idControl.errors; - Map? get idRErrors => idRControl.errors; + Map? get idRErrors => idRControl.errors; - Map get idR2Errors => idR2Control.errors; + Map get idR2Errors => idR2Control.errors; - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; - Map? get logoImageErrors => logoImageControl.errors; + Map? get logoImageErrors => logoImageControl.errors; - Map? get yearErrors => yearControl.errors; + Map? get yearErrors => yearControl.errors; - Map get selectedSpacesErrors => selectedSpacesControl.errors; + Map get selectedSpacesErrors => selectedSpacesControl.errors; void get genderFocus => form.focus(genderControlPath()); 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 3dcedaa8..596eed40 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 @@ -255,9 +255,9 @@ class TestForm implements FormModel { } } - Map get titleErrors => titleControl.errors; + Map get titleErrors => titleControl.errors; - Map? get descriptionErrors => descriptionControl.errors; + Map? get descriptionErrors => descriptionControl.errors; void get titleFocus => form.focus(titleControlPath()); 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 c535d3c2..66a29f92 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 @@ -250,7 +250,7 @@ class TagsForm implements FormModel, Tags> { } } - Map? get tagsErrors => tagsControl.errors; + Map? get tagsErrors => tagsControl.errors; void get tagsFocus => form.focus(tagsControlPath()); 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 1f6b2df4..ac3af5fc 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 @@ -251,7 +251,7 @@ class TagsOForm implements FormModel, TagsOOutput> { } } - Map? get tagsErrors => tagsControl.errors; + Map? get tagsErrors => tagsControl.errors; void get tagsFocus => form.focus(tagsControlPath()); 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 b0e249df..8c2be228 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 @@ -266,7 +266,7 @@ class StatusListForm } } - Map get listErrors => listControl.errors; + Map get listErrors => listControl.errors; void get listFocus => form.focus(listControlPath()); 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 9d31d365..c912d9a6 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 @@ -266,7 +266,7 @@ class StatusListOForm } } - Map get listErrors => listControl.errors; + Map get listErrors => listControl.errors; void get listFocus => form.focus(listControlPath()); 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 08d6bc26..fcece4d9 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 @@ -298,13 +298,13 @@ class GroupForm implements FormModel { } } - Map? get personalErrors => personalControl.errors; + Map? get personalErrors => personalControl.errors; - Map? get phoneErrors => phoneControl.errors; + Map? get phoneErrors => phoneControl.errors; - Map? get addressErrors => addressControl.errors; + Map? get addressErrors => addressControl.errors; - Map? get address2Errors => address2Control.errors; + Map? get address2Errors => address2Control.errors; void get personalFocus => form.focus(personalControlPath()); @@ -892,9 +892,9 @@ class PersonalForm implements FormModel { } } - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; void get nameFocus => form.focus(nameControlPath()); @@ -1312,9 +1312,9 @@ class PhoneForm implements FormModel { } } - Map? get phoneNumberErrors => phoneNumberControl.errors; + Map? get phoneNumberErrors => phoneNumberControl.errors; - Map? get countryIsoErrors => countryIsoControl.errors; + Map? get countryIsoErrors => countryIsoControl.errors; void get phoneNumberFocus => form.focus(phoneNumberControlPath()); @@ -1745,11 +1745,11 @@ class AddressForm implements FormModel { } } - Map? get streetErrors => streetControl.errors; + Map? get streetErrors => streetControl.errors; - Map? get cityErrors => cityControl.errors; + Map? get cityErrors => cityControl.errors; - Map? get zipErrors => zipControl.errors; + Map? get zipErrors => zipControl.errors; void get streetFocus => form.focus(streetControlPath()); 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 2faab827..ddbcc197 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 @@ -304,13 +304,13 @@ class GroupOForm implements FormModel { } } - Map? get personalErrors => personalControl.errors; + Map? get personalErrors => personalControl.errors; - Map? get phoneErrors => phoneControl.errors; + Map? get phoneErrors => phoneControl.errors; - Map? get addressErrors => addressControl.errors; + Map? get addressErrors => addressControl.errors; - Map? get address2Errors => address2Control.errors; + Map? get address2Errors => address2Control.errors; void get personalFocus => form.focus(personalControlPath()); @@ -903,9 +903,9 @@ class PersonalOForm implements FormModel { } } - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; void get nameFocus => form.focus(nameControlPath()); @@ -1324,9 +1324,9 @@ class PhoneOForm implements FormModel { } } - Map? get phoneNumberErrors => phoneNumberControl.errors; + Map? get phoneNumberErrors => phoneNumberControl.errors; - Map? get countryIsoErrors => countryIsoControl.errors; + Map? get countryIsoErrors => countryIsoControl.errors; void get phoneNumberFocus => form.focus(phoneNumberControlPath()); @@ -1764,11 +1764,11 @@ class AddressOForm implements FormModel { } } - Map? get streetErrors => streetControl.errors; + Map? get streetErrors => streetControl.errors; - Map? get cityErrors => cityControl.errors; + Map? get cityErrors => cityControl.errors; - Map? get zipErrors => zipControl.errors; + Map? get zipErrors => zipControl.errors; void get streetFocus => form.focus(streetControlPath()); diff --git a/packages/reactive_forms_generator/example/lib/docs/issue_203/issue_203.dart b/packages/reactive_forms_generator/example/lib/docs/issue_203/issue_203.dart new file mode 100644 index 00000000..9ae82a75 --- /dev/null +++ b/packages/reactive_forms_generator/example/lib/docs/issue_203/issue_203.dart @@ -0,0 +1,19 @@ + +import 'package:reactive_forms_annotations/reactive_forms_annotations.dart'; + +part 'issue_203.gform.dart'; + +@Rf() +final class LoginFormModel { + final String domain; + final String username; + final String password; + final bool rememberMe; + + const LoginFormModel({ + @RfControl(validators: [RequiredValidator()]) this.domain = '', + @RfControl(validators: [RequiredValidator()]) this.username = '', + @RfControl(validators: [RequiredValidator()]) this.password = '', + @RfControl() this.rememberMe = true, + }); +} \ No newline at end of file diff --git a/packages/reactive_forms_generator/example/lib/docs/issue_203/issue_203.gform.dart b/packages/reactive_forms_generator/example/lib/docs/issue_203/issue_203.gform.dart new file mode 100644 index 00000000..a3e4a3c5 --- /dev/null +++ b/packages/reactive_forms_generator/example/lib/docs/issue_203/issue_203.gform.dart @@ -0,0 +1,1021 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'issue_203.dart'; + +// ************************************************************************** +// ReactiveFormsGenerator +// ************************************************************************** + +class ReactiveLoginFormModelFormConsumer extends StatelessWidget { + const ReactiveLoginFormModelFormConsumer({ + Key? key, + required this.builder, + this.child, + }) : super(key: key); + + final Widget? child; + + final Widget Function( + BuildContext context, + LoginFormModelForm formModel, + Widget? child, + ) + builder; + + @override + Widget build(BuildContext context) { + final formModel = ReactiveLoginFormModelForm.of(context); + + if (formModel is! LoginFormModelForm) { + throw FormControlParentNotFoundException(this); + } + return builder(context, formModel, child); + } +} + +class LoginFormModelFormInheritedStreamer extends InheritedStreamer { + const LoginFormModelFormInheritedStreamer({ + Key? key, + required this.form, + required Stream stream, + required Widget child, + }) : super(stream, child, key: key); + + final LoginFormModelForm form; +} + +class ReactiveLoginFormModelForm extends StatelessWidget { + const ReactiveLoginFormModelForm({ + Key? key, + required this.form, + required this.child, + this.canPop, + this.onPopInvokedWithResult, + }) : super(key: key); + + final Widget child; + + final LoginFormModelForm form; + + final bool Function(FormGroup formGroup)? canPop; + + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; + + static LoginFormModelForm? of(BuildContext context, {bool listen = true}) { + if (listen) { + return context + .dependOnInheritedWidgetOfExactType< + LoginFormModelFormInheritedStreamer + >() + ?.form; + } + + final element = context + .getElementForInheritedWidgetOfExactType< + LoginFormModelFormInheritedStreamer + >(); + return element == null + ? null + : (element.widget as LoginFormModelFormInheritedStreamer).form; + } + + @override + Widget build(BuildContext context) { + return LoginFormModelFormInheritedStreamer( + form: form, + stream: form.form.statusChanged, + child: ReactiveFormPopScope( + canPop: canPop, + onPopInvokedWithResult: onPopInvokedWithResult, + child: child, + ), + ); + } +} + +extension ReactiveReactiveLoginFormModelFormExt on BuildContext { + LoginFormModelForm? loginFormModelFormWatch() => + ReactiveLoginFormModelForm.of(this); + + LoginFormModelForm? loginFormModelFormRead() => + ReactiveLoginFormModelForm.of(this, listen: false); +} + +class LoginFormModelFormBuilder extends StatefulWidget { + const LoginFormModelFormBuilder({ + Key? key, + this.model, + this.child, + this.canPop, + this.onPopInvokedWithResult, + required this.builder, + this.initState, + }) : super(key: key); + + final LoginFormModel? model; + + final Widget? child; + + final bool Function(FormGroup formGroup)? canPop; + + final ReactiveFormPopInvokedWithResultCallback? + onPopInvokedWithResult; + + final Widget Function( + BuildContext context, + LoginFormModelForm formModel, + Widget? child, + ) + builder; + + final void Function(BuildContext context, LoginFormModelForm formModel)? + initState; + + @override + _LoginFormModelFormBuilderState createState() => + _LoginFormModelFormBuilderState(); +} + +class _LoginFormModelFormBuilderState extends State { + late LoginFormModelForm _formModel; + + StreamSubscription? _logSubscription; + + @override + void initState() { + _formModel = LoginFormModelForm( + LoginFormModelForm.formElements(widget.model), + null, + null, + ); + + if (_formModel.form.disabled) { + _formModel.form.markAsDisabled(); + } + + widget.initState?.call(context, _formModel); + + _logSubscription = _logLoginFormModelForm.onRecord.listen((LogRecord e) { + // use `dumpErrorToConsole` for severe messages to ensure that severe + // exceptions are formatted consistently with other Flutter examples and + // avoids printing duplicate exceptions + if (e.level >= Level.SEVERE) { + final Object? error = e.error; + FlutterError.dumpErrorToConsole( + FlutterErrorDetails( + exception: error is Exception ? error : Exception(error), + stack: e.stackTrace, + library: e.loggerName, + context: ErrorDescription(e.message), + ), + ); + } else { + log( + e.message, + time: e.time, + sequenceNumber: e.sequenceNumber, + level: e.level.value, + name: e.loggerName, + zone: e.zone, + error: e.error, + stackTrace: e.stackTrace, + ); + } + }); + + super.initState(); + } + + @override + void didUpdateWidget(covariant LoginFormModelFormBuilder oldWidget) { + if (widget.model != oldWidget.model) { + _formModel.updateValue(widget.model); + } + + super.didUpdateWidget(oldWidget); + } + + @override + void dispose() { + _formModel.form.dispose(); + _logSubscription?.cancel(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return ReactiveLoginFormModelForm( + key: ObjectKey(_formModel), + form: _formModel, + // canPop: widget.canPop, + // onPopInvoked: widget.onPopInvoked, + child: ReactiveFormBuilder( + form: () => _formModel.form, + canPop: widget.canPop, + onPopInvokedWithResult: widget.onPopInvokedWithResult, + builder: (context, formGroup, child) => + widget.builder(context, _formModel, widget.child), + child: widget.child, + ), + ); + } +} + +final _logLoginFormModelForm = Logger.detached('LoginFormModelForm'); + +class LoginFormModelForm implements FormModel { + LoginFormModelForm(this.form, this.path, this._formModel) + : initial = form.rawValue; + + static const String domainControlName = "domain"; + + static const String usernameControlName = "username"; + + static const String passwordControlName = "password"; + + static const String rememberMeControlName = "rememberMe"; + + final FormGroup form; + + final String? path; + + // ignore: unused_field + final FormModel? _formModel; + + final Map _disabled = {}; + + @override + final Map initial; + + String domainControlPath() => pathBuilder(domainControlName); + + String usernameControlPath() => pathBuilder(usernameControlName); + + String passwordControlPath() => pathBuilder(passwordControlName); + + String rememberMeControlPath() => pathBuilder(rememberMeControlName); + + String get _domainValue => domainControl.value ?? ''; + + String get _usernameValue => usernameControl.value ?? ''; + + String get _passwordValue => passwordControl.value ?? ''; + + bool get _rememberMeValue => rememberMeControl.value ?? true; + + String get _domainRawValue => domainControl.value ?? ''; + + String get _usernameRawValue => usernameControl.value ?? ''; + + String get _passwordRawValue => passwordControl.value ?? ''; + + bool get _rememberMeRawValue => rememberMeControl.value ?? true; + + bool get containsDomain { + try { + form.control(domainControlPath()); + return true; + } catch (e) { + return false; + } + } + + bool get containsUsername { + try { + form.control(usernameControlPath()); + return true; + } catch (e) { + return false; + } + } + + bool get containsPassword { + try { + form.control(passwordControlPath()); + return true; + } catch (e) { + return false; + } + } + + bool get containsRememberMe { + try { + form.control(rememberMeControlPath()); + return true; + } catch (e) { + return false; + } + } + + Map get domainErrors => domainControl.errors; + + Map get usernameErrors => usernameControl.errors; + + Map get passwordErrors => passwordControl.errors; + + Map get rememberMeErrors => rememberMeControl.errors; + + void get domainFocus => form.focus(domainControlPath()); + + void get usernameFocus => form.focus(usernameControlPath()); + + void get passwordFocus => form.focus(passwordControlPath()); + + void get rememberMeFocus => form.focus(rememberMeControlPath()); + + void domainValueUpdate( + String value, { + bool updateParent = true, + bool emitEvent = true, + }) { + domainControl.updateValue( + value, + updateParent: updateParent, + emitEvent: emitEvent, + ); + } + + void usernameValueUpdate( + String value, { + bool updateParent = true, + bool emitEvent = true, + }) { + usernameControl.updateValue( + value, + updateParent: updateParent, + emitEvent: emitEvent, + ); + } + + void passwordValueUpdate( + String value, { + bool updateParent = true, + bool emitEvent = true, + }) { + passwordControl.updateValue( + value, + updateParent: updateParent, + emitEvent: emitEvent, + ); + } + + void rememberMeValueUpdate( + bool value, { + bool updateParent = true, + bool emitEvent = true, + }) { + rememberMeControl.updateValue( + value, + updateParent: updateParent, + emitEvent: emitEvent, + ); + } + + void domainValuePatch( + String value, { + bool updateParent = true, + bool emitEvent = true, + }) { + domainControl.patchValue( + value, + updateParent: updateParent, + emitEvent: emitEvent, + ); + } + + void usernameValuePatch( + String value, { + bool updateParent = true, + bool emitEvent = true, + }) { + usernameControl.patchValue( + value, + updateParent: updateParent, + emitEvent: emitEvent, + ); + } + + void passwordValuePatch( + String value, { + bool updateParent = true, + bool emitEvent = true, + }) { + passwordControl.patchValue( + value, + updateParent: updateParent, + emitEvent: emitEvent, + ); + } + + void rememberMeValuePatch( + bool value, { + bool updateParent = true, + bool emitEvent = true, + }) { + rememberMeControl.patchValue( + value, + updateParent: updateParent, + emitEvent: emitEvent, + ); + } + + void domainValueReset( + String value, { + bool updateParent = true, + bool emitEvent = true, + bool removeFocus = false, + bool? disabled, + }) => domainControl.reset( + value: value, + updateParent: updateParent, + emitEvent: emitEvent, + removeFocus: removeFocus, + disabled: disabled, + ); + + void usernameValueReset( + String value, { + bool updateParent = true, + bool emitEvent = true, + bool removeFocus = false, + bool? disabled, + }) => usernameControl.reset( + value: value, + updateParent: updateParent, + emitEvent: emitEvent, + removeFocus: removeFocus, + disabled: disabled, + ); + + void passwordValueReset( + String value, { + bool updateParent = true, + bool emitEvent = true, + bool removeFocus = false, + bool? disabled, + }) => passwordControl.reset( + value: value, + updateParent: updateParent, + emitEvent: emitEvent, + removeFocus: removeFocus, + disabled: disabled, + ); + + void rememberMeValueReset( + bool value, { + bool updateParent = true, + bool emitEvent = true, + bool removeFocus = false, + bool? disabled, + }) => rememberMeControl.reset( + value: value, + updateParent: updateParent, + emitEvent: emitEvent, + removeFocus: removeFocus, + disabled: disabled, + ); + + FormControl get domainControl => + form.control(domainControlPath()) as FormControl; + + FormControl get usernameControl => + form.control(usernameControlPath()) as FormControl; + + FormControl get passwordControl => + form.control(passwordControlPath()) as FormControl; + + FormControl get rememberMeControl => + form.control(rememberMeControlPath()) as FormControl; + + void domainSetDisabled( + bool disabled, { + bool updateParent = true, + bool emitEvent = true, + }) { + if (disabled) { + domainControl.markAsDisabled( + updateParent: updateParent, + emitEvent: emitEvent, + ); + } else { + domainControl.markAsEnabled( + updateParent: updateParent, + emitEvent: emitEvent, + ); + } + } + + void usernameSetDisabled( + bool disabled, { + bool updateParent = true, + bool emitEvent = true, + }) { + if (disabled) { + usernameControl.markAsDisabled( + updateParent: updateParent, + emitEvent: emitEvent, + ); + } else { + usernameControl.markAsEnabled( + updateParent: updateParent, + emitEvent: emitEvent, + ); + } + } + + void passwordSetDisabled( + bool disabled, { + bool updateParent = true, + bool emitEvent = true, + }) { + if (disabled) { + passwordControl.markAsDisabled( + updateParent: updateParent, + emitEvent: emitEvent, + ); + } else { + passwordControl.markAsEnabled( + updateParent: updateParent, + emitEvent: emitEvent, + ); + } + } + + void rememberMeSetDisabled( + bool disabled, { + bool updateParent = true, + bool emitEvent = true, + }) { + if (disabled) { + rememberMeControl.markAsDisabled( + updateParent: updateParent, + emitEvent: emitEvent, + ); + } else { + rememberMeControl.markAsEnabled( + updateParent: updateParent, + emitEvent: emitEvent, + ); + } + } + + @override + LoginFormModel get model { + final isValid = !currentForm.hasErrors && currentForm.errors.isEmpty; + + if (!isValid) { + _logLoginFormModelForm.warning( + 'Avoid calling `model` on invalid form.Possible exceptions for non-nullable fields which should be guarded by `required` validator.', + null, + StackTrace.current, + ); + } + return LoginFormModel( + domain: _domainValue, + username: _usernameValue, + password: _passwordValue, + rememberMe: _rememberMeValue, + ); + } + + @override + LoginFormModel get rawModel { + return LoginFormModel( + domain: _domainRawValue, + username: _usernameRawValue, + password: _passwordRawValue, + rememberMe: _rememberMeRawValue, + ); + } + + @override + void toggleDisabled({bool updateParent = true, bool emitEvent = true}) { + if (_disabled.isEmpty) { + currentForm.controls.forEach((key, control) { + _disabled[key] = control.disabled; + }); + + currentForm.markAsDisabled( + updateParent: updateParent, + emitEvent: emitEvent, + ); + } else { + currentForm.controls.forEach((key, control) { + if (_disabled[key] == false) { + currentForm.controls[key]?.markAsEnabled( + updateParent: updateParent, + emitEvent: emitEvent, + ); + } + + _disabled.remove(key); + }); + } + } + + @override + bool equalsTo(LoginFormModel? other) { + final currentForm = this.currentForm; + + return const DeepCollectionEquality().equals( + currentForm.rawValue, + LoginFormModelForm.formElements(other).rawValue, + ); + } + + @override + void submit({ + required void Function(LoginFormModel model) onValid, + void Function()? onNotValid, + }) { + currentForm.markAllAsTouched(); + if (currentForm.valid) { + onValid(model); + } else { + _logLoginFormModelForm.info('Errors'); + _logLoginFormModelForm.info('┗━━ ${form.errors}'); + onNotValid?.call(); + } + } + + @override + bool get hasChanged { + return !const DeepCollectionEquality().equals( + currentForm.rawValue, + initial, + ); + } + + @override + FormGroup get currentForm { + return path == null ? form : form.control(path!) as FormGroup; + } + + @override + void updateValue( + LoginFormModel? value, { + bool updateParent = true, + bool emitEvent = true, + }) => currentForm.updateValue( + LoginFormModelForm.formElements(value).rawValue, + updateParent: updateParent, + emitEvent: emitEvent, + ); + + @override + void upsertValue( + LoginFormModel? value, { + bool updateParent = true, + bool emitEvent = true, + }) { + final formElements = LoginFormModelForm.formElements(value); + + currentForm.addAll(formElements.controls); + } + + @override + void reset({ + LoginFormModel? value, + bool updateParent = true, + bool emitEvent = true, + }) => currentForm.reset( + value: value != null ? formElements(value).rawValue : null, + updateParent: updateParent, + emitEvent: emitEvent, + ); + + @override + void updateInitial(Map? value, String? path) { + if (_formModel != null) { + _formModel?.updateInitial(currentForm.rawValue, path); + return; + } + + if (value == null) return; + + if (path == null || path.isEmpty) { + initial.addAll(value); + return; + } + + final keys = path.split('.'); + Object? current = initial; + for (var i = 0; i < keys.length - 1; i++) { + final key = keys[i]; + + if (current is List) { + final index = int.tryParse(key); + if (index != null && index >= 0 && index < current.length) { + current = current[index]; + continue; + } + } + + if (current is Map) { + if (!current.containsKey(key)) { + current[key] = {}; + } + current = current[key]; + continue; + } + + return; + } + + final key = keys.last; + if (current is List) { + final index = int.tryParse(key); + if (index != null && index >= 0 && index < current.length) { + current[index] = value; + } + } else if (current is Map) { + current[key] = value; + } + } + + String pathBuilder(String? pathItem) => + [path, pathItem].whereType().join("."); + + static FormGroup formElements(LoginFormModel? loginFormModel) => FormGroup( + { + domainControlName: FormControl( + value: loginFormModel?.domain, + validators: [RequiredValidator()], + asyncValidators: [], + asyncValidatorsDebounceTime: 250, + disabled: false, + touched: false, + ), + usernameControlName: FormControl( + value: loginFormModel?.username, + validators: [RequiredValidator()], + asyncValidators: [], + asyncValidatorsDebounceTime: 250, + disabled: false, + touched: false, + ), + passwordControlName: FormControl( + value: loginFormModel?.password, + validators: [RequiredValidator()], + asyncValidators: [], + asyncValidatorsDebounceTime: 250, + disabled: false, + touched: false, + ), + rememberMeControlName: FormControl( + value: loginFormModel?.rememberMe, + validators: [], + asyncValidators: [], + asyncValidatorsDebounceTime: 250, + disabled: false, + touched: false, + ), + }, + validators: [], + asyncValidators: [], + asyncValidatorsDebounceTime: 250, + disabled: false, + ); +} + +class ReactiveLoginFormModelFormArrayBuilder< + ReactiveLoginFormModelFormArrayBuilderT +> + extends StatelessWidget { + const ReactiveLoginFormModelFormArrayBuilder({ + Key? key, + this.control, + this.formControl, + this.builder, + required this.itemBuilder, + this.emptyBuilder, + this.controlFilter, + }) : assert( + control != null || formControl != null, + "You have to specify `control` or `formControl`!", + ), + super(key: key); + + final FormArray? formControl; + + final FormArray? Function( + LoginFormModelForm formModel, + )? + control; + + final Widget Function( + BuildContext context, + List itemList, + LoginFormModelForm formModel, + )? + builder; + + final Widget Function( + BuildContext context, + int i, + FormControl control, + ReactiveLoginFormModelFormArrayBuilderT? item, + LoginFormModelForm formModel, + ) + itemBuilder; + + final Widget Function(BuildContext context)? emptyBuilder; + + final bool Function( + FormControl control, + )? + controlFilter; + + @override + Widget build(BuildContext context) { + final formModel = ReactiveLoginFormModelForm.of(context); + + if (formModel == null) { + throw FormControlParentNotFoundException(this); + } + + final builder = this.builder; + final itemBuilder = this.itemBuilder; + + return ReactiveFormArrayItemBuilder< + ReactiveLoginFormModelFormArrayBuilderT + >( + formControl: formControl ?? control?.call(formModel), + builder: builder != null + ? (context, itemList) => builder(context, itemList, formModel) + : null, + itemBuilder: (context, i, control, item) => + itemBuilder(context, i, control, item, formModel), + emptyBuilder: emptyBuilder, + controlFilter: controlFilter, + ); + } +} + +class ReactiveLoginFormModelFormArrayBuilder2< + ReactiveLoginFormModelFormArrayBuilderT +> + extends StatelessWidget { + const ReactiveLoginFormModelFormArrayBuilder2({ + Key? key, + this.control, + this.formControl, + this.builder, + required this.itemBuilder, + this.emptyBuilder, + this.controlFilter, + }) : assert( + control != null || formControl != null, + "You have to specify `control` or `formControl`!", + ), + super(key: key); + + final FormArray? formControl; + + final FormArray? Function( + LoginFormModelForm formModel, + )? + control; + + final Widget Function( + ({ + BuildContext context, + List itemList, + LoginFormModelForm formModel, + }) + params, + )? + builder; + + final Widget Function( + ({ + BuildContext context, + int i, + FormControl control, + ReactiveLoginFormModelFormArrayBuilderT? item, + LoginFormModelForm formModel, + }) + params, + ) + itemBuilder; + + final Widget Function(BuildContext context)? emptyBuilder; + + final bool Function( + FormControl control, + )? + controlFilter; + + @override + Widget build(BuildContext context) { + final formModel = ReactiveLoginFormModelForm.of(context); + + if (formModel == null) { + throw FormControlParentNotFoundException(this); + } + + final builder = this.builder; + final itemBuilder = this.itemBuilder; + + return ReactiveFormArrayItemBuilder< + ReactiveLoginFormModelFormArrayBuilderT + >( + formControl: formControl ?? control?.call(formModel), + builder: builder != null + ? (context, itemList) => builder(( + context: context, + itemList: itemList, + formModel: formModel, + )) + : null, + itemBuilder: (context, i, control, item) => itemBuilder(( + context: context, + i: i, + control: control, + item: item, + formModel: formModel, + )), + emptyBuilder: emptyBuilder, + controlFilter: controlFilter, + ); + } +} + +class ReactiveLoginFormModelFormFormGroupArrayBuilder< + ReactiveLoginFormModelFormFormGroupArrayBuilderT +> + extends StatelessWidget { + const ReactiveLoginFormModelFormFormGroupArrayBuilder({ + Key? key, + this.extended, + this.getExtended, + this.builder, + required this.itemBuilder, + }) : assert( + extended != null || getExtended != null, + "You have to specify `control` or `formControl`!", + ), + super(key: key); + + final ExtendedControl< + List?>, + List + >? + extended; + + final ExtendedControl< + List?>, + List + > + Function(LoginFormModelForm formModel)? + getExtended; + + final Widget Function( + BuildContext context, + List itemList, + LoginFormModelForm formModel, + )? + builder; + + final Widget Function( + BuildContext context, + int i, + ReactiveLoginFormModelFormFormGroupArrayBuilderT? item, + LoginFormModelForm formModel, + ) + itemBuilder; + + @override + Widget build(BuildContext context) { + final formModel = ReactiveLoginFormModelForm.of(context); + + if (formModel == null) { + throw FormControlParentNotFoundException(this); + } + + final value = (extended ?? getExtended?.call(formModel))!; + + return StreamBuilder?>?>( + stream: value.control.valueChanges, + builder: (context, snapshot) { + final itemList = + (value.value() ?? + []) + .asMap() + .map( + (i, item) => + MapEntry(i, itemBuilder(context, i, item, formModel)), + ) + .values + .toList(); + + return builder?.call(context, itemList, formModel) ?? + Column(children: itemList); + }, + ); + } +} 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 adfc9ff5..3f7666cd 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 @@ -261,9 +261,9 @@ class LoginForm implements FormModel { } } - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; - Map get passwordErrors => passwordControl.errors; + Map get passwordErrors => passwordControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 d439a967..e18f5ec5 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 @@ -265,9 +265,9 @@ class LoginOForm implements FormModel { } } - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; - Map? get passwordErrors => passwordControl.errors; + Map? get passwordErrors => passwordControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 4b34735f..97154175 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 @@ -398,23 +398,23 @@ class LoginExtendedForm implements FormModel { } } - Map get emailErrors => emailControl.errors; + Map get emailErrors => emailControl.errors; - Map get passwordErrors => passwordControl.errors; + Map get passwordErrors => passwordControl.errors; - Map get rememberMeErrors => rememberMeControl.errors; + Map get rememberMeErrors => rememberMeControl.errors; - Map get themeErrors => themeControl.errors; + Map get themeErrors => themeControl.errors; - Map get modeErrors => modeControl.errors; + Map get modeErrors => modeControl.errors; - Map get timeoutErrors => timeoutControl.errors; + Map get timeoutErrors => timeoutControl.errors; - Map get heightErrors => heightControl.errors; + Map get heightErrors => heightControl.errors; - Map? get unAnnotatedErrors => unAnnotatedControl.errors; + Map? get unAnnotatedErrors => unAnnotatedControl.errors; - Map get someIntListErrors => someIntListControl.errors; + Map get someIntListErrors => someIntListControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 59fe4166..d9e086e7 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 @@ -416,25 +416,25 @@ class LoginExtendedOForm } } - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; - Map get email2Errors => email2Control.errors; + Map get email2Errors => email2Control.errors; - Map get passwordErrors => passwordControl.errors; + Map get passwordErrors => passwordControl.errors; - Map get rememberMeErrors => rememberMeControl.errors; + Map get rememberMeErrors => rememberMeControl.errors; - Map get themeErrors => themeControl.errors; + Map get themeErrors => themeControl.errors; - Map get modeErrors => modeControl.errors; + Map get modeErrors => modeControl.errors; - Map get timeoutErrors => timeoutControl.errors; + Map get timeoutErrors => timeoutControl.errors; - Map get heightErrors => heightControl.errors; + Map get heightErrors => heightControl.errors; - Map? get unAnnotatedErrors => unAnnotatedControl.errors; + Map? get unAnnotatedErrors => unAnnotatedControl.errors; - Map get someIntListErrors => someIntListControl.errors; + Map get someIntListErrors => someIntListControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 f7e839af..65bfd3d1 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 @@ -378,19 +378,19 @@ class LoginExtendedNullableForm } } - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; - Map? get passwordErrors => passwordControl.errors; + Map? get passwordErrors => passwordControl.errors; - Map? get rememberMeErrors => rememberMeControl.errors; + Map? get rememberMeErrors => rememberMeControl.errors; - Map? get themeErrors => themeControl.errors; + Map? get themeErrors => themeControl.errors; - Map? get modeErrors => modeControl.errors; + Map? get modeErrors => modeControl.errors; - Map? get timeoutErrors => timeoutControl.errors; + Map? get timeoutErrors => timeoutControl.errors; - Map? get heightErrors => heightControl.errors; + Map? get heightErrors => heightControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 0a49d046..841a1e72 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 @@ -378,19 +378,19 @@ class LoginExtendedNullableOForm } } - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; - Map? get passwordErrors => passwordControl.errors; + Map? get passwordErrors => passwordControl.errors; - Map? get rememberMeErrors => rememberMeControl.errors; + Map? get rememberMeErrors => rememberMeControl.errors; - Map? get themeErrors => themeControl.errors; + Map? get themeErrors => themeControl.errors; - Map? get modeErrors => modeControl.errors; + Map? get modeErrors => modeControl.errors; - Map? get timeoutErrors => timeoutControl.errors; + Map? get timeoutErrors => timeoutControl.errors; - Map? get heightErrors => heightControl.errors; + Map? get heightErrors => heightControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 ffd928e4..dbc01d47 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 @@ -260,7 +260,7 @@ class MailingListForm implements FormModel { } } - Map get emailListErrors => emailListControl.errors; + Map get emailListErrors => emailListControl.errors; void get emailListFocus => form.focus(emailListControlPath()); 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 62cbc78a..e52daab5 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 @@ -262,7 +262,7 @@ class MailingListOForm implements FormModel { } } - Map get emailListErrors => emailListControl.errors; + Map get emailListErrors => emailListControl.errors; void get emailListFocus => form.focus(emailListControlPath()); 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 f7b8c1f9..bd8bcab6 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 @@ -277,9 +277,9 @@ class ModelExtendsForm implements FormModel { } } - Map get emailErrors => emailControl.errors; + Map get emailErrors => emailControl.errors; - Map get passwordErrors => passwordControl.errors; + Map get passwordErrors => passwordControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 b596c782..10c337d4 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 @@ -279,9 +279,9 @@ class ModelImplementsForm } } - Map get emailErrors => emailControl.errors; + Map get emailErrors => emailControl.errors; - Map get passwordErrors => passwordControl.errors; + Map get passwordErrors => passwordControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 cd570650..4ab2177c 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 @@ -254,7 +254,7 @@ class SubGroupForm implements FormModel { } } - Map get idErrors => idControl.errors; + Map get idErrors => idControl.errors; void get idFocus => form.focus(idControlPath()); @@ -974,9 +974,9 @@ class GroupForm implements FormModel { } } - Map get idErrors => idControl.errors; + Map get idErrors => idControl.errors; - Map get subGroupListErrors => subGroupListControl.errors; + Map get subGroupListErrors => subGroupListControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1859,7 +1859,7 @@ class NestedForm implements FormModel { } } - Map get groupListErrors => groupListControl.errors; + Map get groupListErrors => groupListControl.errors; void get groupListFocus => form.focus(groupListControlPath()); 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 447b49d2..7f8d8a71 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 @@ -255,7 +255,7 @@ class SubGroupOForm implements FormModel { } } - Map get idErrors => idControl.errors; + Map get idErrors => idControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1012,9 +1012,9 @@ class GroupOForm implements FormModel { } } - Map get idErrors => idControl.errors; + Map get idErrors => idControl.errors; - Map get subGroupListErrors => subGroupListControl.errors; + Map get subGroupListErrors => subGroupListControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1908,7 +1908,7 @@ class NestedOForm implements FormModel { } } - Map get groupListErrors => groupListControl.errors; + Map get groupListErrors => groupListControl.errors; void get groupListFocus => form.focus(groupListControlPath()); 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 27a24fcc..725801fe 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 @@ -290,9 +290,9 @@ class ProductDetailsForm

} } - Map? get descriptionErrors => descriptionControl.errors; + Map? get descriptionErrors => descriptionControl.errors; - Map? get idErrors => idControl.errors; + Map? get idErrors => idControl.errors; void get descriptionFocus => form.focus(descriptionControlPath()); @@ -706,9 +706,9 @@ class IdForm

} } - Map? get companyNameErrors => companyNameControl.errors; + Map? get companyNameErrors => companyNameControl.errors; - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; void get companyNameFocus => form.focus(companyNameControlPath()); 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 76ed6587..baccc8ca 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 @@ -293,9 +293,9 @@ class ProductDetailsOForm

} } - Map? get descriptionErrors => descriptionControl.errors; + Map? get descriptionErrors => descriptionControl.errors; - Map? get idErrors => idControl.errors; + Map? get idErrors => idControl.errors; void get descriptionFocus => form.focus(descriptionControlPath()); @@ -713,9 +713,9 @@ class IdOForm

} } - Map? get companyNameErrors => companyNameControl.errors; + Map? get companyNameErrors => companyNameControl.errors; - Map? get nameErrors => nameControl.errors; + Map? get nameErrors => nameControl.errors; void get companyNameFocus => form.focus(companyNameControlPath()); 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 da6d0e7f..54332a33 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 @@ -415,28 +415,28 @@ class ProfileForm implements FormModel { } } - Map get idErrors => idControl.errors; + Map get idErrors => idControl.errors; - Map get anotherIdErrors => anotherIdControl.errors; + Map get anotherIdErrors => anotherIdControl.errors; - Map get nameErrors => nameControl.errors; + Map get nameErrors => nameControl.errors; - Map get chartingOrderErrors => chartingOrderControl.errors; + Map get chartingOrderErrors => chartingOrderControl.errors; - Map get numberingStandardErrors => + Map get numberingStandardErrors => numberingStandardControl.errors; - Map get measurementTypeErrors => + Map get measurementTypeErrors => measurementTypeControl.errors; - Map get audioGuidanceErrors => audioGuidanceControl.errors; + Map get audioGuidanceErrors => audioGuidanceControl.errors; - Map get incidenceFilterErrors => + Map get incidenceFilterErrors => incidenceFilterControl.errors; - Map get thresholdErrors => thresholdControl.errors; + Map get thresholdErrors => thresholdControl.errors; - Map get timerErrors => timerControl.errors; + Map get timerErrors => timerControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1451,22 +1451,22 @@ class IncidenceFilterForm } } - Map get isMobilityEnabledErrors => + Map get isMobilityEnabledErrors => isMobilityEnabledControl.errors; - Map get isFurcationEnabledErrors => + Map get isFurcationEnabledErrors => isFurcationEnabledControl.errors; - Map get isBleedingEnabledErrors => + Map get isBleedingEnabledErrors => isBleedingEnabledControl.errors; - Map get isSuppurationEnabledErrors => + Map get isSuppurationEnabledErrors => isSuppurationEnabledControl.errors; - Map get isCalculusEnabledErrors => + Map get isCalculusEnabledErrors => isCalculusEnabledControl.errors; - Map get isPlaqueEnabledErrors => + Map get isPlaqueEnabledErrors => isPlaqueEnabledControl.errors; void get isMobilityEnabledFocus => form.focus(isMobilityEnabledControlPath()); @@ -2129,9 +2129,9 @@ class ThresholdSettingForm } } - Map get isEnabledErrors => isEnabledControl.errors; + Map get isEnabledErrors => isEnabledControl.errors; - Map get valueErrors => valueControl.errors; + Map get valueErrors => valueControl.errors; void get isEnabledFocus => form.focus(isEnabledControlPath()); @@ -2504,9 +2504,9 @@ class TimerSettingForm implements FormModel { } } - Map get isEnabledErrors => isEnabledControl.errors; + Map get isEnabledErrors => isEnabledControl.errors; - Map get valueErrors => valueControl.errors; + Map get valueErrors => valueControl.errors; void get isEnabledFocus => form.focus(isEnabledControlPath()); 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 fc8dfa58..f4f902e5 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 @@ -416,28 +416,28 @@ class ProfileOForm implements FormModel { } } - Map get idErrors => idControl.errors; + Map get idErrors => idControl.errors; - Map get anotherIdErrors => anotherIdControl.errors; + Map get anotherIdErrors => anotherIdControl.errors; - Map get nameErrors => nameControl.errors; + Map get nameErrors => nameControl.errors; - Map get chartingOrderErrors => chartingOrderControl.errors; + Map get chartingOrderErrors => chartingOrderControl.errors; - Map get numberingStandardErrors => + Map get numberingStandardErrors => numberingStandardControl.errors; - Map get measurementTypeErrors => + Map get measurementTypeErrors => measurementTypeControl.errors; - Map get audioGuidanceErrors => audioGuidanceControl.errors; + Map get audioGuidanceErrors => audioGuidanceControl.errors; - Map get incidenceFilterErrors => + Map get incidenceFilterErrors => incidenceFilterControl.errors; - Map get thresholdErrors => thresholdControl.errors; + Map get thresholdErrors => thresholdControl.errors; - Map get timerErrors => timerControl.errors; + Map get timerErrors => timerControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1453,22 +1453,22 @@ class IncidenceFilterOForm } } - Map get isMobilityEnabledErrors => + Map get isMobilityEnabledErrors => isMobilityEnabledControl.errors; - Map get isFurcationEnabledErrors => + Map get isFurcationEnabledErrors => isFurcationEnabledControl.errors; - Map get isBleedingEnabledErrors => + Map get isBleedingEnabledErrors => isBleedingEnabledControl.errors; - Map get isSuppurationEnabledErrors => + Map get isSuppurationEnabledErrors => isSuppurationEnabledControl.errors; - Map get isCalculusEnabledErrors => + Map get isCalculusEnabledErrors => isCalculusEnabledControl.errors; - Map get isPlaqueEnabledErrors => + Map get isPlaqueEnabledErrors => isPlaqueEnabledControl.errors; void get isMobilityEnabledFocus => form.focus(isMobilityEnabledControlPath()); @@ -2133,9 +2133,9 @@ class ThresholdSettingOForm } } - Map get isEnabledErrors => isEnabledControl.errors; + Map get isEnabledErrors => isEnabledControl.errors; - Map get valueErrors => valueControl.errors; + Map get valueErrors => valueControl.errors; void get isEnabledFocus => form.focus(isEnabledControlPath()); @@ -2513,9 +2513,9 @@ class TimerSettingOForm } } - Map get isEnabledErrors => isEnabledControl.errors; + Map get isEnabledErrors => isEnabledControl.errors; - Map get valueErrors => valueControl.errors; + Map get valueErrors => valueControl.errors; void get isEnabledFocus => form.focus(isEnabledControlPath()); 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 5be19c8e..13d0172d 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 @@ -316,13 +316,13 @@ class SecuredAreaForm implements FormModel { } } - Map? get idErrors => idControl.errors; + Map? get idErrors => idControl.errors; - Map? get securedAreaErrors => securedAreaControl.errors; + Map? get securedAreaErrors => securedAreaControl.errors; - Map? get parcelSystemErrors => parcelSystemControl.errors; + Map? get parcelSystemErrors => parcelSystemControl.errors; - Map get subSecuredAreasErrors => + Map get subSecuredAreasErrors => subSecuredAreasControl.errors; void get idFocus => form.focus(idControlPath()); @@ -1018,10 +1018,10 @@ class ParcelSystemForm implements FormModel { } } - Map get hasParcelSystemErrors => + Map get hasParcelSystemErrors => hasParcelSystemControl.errors; - Map get dataErrors => dataControl.errors; + Map get dataErrors => dataControl.errors; void get hasParcelSystemFocus => form.focus(hasParcelSystemControlPath()); @@ -1375,7 +1375,7 @@ class ParcelSystemDataForm } } - Map? get idErrors => idControl.errors; + Map? get idErrors => idControl.errors; void get idFocus => form.focus(idControlPath()); 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 dda9f32d..92bcdc84 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 @@ -277,9 +277,9 @@ class SomeWiredNameForm implements FormModel { } } - Map get emailErrors => emailControl.errors; + Map get emailErrors => emailControl.errors; - Map get passwordErrors => passwordControl.errors; + Map get passwordErrors => passwordControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 7b390ab9..2d13e474 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 @@ -279,9 +279,9 @@ class SomeWiredNameForm } } - Map? get emailErrors => emailControl.errors; + Map? get emailErrors => emailControl.errors; - Map? get passwordErrors => passwordControl.errors; + Map? get passwordErrors => passwordControl.errors; void get emailFocus => form.focus(emailControlPath()); 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 a571b697..37c60ae2 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 @@ -326,15 +326,15 @@ class UserProfileForm implements FormModel { } } - Map get idErrors => idControl.errors; + Map get idErrors => idControl.errors; - Map get firstNameErrors => firstNameControl.errors; + Map get firstNameErrors => firstNameControl.errors; - Map get lastNameErrors => lastNameControl.errors; + Map get lastNameErrors => lastNameControl.errors; - Map get homeErrors => homeControl.errors; + Map get homeErrors => homeControl.errors; - Map? get officeErrors => officeControl.errors; + Map? get officeErrors => officeControl.errors; void get idFocus => form.focus(idControlPath()); @@ -948,11 +948,11 @@ class AddressForm implements FormModel { } } - Map? get streetErrors => streetControl.errors; + Map? get streetErrors => streetControl.errors; - Map? get cityErrors => cityControl.errors; + Map? get cityErrors => cityControl.errors; - Map? get zipErrors => zipControl.errors; + Map? get zipErrors => zipControl.errors; void get streetFocus => form.focus(streetControlPath()); 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 5449687b..e3629246 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 @@ -330,15 +330,15 @@ class UserProfileOForm implements FormModel { } } - Map get idErrors => idControl.errors; + Map get idErrors => idControl.errors; - Map? get firstNameErrors => firstNameControl.errors; + Map? get firstNameErrors => firstNameControl.errors; - Map? get lastNameErrors => lastNameControl.errors; + Map? get lastNameErrors => lastNameControl.errors; - Map get homeErrors => homeControl.errors; + Map get homeErrors => homeControl.errors; - Map? get officeErrors => officeControl.errors; + Map? get officeErrors => officeControl.errors; void get idFocus => form.focus(idControlPath()); @@ -999,11 +999,11 @@ class AddressOForm implements FormModel { } } - Map? get streetErrors => streetControl.errors; + Map? get streetErrors => streetControl.errors; - Map? get cityErrors => cityControl.errors; + Map? get cityErrors => cityControl.errors; - Map? get zipErrors => zipControl.errors; + Map? get zipErrors => zipControl.errors; void get streetFocus => form.focus(streetControlPath()); diff --git a/packages/reactive_forms_generator/example/pubspec.yaml b/packages/reactive_forms_generator/example/pubspec.yaml index 4ed7971e..b4d2ebf1 100644 --- a/packages/reactive_forms_generator/example/pubspec.yaml +++ b/packages/reactive_forms_generator/example/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: sdk: flutter reactive_forms_annotations: path: ../../reactive_forms_annotations - reactive_forms: ^18.0.0 + reactive_forms: ^18.2.2 intl: ">=0.19.0 <1.0.0" freezed_annotation: ^3.1.0 dartz: ^0.10.1 @@ -23,7 +23,7 @@ dependencies: reactive_forms_lbc: ^4.0.4 dependency_overrides: - reactive_forms: ^18.0.0 + reactive_forms: ^18.2.2 dev_dependencies: reactive_forms_generator: diff --git a/packages/reactive_forms_generator/lib/src/reactive_forms_generator/errors_method.dart b/packages/reactive_forms_generator/lib/src/reactive_forms_generator/errors_method.dart index 2cc3dd65..0affa9d9 100644 --- a/packages/reactive_forms_generator/lib/src/reactive_forms_generator/errors_method.dart +++ b/packages/reactive_forms_generator/lib/src/reactive_forms_generator/errors_method.dart @@ -11,7 +11,7 @@ class ErrorsMethod extends ReactiveFormGeneratorMethod { ..name = field.errorsMethodName ..lambda = true ..type = MethodType.getter - ..returns = Reference('Map${field.nullabilitySuffix}') + ..returns = Reference('Map${field.nullabilitySuffix}') ..body = Code('${field.fieldControlName}.errors'), ); } diff --git a/packages/reactive_forms_generator/pubspec.yaml b/packages/reactive_forms_generator/pubspec.yaml index 45503068..33e7e405 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: 8.1.0-beta2 +version: 8.2.0 environment: sdk: ">=3.8.0 <4.0.0" diff --git a/pubspec.lock b/pubspec.lock index 24fe9117..a7833fdb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -109,10 +109,10 @@ packages: dependency: transitive description: name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" charcode: dependency: transitive description: @@ -376,14 +376,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" - js: - dependency: transitive - description: - name: js - sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" - url: "https://pub.dev" - source: hosted - version: "0.7.2" json_annotation: dependency: transitive description: @@ -444,18 +436,18 @@ packages: dependency: transitive description: name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861 url: "https://pub.dev" source: hosted - version: "0.12.17" + version: "0.12.19" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.13.0" melos: dependency: "direct dev" description: @@ -588,10 +580,10 @@ packages: dependency: "direct overridden" description: name: reactive_forms - sha256: dc840a9c1fbc3dc6c97e791801e96b0b0be6d9c7b41cc676fdc4043878dbc714 + sha256: b8dcd47f933927a0da76ec366f24377710595596a3253283927c18560a01e902 url: "https://pub.dev" source: hosted - version: "18.2.0" + version: "18.2.2" reactive_forms_lbc: dependency: transitive description: @@ -729,10 +721,10 @@ packages: dependency: transitive description: name: test - sha256: "75906bf273541b676716d1ca7627a17e4c4070a3a16272b7a3dc7da3b9f3f6b7" + sha256: "8d9ceddbab833f180fbefed08afa76d7c03513dfdba87ffcec2718b02bbcbf20" url: "https://pub.dev" source: hosted - version: "1.26.3" + version: "1.31.0" test_api: dependency: "direct overridden" description: