Skip to content
Draft

rf18 #192

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void main() {
group('reactive_forms_generator', () {
test(
'Animated URL list Output',
() async {
() async {
return testGenerator(
fileName: fileName,
model: '''
Expand Down Expand Up @@ -106,7 +106,7 @@ class ReactiveAnimatedUrlLisOForm extends StatelessWidget {
required this.form,
required this.child,
this.canPop,
this.onPopInvoked,
this.onPopInvokedWithResult,
}) : super(key: key);

final Widget child;
Expand All @@ -115,7 +115,8 @@ class ReactiveAnimatedUrlLisOForm extends StatelessWidget {

final bool Function(FormGroup formGroup)? canPop;

final void Function(FormGroup formGroup, bool didPop)? onPopInvoked;
final ReactiveFormPopInvokedWithResultCallback<dynamic>?
onPopInvokedWithResult;

static AnimatedUrlLisOForm? of(
BuildContext context, {
Expand All @@ -142,7 +143,7 @@ class ReactiveAnimatedUrlLisOForm extends StatelessWidget {
stream: form.form.statusChanged,
child: ReactiveFormPopScope(
canPop: canPop,
onPopInvoked: onPopInvoked,
onPopInvokedWithResult: onPopInvokedWithResult,
child: child,
),
);
Expand All @@ -163,7 +164,7 @@ class AnimatedUrlLisOFormBuilder extends StatefulWidget {
this.model,
this.child,
this.canPop,
this.onPopInvoked,
this.onPopInvokedWithResult,
required this.builder,
this.initState,
}) : super(key: key);
Expand All @@ -174,7 +175,8 @@ class AnimatedUrlLisOFormBuilder extends StatefulWidget {

final bool Function(FormGroup formGroup)? canPop;

final void Function(FormGroup formGroup, bool didPop)? onPopInvoked;
final ReactiveFormPopInvokedWithResultCallback<dynamic>?
onPopInvokedWithResult;

final Widget Function(
BuildContext context, AnimatedUrlLisOForm formModel, Widget? child)
Expand Down Expand Up @@ -262,7 +264,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,
Expand Down
16 changes: 9 additions & 7 deletions packages/generator_tests/test/doc/animated_url_list_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void main() {
group('reactive_forms_generator', () {
test(
'Animated URL list',
() async {
() async {
return testGenerator(
fileName: fileName,
model: '''
Expand Down Expand Up @@ -106,7 +106,7 @@ class ReactiveAnimatedUrlListForm extends StatelessWidget {
required this.form,
required this.child,
this.canPop,
this.onPopInvoked,
this.onPopInvokedWithResult,
}) : super(key: key);

final Widget child;
Expand All @@ -115,7 +115,8 @@ class ReactiveAnimatedUrlListForm extends StatelessWidget {

final bool Function(FormGroup formGroup)? canPop;

final void Function(FormGroup formGroup, bool didPop)? onPopInvoked;
final ReactiveFormPopInvokedWithResultCallback<dynamic>?
onPopInvokedWithResult;

static AnimatedUrlListForm? of(
BuildContext context, {
Expand All @@ -142,7 +143,7 @@ class ReactiveAnimatedUrlListForm extends StatelessWidget {
stream: form.form.statusChanged,
child: ReactiveFormPopScope(
canPop: canPop,
onPopInvoked: onPopInvoked,
onPopInvokedWithResult: onPopInvokedWithResult,
child: child,
),
);
Expand All @@ -163,7 +164,7 @@ class AnimatedUrlListFormBuilder extends StatefulWidget {
this.model,
this.child,
this.canPop,
this.onPopInvoked,
this.onPopInvokedWithResult,
required this.builder,
this.initState,
}) : super(key: key);
Expand All @@ -174,7 +175,8 @@ class AnimatedUrlListFormBuilder extends StatefulWidget {

final bool Function(FormGroup formGroup)? canPop;

final void Function(FormGroup formGroup, bool didPop)? onPopInvoked;
final ReactiveFormPopInvokedWithResultCallback<dynamic>?
onPopInvokedWithResult;

final Widget Function(
BuildContext context, AnimatedUrlListForm formModel, Widget? child)
Expand Down Expand Up @@ -262,7 +264,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,
Expand Down
16 changes: 9 additions & 7 deletions packages/generator_tests/test/doc/annotateless_output_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void main() {
group('reactive_forms_generator', () {
test(
'Form with annotateless fields',
() async {
() async {
return testGenerator(
fileName: fileName,
model: '''
Expand Down Expand Up @@ -96,7 +96,7 @@ class ReactiveAnnotatelessOForm extends StatelessWidget {
required this.form,
required this.child,
this.canPop,
this.onPopInvoked,
this.onPopInvokedWithResult,
}) : super(key: key);

final Widget child;
Expand All @@ -105,7 +105,8 @@ class ReactiveAnnotatelessOForm extends StatelessWidget {

final bool Function(FormGroup formGroup)? canPop;

final void Function(FormGroup formGroup, bool didPop)? onPopInvoked;
final ReactiveFormPopInvokedWithResultCallback<dynamic>?
onPopInvokedWithResult;

static AnnotatelessOForm? of(
BuildContext context, {
Expand All @@ -132,7 +133,7 @@ class ReactiveAnnotatelessOForm extends StatelessWidget {
stream: form.form.statusChanged,
child: ReactiveFormPopScope(
canPop: canPop,
onPopInvoked: onPopInvoked,
onPopInvokedWithResult: onPopInvokedWithResult,
child: child,
),
);
Expand All @@ -153,7 +154,7 @@ class AnnotatelessOFormBuilder extends StatefulWidget {
this.model,
this.child,
this.canPop,
this.onPopInvoked,
this.onPopInvokedWithResult,
required this.builder,
this.initState,
}) : super(key: key);
Expand All @@ -164,7 +165,8 @@ class AnnotatelessOFormBuilder extends StatefulWidget {

final bool Function(FormGroup formGroup)? canPop;

final void Function(FormGroup formGroup, bool didPop)? onPopInvoked;
final ReactiveFormPopInvokedWithResultCallback<dynamic>?
onPopInvokedWithResult;

final Widget Function(
BuildContext context, AnnotatelessOForm formModel, Widget? child) builder;
Expand Down Expand Up @@ -250,7 +252,7 @@ class _AnnotatelessOFormBuilderState extends State<AnnotatelessOFormBuilder> {
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,
Expand Down
16 changes: 9 additions & 7 deletions packages/generator_tests/test/doc/annotateless_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void main() {
group('reactive_forms_generator', () {
test(
'Form with annotateless fields',
() async {
() async {
return testGenerator(
fileName: fileName,
model: '''
Expand Down Expand Up @@ -93,7 +93,7 @@ class ReactiveAnnotatelessForm extends StatelessWidget {
required this.form,
required this.child,
this.canPop,
this.onPopInvoked,
this.onPopInvokedWithResult,
}) : super(key: key);

final Widget child;
Expand All @@ -102,7 +102,8 @@ class ReactiveAnnotatelessForm extends StatelessWidget {

final bool Function(FormGroup formGroup)? canPop;

final void Function(FormGroup formGroup, bool didPop)? onPopInvoked;
final ReactiveFormPopInvokedWithResultCallback<dynamic>?
onPopInvokedWithResult;

static AnnotatelessForm? of(
BuildContext context, {
Expand All @@ -129,7 +130,7 @@ class ReactiveAnnotatelessForm extends StatelessWidget {
stream: form.form.statusChanged,
child: ReactiveFormPopScope(
canPop: canPop,
onPopInvoked: onPopInvoked,
onPopInvokedWithResult: onPopInvokedWithResult,
child: child,
),
);
Expand All @@ -150,7 +151,7 @@ class AnnotatelessFormBuilder extends StatefulWidget {
this.model,
this.child,
this.canPop,
this.onPopInvoked,
this.onPopInvokedWithResult,
required this.builder,
this.initState,
}) : super(key: key);
Expand All @@ -161,7 +162,8 @@ class AnnotatelessFormBuilder extends StatefulWidget {

final bool Function(FormGroup formGroup)? canPop;

final void Function(FormGroup formGroup, bool didPop)? onPopInvoked;
final ReactiveFormPopInvokedWithResultCallback<dynamic>?
onPopInvokedWithResult;

final Widget Function(
BuildContext context, AnnotatelessForm formModel, Widget? child) builder;
Expand Down Expand Up @@ -247,7 +249,7 @@ class _AnnotatelessFormBuilderState extends State<AnnotatelessFormBuilder> {
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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class ReactiveArrayNullableOForm extends StatelessWidget {
required this.form,
required this.child,
this.canPop,
this.onPopInvoked,
this.onPopInvokedWithResult,
}) : super(key: key);

final Widget child;
Expand All @@ -118,7 +118,8 @@ class ReactiveArrayNullableOForm extends StatelessWidget {

final bool Function(FormGroup formGroup)? canPop;

final void Function(FormGroup formGroup, bool didPop)? onPopInvoked;
final ReactiveFormPopInvokedWithResultCallback<dynamic>?
onPopInvokedWithResult;

static ArrayNullableOForm? of(
BuildContext context, {
Expand All @@ -145,7 +146,7 @@ class ReactiveArrayNullableOForm extends StatelessWidget {
stream: form.form.statusChanged,
child: ReactiveFormPopScope(
canPop: canPop,
onPopInvoked: onPopInvoked,
onPopInvokedWithResult: onPopInvokedWithResult,
child: child,
),
);
Expand All @@ -166,7 +167,7 @@ class ArrayNullableOFormBuilder extends StatefulWidget {
this.model,
this.child,
this.canPop,
this.onPopInvoked,
this.onPopInvokedWithResult,
required this.builder,
this.initState,
}) : super(key: key);
Expand All @@ -177,7 +178,8 @@ class ArrayNullableOFormBuilder extends StatefulWidget {

final bool Function(FormGroup formGroup)? canPop;

final void Function(FormGroup formGroup, bool didPop)? onPopInvoked;
final ReactiveFormPopInvokedWithResultCallback<dynamic>?
onPopInvokedWithResult;

final Widget Function(
BuildContext context, ArrayNullableOForm formModel, Widget? child)
Expand Down Expand Up @@ -264,7 +266,7 @@ class _ArrayNullableOFormBuilderState extends State<ArrayNullableOFormBuilder> {
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,
Expand Down
14 changes: 8 additions & 6 deletions packages/generator_tests/test/doc/array_nullable_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class ReactiveArrayNullableForm extends StatelessWidget {
required this.form,
required this.child,
this.canPop,
this.onPopInvoked,
this.onPopInvokedWithResult,
}) : super(key: key);

final Widget child;
Expand All @@ -120,7 +120,8 @@ class ReactiveArrayNullableForm extends StatelessWidget {

final bool Function(FormGroup formGroup)? canPop;

final void Function(FormGroup formGroup, bool didPop)? onPopInvoked;
final ReactiveFormPopInvokedWithResultCallback<dynamic>?
onPopInvokedWithResult;

static ArrayNullableForm? of(
BuildContext context, {
Expand All @@ -147,7 +148,7 @@ class ReactiveArrayNullableForm extends StatelessWidget {
stream: form.form.statusChanged,
child: ReactiveFormPopScope(
canPop: canPop,
onPopInvoked: onPopInvoked,
onPopInvokedWithResult: onPopInvokedWithResult,
child: child,
),
);
Expand All @@ -168,7 +169,7 @@ class ArrayNullableFormBuilder extends StatefulWidget {
this.model,
this.child,
this.canPop,
this.onPopInvoked,
this.onPopInvokedWithResult,
required this.builder,
this.initState,
}) : super(key: key);
Expand All @@ -179,7 +180,8 @@ class ArrayNullableFormBuilder extends StatefulWidget {

final bool Function(FormGroup formGroup)? canPop;

final void Function(FormGroup formGroup, bool didPop)? onPopInvoked;
final ReactiveFormPopInvokedWithResultCallback<dynamic>?
onPopInvokedWithResult;

final Widget Function(
BuildContext context, ArrayNullableForm formModel, Widget? child) builder;
Expand Down Expand Up @@ -265,7 +267,7 @@ class _ArrayNullableFormBuilderState extends State<ArrayNullableFormBuilder> {
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,
Expand Down
Loading
Loading