From 20e3e5b6e18d29737118bde27e704f6929920573 Mon Sep 17 00:00:00 2001 From: BroodjeAap Date: Mon, 21 Dec 2020 16:03:27 +0100 Subject: [PATCH] removed switch to decide what instruction to show, just use the PracticeType String to create the route and naviate to that --- lib/pages/practice/PracticeSetupPage.dart | 25 +---------------------- 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/lib/pages/practice/PracticeSetupPage.dart b/lib/pages/practice/PracticeSetupPage.dart index 362d3fc..05e8af6 100644 --- a/lib/pages/practice/PracticeSetupPage.dart +++ b/lib/pages/practice/PracticeSetupPage.dart @@ -25,29 +25,6 @@ class _PracticeSetupState extends State { super.initState(); } - SimpleDialog getInstructionDialog(PracticeType practiceType){ - switch(practiceType){ - case PracticeType.month: { - return getMonthInstructionDialog(); - } - case PracticeType.year: { - return SimpleDialog(); - } - case PracticeType.century: { - return SimpleDialog(); - } - case PracticeType.leap: { - return SimpleDialog(); - } - case PracticeType.mod: { - return SimpleDialog(); - } - default: { - return SimpleDialog(); - } - } - } - TableRow getStatTableRow(AsyncSnapshot> snapshot, PracticeType practiceType){ final typeString = practiceType.toString().split(".").last; return TableRow( @@ -66,7 +43,7 @@ class _PracticeSetupState extends State { onLongPress: () { Navigator.pushNamed( context, - '/instructions/year' + '/instructions/' + practiceType.toString().split(".").last ); }, ),