updated pizza recipe widget
This commit is contained in:
parent
7533e3a261
commit
424001f6e1
3 changed files with 35 additions and 20 deletions
|
@ -111,6 +111,13 @@ class PizzaPlannerState extends State<PizzaPlanner> {
|
||||||
initialRoute: widget.initialRoute,
|
initialRoute: widget.initialRoute,
|
||||||
navigatorKey: navigatorKey,
|
navigatorKey: navigatorKey,
|
||||||
onGenerateRoute: RouteGenerator.generateRoute,
|
onGenerateRoute: RouteGenerator.generateRoute,
|
||||||
|
theme: ThemeData(
|
||||||
|
textTheme: const TextTheme(
|
||||||
|
subtitle1: TextStyle(fontSize: 12, color: Color.fromARGB(255, 100, 100, 100)),
|
||||||
|
headline3: TextStyle(fontSize: 50, color: Color.fromARGB(255, 10, 10, 10)),
|
||||||
|
),
|
||||||
|
primaryColor: const Color.fromARGB(255, 200, 42, 53),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:fluttericon/font_awesome5_icons.dart';
|
import 'package:fluttericon/font_awesome5_icons.dart';
|
||||||
import 'package:pizzaplanner/entities/PizzaRecipe/pizza_recipe.dart';
|
import 'package:pizzaplanner/entities/PizzaRecipe/pizza_recipe.dart';
|
||||||
|
@ -10,24 +11,33 @@ class PizzaRecipeWidget extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
//height: 120,
|
decoration: const BoxDecoration(
|
||||||
//color: Colors.blueAccent,
|
color: Colors.white,
|
||||||
child: Container(
|
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||||
child: Column(
|
),
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
child: Column(
|
||||||
children: <Widget>[
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
if (pizzaRecipe.imgUrl != null)
|
children: <Widget>[
|
||||||
Image.network(pizzaRecipe.imgUrl!)
|
if (pizzaRecipe.imgUrl != null)
|
||||||
else
|
Image.network(pizzaRecipe.imgUrl!)
|
||||||
const Icon(FontAwesome5.pizza_slice, size: 100,),
|
else
|
||||||
Row(
|
const Icon(FontAwesome5.pizza_slice, size: 100, color: Color.fromARGB(100, 150, 150, 150)),
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
Row(
|
||||||
children: <Widget>[
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
Text(pizzaRecipe.name),
|
children: <Widget>[
|
||||||
]
|
Text(pizzaRecipe.name, style: Theme.of(context).textTheme.headline5),
|
||||||
),
|
]
|
||||||
]
|
),
|
||||||
)
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
"${pizzaRecipe.getMinDuration().inHours.round()} to ${pizzaRecipe.getMaxDuration().inHours.round()} hours",
|
||||||
|
style: Theme.of(context).textTheme.subtitle1
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
2
todo.md
2
todo.md
|
@ -9,8 +9,6 @@
|
||||||
|
|
||||||
## Refactor
|
## Refactor
|
||||||
- create a theme for the app
|
- create a theme for the app
|
||||||
- prettify confirm event page
|
|
||||||
- prettify view event page
|
- prettify view event page
|
||||||
- prettify pizza event widget
|
- prettify pizza event widget
|
||||||
- prettify pizza recipe widget
|
|
||||||
## Bug
|
## Bug
|
Loading…
Add table
Reference in a new issue