Skip to content

Commit b31494f

Browse files
committed
new sample added - sports store
1 parent 31efd83 commit b31494f

File tree

11 files changed

+567
-2
lines changed

11 files changed

+567
-2
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,10 @@ You can follow me on twitter [@diegoveloper](https://www.twitter.com/diegovelope
4747
| App Clone / Photo Concept | Animations / Page View Animated |
4848
|--|--|
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">
50-
</center>
50+
</center>
51+
52+
| App Clone / Sports Store | |
53+
|--|--|
54+
| <center> <img src="https://media.giphy.com/media/RJn8BMmOzfaW101iS2/giphy.gif" width="250"> </center> | <center>
55+
</center>
56+

images/balls/ball1.png

140 KB
Loading

images/balls/ball2.png

80.2 KB
Loading

images/balls/ball3.png

69.2 KB
Loading

images/balls/ball4.png

140 KB
Loading

images/mesi.png

76.5 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/sports_store/sports_store_page.dart';
45
import 'package:flutter_samples/app_clone/twitter_profile/twitter_profile_page.dart';
56
import 'package:flutter_samples/main.dart';
67

@@ -45,6 +46,12 @@ class MainAppCloneState extends State<MainAppsClone> {
4546
onButtonTap(PhotoConceptPage());
4647
},
4748
),
49+
MyMenuButton(
50+
title: "Sports Store",
51+
actionTap: () {
52+
onButtonTap(SportsStorePage());
53+
},
54+
),
4855
],
4956
),
5057
),
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_samples/app_clone/sports_store/sports_store_page.dart';
3+
4+
class SportsStoreDetailPage extends StatelessWidget {
5+
final Ball ball;
6+
7+
const SportsStoreDetailPage({Key key, this.ball}) : super(key: key);
8+
9+
@override
10+
Widget build(BuildContext context) {
11+
final size = MediaQuery.of(context).size;
12+
return Scaffold(
13+
body: Stack(
14+
fit: StackFit.expand,
15+
children: [
16+
Positioned(
17+
top: 0,
18+
right: 0,
19+
width: size.width / 2.5,
20+
height: size.height / 1.8,
21+
child: Hero(
22+
tag: 'hero_background_${ball.name}',
23+
child: Container(
24+
decoration: BoxDecoration(
25+
color: ball.color,
26+
borderRadius: BorderRadius.only(
27+
bottomLeft: Radius.circular(30),
28+
),
29+
),
30+
),
31+
),
32+
),
33+
Positioned(
34+
left: 30,
35+
top: 100,
36+
child: Hero(
37+
tag: 'hero_text_${ball.name}',
38+
child: Material(
39+
color: Colors.transparent,
40+
child: Text(
41+
ball.name.split(' ').join('\n'),
42+
style: TextStyle(
43+
color: Colors.black,
44+
fontSize: 40,
45+
fontWeight: FontWeight.w700),
46+
),
47+
),
48+
),
49+
),
50+
Positioned(
51+
right: 30,
52+
top: size.height / 4,
53+
child: Hero(
54+
tag: 'hero_ball_${ball.name}',
55+
child: Image.asset(
56+
ball.image,
57+
height: MediaQuery.of(context).size.width / 2.2,
58+
),
59+
),
60+
),
61+
Positioned(
62+
left: 20,
63+
top: 40,
64+
child: BackButton(),
65+
),
66+
],
67+
),
68+
);
69+
}
70+
}

0 commit comments

Comments
 (0)