mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
Fix filipino cuisine (#468)
* update filipino cuisine to match hosted JSON https://filipino-cuisine-app.firebaseio.com/data.json must have changed recently * use local version of data.json in filipino_cuisine app * remove unknown JSON keys
This commit is contained in:
@@ -25,7 +25,7 @@ class Home extends StatefulWidget {
|
||||
}
|
||||
|
||||
class HState extends State<Home> {
|
||||
List fd;
|
||||
Map fd;
|
||||
Map fi;
|
||||
|
||||
void initState() {
|
||||
@@ -35,9 +35,9 @@ class HState extends State<Home> {
|
||||
|
||||
getData() async {
|
||||
http.Response r =
|
||||
await http.get('https://filipino-cuisine-app.firebaseio.com/data.json');
|
||||
await http.get('/data.json');
|
||||
fd = json.decode(r.body);
|
||||
setState(() => fi = fd[0]);
|
||||
setState(() => fi = fd['0']);
|
||||
}
|
||||
|
||||
Widget build(ct) {
|
||||
@@ -54,17 +54,18 @@ class HState extends State<Home> {
|
||||
Expanded(
|
||||
flex: 5,
|
||||
child: Swiper(
|
||||
onIndexChanged: (n) => setState(() => fi = fd[n]),
|
||||
itemCount: fd.length,
|
||||
onIndexChanged: (n) => setState(() => fi = fd['$n']),
|
||||
itemCount:
|
||||
fd.keys.where((key) => int.tryParse(key) != null).length,
|
||||
itemBuilder: (cx, i) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(top: 40, bottom: 24),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
child: Hero(
|
||||
tag: fd[i]['fn'],
|
||||
child:
|
||||
Image.asset(fd[i]['pf'], fit: BoxFit.cover)),
|
||||
tag: fd['$i']['fn'],
|
||||
child: Image.asset(fd['$i']['pf'],
|
||||
fit: BoxFit.cover)),
|
||||
));
|
||||
},
|
||||
viewportFraction: .85,
|
||||
@@ -100,8 +101,8 @@ class HState extends State<Home> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text(fi['ig'][i]['n'],
|
||||
style:
|
||||
t.subtitle2.copyWith(fontFamily: 'opb')),
|
||||
style: t.subtitle2
|
||||
.copyWith(fontFamily: 'opb')),
|
||||
Text(fi['ig'][i]['c'],
|
||||
style:
|
||||
t.caption.copyWith(fontFamily: 'opr'))
|
||||
|
||||
366
web/filipino_cuisine/web/data.json
Normal file
366
web/filipino_cuisine/web/data.json
Normal file
@@ -0,0 +1,366 @@
|
||||
{
|
||||
"0":{
|
||||
"cn":"120 Gr 85 Kcal 13 Min",
|
||||
"ct":"3 minutes",
|
||||
"dc":"Calamares is the Filipino version of the Mediterranean breaded fried squid dish, Calamari. ",
|
||||
"fn":"Calamares",
|
||||
"fv":false,
|
||||
"ig":[
|
||||
{
|
||||
"c":"1/2 lb",
|
||||
"n":"Squid",
|
||||
"p":"squid.png"
|
||||
},
|
||||
{
|
||||
"c":"3/4 cup",
|
||||
"n":"Flour",
|
||||
"p":"flour.png"
|
||||
},
|
||||
{
|
||||
"c":"1 pc",
|
||||
"n":"Egg",
|
||||
"p":"egg.png"
|
||||
},
|
||||
{
|
||||
"c":"1 tsp",
|
||||
"n":"Salt",
|
||||
"p":"salt.png"
|
||||
},
|
||||
{
|
||||
"c":"1/2 tsp",
|
||||
"n":"Black Pepper",
|
||||
"p":"black_pepper.png"
|
||||
},
|
||||
{
|
||||
"c":"2 cups",
|
||||
"n":"Cooking Oil",
|
||||
"p":"oil.png"
|
||||
}
|
||||
],
|
||||
"in":[
|
||||
"Combine squid, salt, and ground black pepper then mix well. Let stand for 10 minutes",
|
||||
"Heat a cooking pot the pour-in cooking oil",
|
||||
"Dredge the squid in flour then dip in beaten egg and roll over",
|
||||
"When the oil is hot enough, deep-fry the squid until the color of the coating turns brown",
|
||||
"Remove the fried squid from the cooking pot and transfer in a plate lined with paper towels",
|
||||
"Serve with sinamak or Asian dipping sauce"
|
||||
],
|
||||
"pf":"calamares.jpg",
|
||||
"pt":"10 minutes",
|
||||
"sv":"3",
|
||||
"tt":"13 MIN"
|
||||
},
|
||||
"1":{
|
||||
"cn":"260 Gr 293 Kcal 1 Hour 42 Min",
|
||||
"ct":"1 hour 30 minutes",
|
||||
"dc":"Sisig is a popular Filipino dish. It is composed of minced pork, chopped onion, and mayonnaise.",
|
||||
"fn":"Pork Sisig",
|
||||
"fv":false,
|
||||
"ig":[
|
||||
{
|
||||
"c":"1 1/2 lb",
|
||||
"n":"Pork Meat",
|
||||
"p":"pork.png"
|
||||
},
|
||||
{
|
||||
"c":"1 pc",
|
||||
"n":"Onion",
|
||||
"p":"onion.png"
|
||||
},
|
||||
{
|
||||
"c":"3 tsp",
|
||||
"n":"Chili",
|
||||
"p":"chili.png"
|
||||
},
|
||||
{
|
||||
"c":"1/2 tsp",
|
||||
"n":"Garlic",
|
||||
"p":"garlic.png"
|
||||
},
|
||||
{
|
||||
"c":"1/4 tsp",
|
||||
"n":"Black Pepper",
|
||||
"p":"black_pepper.png"
|
||||
},
|
||||
{
|
||||
"c":"1 pc",
|
||||
"n":"Lemon",
|
||||
"p":"lemon.png"
|
||||
},
|
||||
{
|
||||
"c":"1/2 cup",
|
||||
"n":"Butter",
|
||||
"p":"butter.png"
|
||||
},
|
||||
{
|
||||
"c":"1/2 tsp",
|
||||
"n":"Salt",
|
||||
"p":"salt.png"
|
||||
},
|
||||
{
|
||||
"c":"1 pc",
|
||||
"n":"Egg",
|
||||
"p":"egg.png"
|
||||
}
|
||||
],
|
||||
"in":[
|
||||
"Pour the water in a pan and bring to a boil Add salt and pepper",
|
||||
"Put-in the pork meat then simmer for 40 minutes to 1 hour (or until tender)",
|
||||
"Grill the boiled pork meat until done",
|
||||
"Chop the pork meat into fine pieces",
|
||||
"In a wide pan, melt the butter. Add the onions. Cook until onions are soft.",
|
||||
"Put-in the ginger and cook for 2 minutes",
|
||||
"Add the pork meat. Cook for 10 to 12 minutes",
|
||||
"Put-in the soy sauce, garlic powder, and chili. Mix well",
|
||||
"Add salt and pepper to taste",
|
||||
"Put-in the mayonnaise and mix with the other ingredients",
|
||||
"Transfer to a serving plate. Top with chopped green onions and raw egg",
|
||||
"Add the lemon before eating"
|
||||
],
|
||||
"pf":"pork_sisig.jpg",
|
||||
"pt":"12 minutes",
|
||||
"sv":"6",
|
||||
"tt":"1 hour 42 minutes"
|
||||
},
|
||||
"2":{
|
||||
"cn":"120 Gr 168 Kcal 1 Hour 10 Min",
|
||||
"ct":"3 minutes",
|
||||
"dc":"Pochero or Puchero is a well-loved Filipino stew. Made with meat, tomatoes, and saba bananas. ",
|
||||
"fn":"Pochero",
|
||||
"fv":false,
|
||||
"ig":[
|
||||
{
|
||||
"c":"1 large",
|
||||
"n":"Banana",
|
||||
"p":"banana.png"
|
||||
},
|
||||
{
|
||||
"c":"2 pcs",
|
||||
"n":"Tomato",
|
||||
"p":"tomato.png"
|
||||
},
|
||||
{
|
||||
"c":"1 lb",
|
||||
"n":"Pork Meat",
|
||||
"p":"pork.png"
|
||||
},
|
||||
{
|
||||
"c":"1 pc",
|
||||
"n":"Onion",
|
||||
"p":"onion.png"
|
||||
},
|
||||
{
|
||||
"c":"1 tsp",
|
||||
"n":"Garlic",
|
||||
"p":"garlic.png"
|
||||
},
|
||||
{
|
||||
"c":"1 tbsp",
|
||||
"n":"Peppercorn",
|
||||
"p":"black_pepper.png"
|
||||
},
|
||||
{
|
||||
"c":"1 medium",
|
||||
"n":"Potato",
|
||||
"p":"potato.png"
|
||||
},
|
||||
{
|
||||
"c":"1 small",
|
||||
"n":"Cabbage",
|
||||
"p":"cabbage.png"
|
||||
},
|
||||
{
|
||||
"c":"1 bunch",
|
||||
"n":"Bok Choy",
|
||||
"p":"bokchoy.png"
|
||||
},
|
||||
{
|
||||
"c":"1/4 lb",
|
||||
"n":"Green Beans",
|
||||
"p":"green_beans.png"
|
||||
},
|
||||
{
|
||||
"c":"2 tbsp",
|
||||
"n":"Cooking Oil",
|
||||
"p":"oil.png"
|
||||
}
|
||||
],
|
||||
"in":[
|
||||
"Heat cooking oil in a cooking pot",
|
||||
"Sauté garlic, onions, and tomatoes",
|
||||
"Add pork and cook until the color turns light brown",
|
||||
"Put-in fish sauce, whole pepper corn, and tomato sauce. Stir.",
|
||||
"Add water and let boil. Simmer until pork is tender (about 30 to 40 minutes)",
|
||||
"Put-in potato, plantain, and chick peas. Cook for 5 to 7 minutes.",
|
||||
"Add cabbage and long green beans. Cook for 5 minutes",
|
||||
"Stir-in the bok choy. Cover the pot and turn off the heat",
|
||||
"Let the residual heat cook the bok choy (about 5 minutes)",
|
||||
"Transfer to a serving plate and serve"
|
||||
],
|
||||
"pf":"pochero.jpg",
|
||||
"pt":"10 minutes",
|
||||
"sv":"3",
|
||||
"tt":"13 MIN"
|
||||
},
|
||||
"3":{
|
||||
"cn":"140 Gr 250 Kcal 1 Hour 30 Min",
|
||||
"ct":"3 minutes",
|
||||
"dc":"A type of Filipino Beef Stew. This dish is cooked in a tomato-based sauce with vegetables such as potato, carrot, and bell pepper.",
|
||||
"fn":"Beef Caldereta",
|
||||
"fv":false,
|
||||
"ig":[
|
||||
{
|
||||
"c":"1/2 lb",
|
||||
"n":"Beef",
|
||||
"p":"beef.png"
|
||||
},
|
||||
{
|
||||
"c":"2 medium",
|
||||
"n":"Carrot",
|
||||
"p":"carrot.png"
|
||||
},
|
||||
{
|
||||
"c":"1 large",
|
||||
"n":"Potato",
|
||||
"p":"potato.png"
|
||||
},
|
||||
{
|
||||
"c":"1 small",
|
||||
"n":"Green Bell Pepper",
|
||||
"p":"green_bell.png"
|
||||
},
|
||||
{
|
||||
"c":"1 small",
|
||||
"n":"Red Bell Pepper",
|
||||
"p":"red_bell.png"
|
||||
},
|
||||
{
|
||||
"c":"2 Cloves",
|
||||
"n":"Garlic",
|
||||
"p":"garlic.png"
|
||||
},
|
||||
{
|
||||
"c":"1 medium",
|
||||
"n":"Yellow Onion",
|
||||
"p":"yellow_onion.png"
|
||||
},
|
||||
{
|
||||
"c":"1 tsp",
|
||||
"n":"Salt",
|
||||
"p":"salt.png"
|
||||
},
|
||||
{
|
||||
"c":"6 tbsp",
|
||||
"n":"Cooking oil",
|
||||
"p":"oil.png"
|
||||
},
|
||||
{
|
||||
"c":"1 tsp",
|
||||
"n":"Peppercorn",
|
||||
"p":"black_pepper.png"
|
||||
},
|
||||
{
|
||||
"c":"1 tsp",
|
||||
"n":"Red Pepper",
|
||||
"p":"chili.png"
|
||||
}
|
||||
],
|
||||
"in":[
|
||||
"Heat a pan or wok and then pour 3 tablespoons cooking oil. Stir-fry the bell peppers for 3 minutes. Remove the bell peppers and put in a plate. Set aside",
|
||||
"Using the oil in the pan (add more if necessary), pan fry the carrots and potato for 3 to 5 minutes. Put these in a plate and then set aside",
|
||||
"Heat the remaining 3 tablespoons of oil in a clean pot",
|
||||
"Sauté the garlic and onion",
|
||||
"Add the beef. Cook until it turns light brown",
|
||||
"Pour –in tomato sauce and water. Let boil",
|
||||
"Continue to cook in low heat for 60 minutes or until the beef gets tender. Add more water if needed",
|
||||
"Stir-in the liver spread and then add some salt and pepper",
|
||||
"Put the pan-fried potato and carrots in the pot. Stir. Add the bell peppers",
|
||||
"Cover the pot. Continue to cook for 5 minutes",
|
||||
"Add the red pepper flakes. Stir and cook for 3 minutes more",
|
||||
"Transfer to a serving plate. Serve"
|
||||
],
|
||||
"pf":"beef_caldereta.jpg",
|
||||
"pt":"10 minutes",
|
||||
"sv":"3",
|
||||
"tt":"13 MIN"
|
||||
},
|
||||
"4":{
|
||||
"cn":"90 Gr 130 Kcal 1 Hour 15 Min",
|
||||
"ct":"3 minutes",
|
||||
"dc":"Pork Embutido is a Filipino-style meatloaf made with a festive mixture of ground pork, carrots, and raisins wrapped around slices of eggs and sausage.",
|
||||
"fn":"Embutido",
|
||||
"fv":false,
|
||||
"ig":[
|
||||
{
|
||||
"c":"2 lbs",
|
||||
"n":"Ground pork",
|
||||
"p":"ground_pork.png"
|
||||
},
|
||||
{
|
||||
"c":"12 pcs",
|
||||
"n":"Sausage",
|
||||
"p":"sausage.png"
|
||||
},
|
||||
{
|
||||
"c":"3 pcs",
|
||||
"n":"Egg",
|
||||
"p":"egg.png"
|
||||
},
|
||||
{
|
||||
"c":"2 cups",
|
||||
"n":"Cheese",
|
||||
"p":"cheese.png"
|
||||
},
|
||||
{
|
||||
"c":"1 cup",
|
||||
"n":"Red Bell Pepper",
|
||||
"p":"red_bell.png"
|
||||
},
|
||||
{
|
||||
"c":"1 cup",
|
||||
"n":"Green Bell Pepper",
|
||||
"p":"green_bell.png"
|
||||
},
|
||||
{
|
||||
"c":"1/2 cup",
|
||||
"n":"Raisins",
|
||||
"p":"raisins.png"
|
||||
},
|
||||
{
|
||||
"c":"1/2 cup",
|
||||
"n":"Carrot",
|
||||
"p":"carrot.png"
|
||||
},
|
||||
{
|
||||
"c":"1/2 cup",
|
||||
"n":"Onion",
|
||||
"p":"onion.png"
|
||||
},
|
||||
{
|
||||
"c":"2 tbsp",
|
||||
"n":"Salt",
|
||||
"p":"salt.png"
|
||||
},
|
||||
{
|
||||
"c":"1 tbsp",
|
||||
"n":"Peppercorn",
|
||||
"p":"black_pepper.png"
|
||||
}
|
||||
],
|
||||
"in":[
|
||||
"Place the ground pork in a large container",
|
||||
"Add the bread crumbs then break the raw eggs and add it in. Mix well",
|
||||
"Put-in the carrots, bell pepper (red and green), onion, pickle relish, and cheddar cheese. Mix thoroughly",
|
||||
"Add the raisins, tomato sauce, salt, and pepper then mix well.",
|
||||
"Put in the sliced vienna sausage and sliced boiled eggs alternately on the middle of the flat meat mixture.",
|
||||
"Roll the foil to form a cylinder — locking the sausage and egg in the middle if the meat mixture. Once done, lock the edges of the foil.",
|
||||
"Place in a steamer and let cook for 1 hour.",
|
||||
"Place inside the refrigerator until temperature turns cold",
|
||||
"Slice and serve"
|
||||
],
|
||||
"pf":"embutido.jpg",
|
||||
"pt":"10 minutes",
|
||||
"sv":"3",
|
||||
"tt":"13 MIN"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user