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,
|
||||
navigatorKey: navigatorKey,
|
||||
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:fluttericon/font_awesome5_icons.dart';
|
||||
import 'package:pizzaplanner/entities/PizzaRecipe/pizza_recipe.dart';
|
||||
|
@ -10,24 +11,33 @@ class PizzaRecipeWidget extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
//height: 120,
|
||||
//color: Colors.blueAccent,
|
||||
child: Container(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
if (pizzaRecipe.imgUrl != null)
|
||||
Image.network(pizzaRecipe.imgUrl!)
|
||||
else
|
||||
const Icon(FontAwesome5.pizza_slice, size: 100,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text(pizzaRecipe.name),
|
||||
]
|
||||
),
|
||||
]
|
||||
)
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
if (pizzaRecipe.imgUrl != null)
|
||||
Image.network(pizzaRecipe.imgUrl!)
|
||||
else
|
||||
const Icon(FontAwesome5.pizza_slice, size: 100, color: Color.fromARGB(100, 150, 150, 150)),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
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
|
||||
- create a theme for the app
|
||||
- prettify confirm event page
|
||||
- prettify view event page
|
||||
- prettify pizza event widget
|
||||
- prettify pizza recipe widget
|
||||
## Bug
|
Loading…
Add table
Reference in a new issue