Skip to content

Commit

Permalink
add new recipe layout for the first container in the horizontal slide…
Browse files Browse the repository at this point in the history
…r for recipes
  • Loading branch information
chrismotian committed Jul 1, 2021
1 parent 539365b commit f0db33f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/recipes_suggestions_layout.dart
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:hello_fridge/single_recipe_layout.dart';


class RecipesSuggestionsLayout extends StatefulWidget {
Expand Down Expand Up @@ -26,7 +27,14 @@ class _RecipesSuggestionsLayoutState extends State<RecipesSuggestionsLayout> {
height: 200,
width: 200,
color: Colors.black12,
child: Text("Mayo Fries"),
child: GestureDetector(
onTap: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => SingleRecipeLayout()));
},
child: Text("Mayo Fries")
),

),
Container(
margin: EdgeInsets.all(8),
Expand Down
20 changes: 20 additions & 0 deletions lib/single_recipe_layout.dart
@@ -0,0 +1,20 @@
import 'package:flutter/material.dart';


class SingleRecipeLayout extends StatefulWidget {
const SingleRecipeLayout({Key? key}) : super(key: key);

@override
_SingleRecipeLayoutState createState() => _SingleRecipeLayoutState();
}

class _SingleRecipeLayoutState extends State<SingleRecipeLayout> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Mayo Fries"),
),
);
}
}

0 comments on commit f0db33f

Please sign in to comment.