Skip to content

Commit 95b86e3

Browse files
committed
shoes store
1 parent b31494f commit 95b86e3

File tree

9 files changed

+587
-2
lines changed

9 files changed

+587
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ You can follow me on twitter [@diegoveloper](https://www.twitter.com/diegovelope
4949
| <center> <img src="https://media.giphy.com/media/XybRawN2vj4YV3fhul/giphy.gif" width="250"> </center> | <center> <img src="https://media.giphy.com/media/UuNiEk20TKjn4F4H7a/giphy.gif" width="250">
5050
</center>
5151

52-
| App Clone / Sports Store | |
52+
| App Clone / Sports Store | App Clone / Shoes Store |
5353
|--|--|
54-
| <center> <img src="https://media.giphy.com/media/RJn8BMmOzfaW101iS2/giphy.gif" width="250"> </center> | <center>
54+
| <center> <img src="https://media.giphy.com/media/RJn8BMmOzfaW101iS2/giphy.gif" width="250"> </center> | <center> <img src="https://media.giphy.com/media/MeP49gjvFbUDShkzJM/giphy.gif" width="250">
5555
</center>
5656

images/shoes/1.png

252 KB
Loading

images/shoes/2.png

249 KB
Loading

images/shoes/3.png

199 KB
Loading

images/shoes/4.png

250 KB
Loading

lib/app_clone/main_apps_clone.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:flutter/material.dart';
22
import 'package:flutter_samples/app_clone/android_messages/android_messages_page.dart';
33
import 'package:flutter_samples/app_clone/photo_concept/photo_concept_page.dart';
4+
import 'package:flutter_samples/app_clone/shoes_store/shoes_store_page.dart';
45
import 'package:flutter_samples/app_clone/sports_store/sports_store_page.dart';
56
import 'package:flutter_samples/app_clone/twitter_profile/twitter_profile_page.dart';
67
import 'package:flutter_samples/main.dart';
@@ -52,6 +53,12 @@ class MainAppCloneState extends State<MainAppsClone> {
5253
onButtonTap(SportsStorePage());
5354
},
5455
),
56+
MyMenuButton(
57+
title: "Shoes Store",
58+
actionTap: () {
59+
onButtonTap(ShoesStorePage());
60+
},
61+
),
5562
],
5663
),
5764
),
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import 'package:flutter/material.dart';
2+
3+
import 'shoes_store_page.dart';
4+
5+
class ShoesStoreDetailPage extends StatelessWidget {
6+
final Shoe shoe;
7+
8+
const ShoesStoreDetailPage({Key key, this.shoe}) : super(key: key);
9+
10+
@override
11+
Widget build(BuildContext context) {
12+
final size = MediaQuery.of(context).size;
13+
return Scaffold(
14+
body: Stack(
15+
fit: StackFit.expand,
16+
children: [
17+
Positioned(
18+
top: -size.width / 2,
19+
right: -size.width / 3,
20+
width: size.width * 1.4,
21+
height: size.width * 1.4,
22+
child: Hero(
23+
tag: 'hero_background_${shoe.name}',
24+
child: Container(
25+
decoration: BoxDecoration(
26+
color: shoe.color,
27+
shape: BoxShape.circle,
28+
),
29+
),
30+
),
31+
),
32+
Align(
33+
alignment: Alignment.topCenter,
34+
child: SizedBox(
35+
height: kToolbarHeight + 20,
36+
child: AppBar(
37+
backgroundColor: Colors.transparent,
38+
elevation: 0,
39+
title: Text(
40+
shoe.name.split(' ').first,
41+
style: TextStyle(
42+
color: Colors.white,
43+
fontSize: 25,
44+
fontWeight: FontWeight.w700),
45+
),
46+
actions: [
47+
Padding(
48+
padding: const EdgeInsets.only(right: 14.0),
49+
child: Material(
50+
elevation: 10,
51+
shape: CircleBorder(
52+
side: BorderSide(
53+
color: shoe.color,
54+
)),
55+
color: shoe.color,
56+
child: Padding(
57+
padding: const EdgeInsets.all(5.0),
58+
child: Icon(Icons.favorite_border),
59+
),
60+
),
61+
),
62+
]),
63+
)),
64+
Align(
65+
alignment: Alignment.topCenter,
66+
child: Padding(
67+
padding: EdgeInsets.only(top: size.height * 0.1),
68+
child: Hero(
69+
tag: 'hero_image_${shoe.name}',
70+
child: Image.asset(
71+
shoe.image,
72+
height: MediaQuery.of(context).size.width / 1.2,
73+
),
74+
),
75+
),
76+
),
77+
],
78+
),
79+
);
80+
}
81+
}

0 commit comments

Comments
 (0)