Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sunlight3d committed May 22, 2020
1 parent d16def3 commit 8d28425
Show file tree
Hide file tree
Showing 19 changed files with 24 additions and 18 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified 01-Install Flutter on Windows 10 and MacOS Catalina/.DS_Store
Binary file not shown.
Binary file modified 02-Dart basics-variables, functions, string, list/.DS_Store
Binary file not shown.
Binary file modified 03-Dart basics-Class, object, constructor, method/.DS_Store
Binary file not shown.
Binary file modified 04-Dart basics-CRUD a list of objects/.DS_Store
Binary file not shown.
Binary file modified 05-Dart basics-Final & const, Map type/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified 12-Flutter basics-Add ListTile inside a Card /.DS_Store
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified 16-Flutter basics-Show and custom a Modal Bottom Sheet/.DS_Store
Binary file not shown.
Binary file not shown.
42 changes: 24 additions & 18 deletions 23/myappTemp/lib/detail_food_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,35 @@ class DetailFoodPage extends StatelessWidget {
Widget build(BuildContext context) {
// TODO: implement build
return Scaffold(
body: Container(
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Center(
child: FadeInImage.assetNetwork(
placeholder: 'assets/images/loading.gif',
image: food.urlImage,
)
),
Text('Ingredients', style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),),
ListView.builder(
appBar: AppBar(
title: Text('${food.name}'),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Center(
child: FadeInImage.assetNetwork(
placeholder: 'assets/images/loading.gif',
image: food.urlImage,
)
),
Text('Ingredients', style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),),
Expanded(
child: ListView.builder(
itemCount: this.food.ingredients.length,
itemBuilder: (context, index) {
String ingredient = this.food.ingredients[index];
return ListTile(
leading: CircleAvatar(child: Text('$index'),),
title: Text(ingredient, style: TextStyle(fontSize: 16),),
leading: CircleAvatar(
child: Text('\#${index + 1}', style:
TextStyle(fontSize: 20, color: Colors.white),),
backgroundColor: Colors.redAccent,),
title: Text(ingredient, style: TextStyle(fontSize: 18),),
);
}
)
],
),
),
), ],
),
);
}
Expand Down

0 comments on commit 8d28425

Please sign in to comment.