Skip to content

Commit 1b724f3

Browse files
committed
removed onPressed
1 parent a659fcc commit 1b724f3

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

lib/widgets/dashboard/widgets.dart

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -565,10 +565,9 @@ class _DashboardWorkoutWidgetState extends State<DashboardWorkoutWidget> {
565565
class NothingFound extends StatelessWidget {
566566
final String _title;
567567
final String _titleForm;
568-
final Widget? _form;
569-
final VoidCallback? onPressed;
568+
final Widget _form;
570569

571-
const NothingFound(this._title, this._titleForm, this._form, {this.onPressed});
570+
const NothingFound(this._title, this._titleForm, this._form);
572571

573572
@override
574573
Widget build(BuildContext context) {
@@ -584,19 +583,16 @@ class NothingFound extends StatelessWidget {
584583
Icons.add_box,
585584
color: wgerPrimaryButtonColor,
586585
),
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+
},
600596
),
601597
],
602598
),

0 commit comments

Comments
 (0)