File tree Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -565,10 +565,9 @@ class _DashboardWorkoutWidgetState extends State<DashboardWorkoutWidget> {
565
565
class NothingFound extends StatelessWidget {
566
566
final String _title;
567
567
final String _titleForm;
568
- final Widget ? _form;
569
- final VoidCallback ? onPressed;
568
+ final Widget _form;
570
569
571
- const NothingFound (this ._title, this ._titleForm, this ._form, { this .onPressed} );
570
+ const NothingFound (this ._title, this ._titleForm, this ._form);
572
571
573
572
@override
574
573
Widget build (BuildContext context) {
@@ -584,19 +583,16 @@ class NothingFound extends StatelessWidget {
584
583
Icons .add_box,
585
584
color: wgerPrimaryButtonColor,
586
585
),
587
- onPressed: onPressed ??
588
- () async {
589
- if (_form != null ) {
590
- Navigator .pushNamed (
591
- context,
592
- FormScreen .routeName,
593
- arguments: FormScreenArguments (
594
- _titleForm,
595
- _form! ,
596
- ),
597
- );
598
- }
599
- },
586
+ onPressed: () async {
587
+ Navigator .pushNamed (
588
+ context,
589
+ FormScreen .routeName,
590
+ arguments: FormScreenArguments (
591
+ _titleForm,
592
+ _form,
593
+ ),
594
+ );
595
+ },
600
596
),
601
597
],
602
598
),
You can’t perform that action at this time.
0 commit comments