Sports page passes game ID to Schedule/Calendar properly and generates correct calendar

This commit is contained in:
Carlos Lopez-Rosario
2020-04-18 11:10:13 -04:00
parent 9e3541c119
commit 39912bd37e
4 changed files with 19 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ class RouteGenerator {
static Route<dynamic> generateRoute(RouteSettings settings) {
final args = settings
.arguments; //This is how we pass arguments and can be used in case
print("args $args");
switch (settings.name) {
case '/':
return MaterialPageRoute(builder: (_) => Home());
@@ -20,7 +20,7 @@ class RouteGenerator {
//We can put logic and stuff here for checking if logged in
return MaterialPageRoute(builder: (_) => Sport(args));
case '/Schedule':
return MaterialPageRoute(builder: (_) => Schedule());
return MaterialPageRoute(builder: (_) => Schedule(args));
case '/Standing':
return MaterialPageRoute(builder: (_) => Standing());
case '/Chat':