File tree 3 files changed +10
-1
lines changed
3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
import 'package:flutter/material.dart' ;
2
+ import 'package:food_recipe/src/ui/listmeals/list_meals.dart' ;
2
3
import 'package:food_recipe/values/color_assets.dart' ;
3
4
4
5
import 'ui/favorite/favorite_screen.dart' ;
5
6
import 'ui/home/home_screen.dart' ;
7
+ import 'utils/utils.dart' ;
6
8
7
9
class App extends StatefulWidget {
8
10
@override
@@ -15,6 +17,11 @@ class _AppState extends State<App> {
15
17
@override
16
18<
8000
/code>
Widget build (BuildContext context) {
17
19
return MaterialApp (
20
+ routes: {
21
+ navigatorListMeals: (context) {
22
+ return ListMeals ();
23
+ }
24
+ },
18
25
theme: ThemeData (
19
26
primaryColor: ColorAssets .primarySwatchColor,
20
27
accentColor: ColorAssets .accentColor,
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ class _HomeScreenState extends State<HomeScreen> {
115
115
padding: const EdgeInsets .only (right: 4.0 ),
116
116
child: GestureDetector (
117
117
onTap: () {
118
- // TODO: do something in here
118
+ Navigator . pushNamed (context, navigatorListMeals);
119
119
},
120
120
child: Card (
121
121
shape: RoundedRectangleBorder (
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import 'dart:io' show Platform;
3
3
import 'package:flutter/cupertino.dart' ;
4
4
import 'package:flutter/material.dart' ;
5
5
6
+ const navigatorListMeals = "/list_meals" ;
7
+
6
8
Widget buildCircularProgressIndicator () {
7
9
if (Platform .isIOS) {
8
10
return CupertinoActivityIndicator ();
You can’t perform that action at this time.
0 commit comments