Skip to content
Merged

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 @@ -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;
Expand All @@ -112,7 +112,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, {bool listen = true}) {
if (listen) {
Expand All @@ -139,7 +140,7 @@ class ReactiveAnimatedUrlLisOForm extends StatelessWidget {
stream: form.form.statusChanged,
child: ReactiveFormPopScope(
canPop: canPop,
onPopInvoked: onPopInvoked,
onPopInvokedWithResult: onPopInvokedWithResult,
child: child,
),
);
Expand All @@ -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);
Expand All @@ -171,7 +172,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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -312,7 +314,7 @@ class AnimatedUrlLisOForm
}
}

Map<String, Object> get urlListErrors => urlListControl.errors;
Map<String, dynamic> get urlListErrors => urlListControl.errors;

void get urlListFocus => form.focus(urlListControlPath());

Expand Down Expand Up @@ -719,9 +721,9 @@ class UrlEntityOForm implements FormModel<UrlEntityO, UrlEntityOOutput> {
}
}

Map<String, Object>? get labelErrors => labelControl.errors;
Map<String, dynamic>? get labelErrors => labelControl.errors;

Map<String, Object>? get urlErrors => urlControl.errors;
Map<String, dynamic>? get urlErrors => urlControl.errors;

void get labelFocus => form.focus(labelControlPath());

Expand Down
20 changes: 11 additions & 9 deletions packages/generator_tests/test/doc/animated_url_list_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -112,7 +112,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, {bool listen = true}) {
if (listen) {
Expand All @@ -139,7 +140,7 @@ class ReactiveAnimatedUrlListForm extends StatelessWidget {
stream: form.form.statusChanged,
child: ReactiveFormPopScope(
canPop: canPop,
onPopInvoked: onPopInvoked,
onPopInvokedWithResult: onPopInvokedWithResult,
child: child,
),
);
Expand All @@ -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);
Expand All @@ -171,7 +172,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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -312,7 +314,7 @@ class AnimatedUrlListForm
}
}

Map<String, Object> get urlListErrors => urlListControl.errors;
Map<String, dynamic> get urlListErrors => urlListControl.errors;

void get urlListFocus => form.focus(urlListControlPath());

Expand Down Expand Up @@ -718,9 +720,9 @@ class UrlEntityForm implements FormModel<UrlEntity, UrlEntity> {
}
}

Map<String, Object> get labelErrors => labelControl.errors;
Map<String, dynamic> get labelErrors => labelControl.errors;

Map<String, Object> get urlErrors => urlControl.errors;
Map<String, dynamic> get urlErrors => urlControl.errors;

void get labelFocus => form.focus(labelControlPath());

Expand Down
18 changes: 10 additions & 8 deletions packages/generator_tests/test/doc/annotateless_output_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -103,7 +103,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, {bool listen = true}) {
if (listen) {
Expand All @@ -130,7 +131,7 @@ class ReactiveAnnotatelessOForm extends StatelessWidget {
stream: form.form.statusChanged,
child: ReactiveFormPopScope(
canPop: canPop,
onPopInvoked: onPopInvoked,
onPopInvokedWithResult: onPopInvokedWithResult,
child: child,
),
);
Expand All @@ -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);
Expand All @@ -162,7 +163,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,
Expand Down Expand Up @@ -255,7 +257,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 Expand Up @@ -317,9 +319,9 @@ class AnnotatelessOForm
}
}

Map<String, Object> get emailErrors => emailControl.errors;
Map<String, dynamic> get emailErrors => emailControl.errors;

Map<String, Object> get passwordErrors => passwordControl.errors;
Map<String, dynamic> get passwordErrors => passwordControl.errors;

void get emailFocus => form.focus(emailControlPath());

Expand Down
18 changes: 10 additions & 8 deletions packages/generator_tests/test/doc/annotateless_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -100,7 +100,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, {bool listen = true}) {
if (listen) {
Expand All @@ -127,7 +128,7 @@ class ReactiveAnnotatelessForm extends StatelessWidget {
stream: form.form.statusChanged,
child: ReactiveFormPopScope(
canPop: canPop,
onPopInvoked: onPopInvoked,
onPopInvokedWithResult: onPopInvokedWithResult,
child: child,
),
);
Expand All @@ -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);
Expand All @@ -159,7 +160,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,
Expand Down Expand Up @@ -252,7 +254,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 Expand Up @@ -313,9 +315,9 @@ class AnnotatelessForm implements FormModel<Annotateless, Annotateless> {
}
}

Map<String, Object> get emailErrors => emailControl.errors;
Map<String, dynamic> get emailErrors => emailControl.errors;

Map<String, Object> get passwordErrors => passwordControl.errors;
Map<String, dynamic> get passwordErrors => passwordControl.errors;

void get emailFocus => form.focus(emailControlPath());

Expand Down
25 changes: 14 additions & 11 deletions packages/generator_tests/test/doc/array_nullable_output_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -115,7 +115,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, {bool listen = true}) {
if (listen) {
Expand All @@ -142,7 +143,7 @@ class ReactiveArrayNullableOForm extends StatelessWidget {
stream: form.form.statusChanged,
child: ReactiveFormPopScope(
canPop: canPop,
onPopInvoked: onPopInvoked,
onPopInvokedWithResult: onPopInvokedWithResult,
child: child,
),
);
Expand All @@ -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);
Expand All @@ -174,7 +175,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,
Expand Down Expand Up @@ -267,7 +269,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 Expand Up @@ -394,15 +396,16 @@ class ArrayNullableOForm
}
}

Map<String, Object>? get someListErrors => someListControl.errors;
Map<String, dynamic>? get someListErrors => someListControl.errors;

Map<String, Object> get emailListErrors => emailListControl.errors;
Map<String, dynamic> get emailListErrors => emailListControl.errors;

Map<String, Object> get fruitListErrors => fruitListControl.errors;
Map<String, dynamic> get fruitListErrors => fruitListControl.errors;

Map<String, Object>? get vegetablesListErrors => vegetablesListControl.errors;
Map<String, dynamic>? get vegetablesListErrors =>
vegetablesListControl.errors;

Map<String, Object>? get modeListErrors => modeListControl.errors;
Map<String, dynamic>? get modeListErrors => modeListControl.errors;

void get someListFocus => form.focus(someListControlPath());

Expand Down
Loading
Loading