Skip to content

Commit 92a0ad1

Browse files
committed
comply the page 10 of group 05. but not include the font typeface.
1 parent 45c4aca commit 92a0ad1

17 files changed

+423
-2
lines changed

images/feed/city.png

113 KB
Loading

images/feed/feed_more.png

5.24 KB
Loading

images/feed/feed_search.png

5.52 KB
Loading

images/feed/shop_river.png

251 KB
Loading

images/feed/white_background.png

98.3 KB
Loading

lib/const/color_const.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ const BOTTOM_COLORS = [MAIN_COLOR, DARK_COLOR];
1111
const YELLOW = Color(0xfffbed96);
1212
const BLUE = Color(0xffabecd6);
1313
const PURPLE = Color(0xffccc3fc);
14-
const RED = Color(0xffffb6b3);
14+
const RED = Color(0xffF2A7B3);
15+
const GREEN = Color(0xffc7e5b4);
16+
const RED_LIGHT = Color(0xffFFC3A0);
17+
const TEXT_BLACK = Color(0xFF353535);

lib/const/page_str_const.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ const FEED_PAGES = [
4242
"Feed page 01",
4343
"Feed page 02",
4444
"Feed page 03",
45+
"Feed page 04",
46+
"Feed page 05",
47+
"Feed page 06",
48+
"Feed page 07",
49+
"Feed page 08",
50+
"Feed page 09",
51+
"Feed page 10",
52+
"Feed page 11",
53+
"Feed page 12",
54+
"Feed page 13",
4555

4656
/// fixme you could add by your group one name fit one page.
4757
];

lib/main.dart

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,19 @@ class MyApp extends StatelessWidget {
1919
routes: {
2020
SIGN_UP_PAGES[0]: (context) => SignPageOne(),
2121
SIGN_UP_PAGES[1]: (context) => SignPageTwo(),
22-
//FIXME there are other pages to jump with 'page_str_const.dart',there should be make by manager
2322

23+
///FEED group page
24+
FEED_PAGES[0]: (context) => FeedPageOne(),
25+
FEED_PAGES[0]: (context) => FeedPageOne(),
26+
FEED_PAGES[0]: (context) => FeedPageOne(),
27+
FEED_PAGES[0]: (context) => FeedPageOne(),
28+
FEED_PAGES[0]: (context) => FeedPageOne(),
29+
FEED_PAGES[0]: (context) => FeedPageOne(),
30+
FEED_PAGES[9]: (context) => FeedPageTen(),
31+
FEED_PAGES[10]: (context) => FeedPageEleven(),
32+
FEED_PAGES[11]: (context) => FeedPageTwelve(),
33+
FEED_PAGES[12]: (context) => FeedPageThirteen(),
34+
//FIXME there are other pages to jump with 'page_str_const.dart',there should be make by manager
2435
},
2536
onUnknownRoute: (setting) =>
2637
MaterialPageRoute(builder: (context) => EmptyPage()),

lib/page/feed/FeedPageEleven.dart

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
///
2+
/// Created by NieBin on 2018/12/26
3+
/// Github: https://github.com/nb312
4+
5+
///
6+
import "package:flutter/material.dart";
7+
8+
class FeedPageEleven extends StatefulWidget {
9+
@override
10+
_FeedState createState() => _FeedState();
11+
}
12+
13+
class _FeedState extends State<FeedPageEleven> {
14+
@override
15+
Widget build(BuildContext context) {
16+
return Scaffold(
17+
appBar: AppBar(
18+
title: Text("Feed Eleven"),
19+
),
20+
body: Text("Feed page Eleven"),
21+
);
22+
}
23+
}

lib/page/feed/FeedPageTen.dart

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
///
2+
/// Created by NieBin on 2018/12/26
3+
/// Github: https://github.com/nb312
4+
5+
///
6+
import "package:flutter/material.dart";
7+
import 'top_title.dart';
8+
import 'package:flutter_ui_nice/const/color_const.dart';
9+
import 'package:flutter_ui_nice/util/SizeUtil.dart';
10+
import 'feed_const.dart';
11+
12+
class FeedPageTen extends StatefulWidget {
13+
@override
14+
_FeedState createState() => _FeedState();
15+
}
16+
17+
class _FeedState extends State<FeedPageTen> {
18+
Widget _redBackground() => Container(
19+
alignment: AlignmentDirectional.topStart,
20+
constraints: BoxConstraints.expand(
21+
height: SizeUtil.getAxisY(1043.0), width: SizeUtil.getAxisX(630.0)),
22+
margin: EdgeInsets.only(
23+
top: SizeUtil.getAxisY(82.0),
24+
),
25+
decoration: BoxDecoration(
26+
gradient: LinearGradient(colors: [RED_LIGHT, RED]),
27+
borderRadius: BorderRadius.only(
28+
topRight: Radius.circular(SizeUtil.getAxisBoth(22.0)),
29+
bottomLeft: Radius.circular(SizeUtil.getAxisBoth(22.0)),
30+
bottomRight: Radius.circular(SizeUtil.getAxisBoth(22.0)),
31+
),
32+
),
33+
);
34+
35+
Widget _imageGroup() => Container(
36+
constraints: BoxConstraints.expand(
37+
height: SizeUtil.getAxisY(495.0), width: SizeUtil.getAxisX(685.0)),
38+
margin: EdgeInsets.only(top: SizeUtil.getAxisY(43.0)),
39+
child: Row(
40+
children: <Widget>[
41+
Container(
42+
constraints:
43+
BoxConstraints.expand(width: SizeUtil.getAxisX(442.0)),
44+
child: Image.asset(
45+
FeedImage.shop_river,
46+
fit: BoxFit.fill,
47+
),
48+
),
49+
Expanded(
50+
child: Column(
51+
crossAxisAlignment: CrossAxisAlignment.start,
52+
children: <Widget>[
53+
Expanded(
54+
flex: 1,
55+
child: Image.asset(
56+
FeedImage.white_back,
57+
fit: BoxFit.cover,
58+
),
59+
),
60+
Expanded(
61+
flex: 1,
62+
child: Image.asset(
63+
FeedImage.city,
64+
fit: BoxFit.cover,
65+
),
66+
),
67+
],
68+
),
69+
)
70+
],
71+
),
72+
);
73+
74+
Widget _header() => Padding(
75+
padding: EdgeInsets.only(left: SizeUtil.getAxisX(26.0)),
76+
child: Container(
77+
width: SizeUtil.getAxisBoth(CIRCLE_BUTTON_HEIGHT),
78+
height: SizeUtil.getAxisBoth(CIRCLE_BUTTON_HEIGHT),
79+
decoration: BoxDecoration(
80+
image: DecorationImage(image: AssetImage(FeedImage.white_back)),
81+
borderRadius: BorderRadius.circular(
82+
SizeUtil.getAxisBoth(22.0),
83+
),
84+
),
85+
),
86+
);
87+
88+
Widget _postDesc() => Container(
89+
padding: EdgeInsets.only(
90+
left: SizeUtil.getAxisX(60.0),
91+
right: SizeUtil.getAxisX(152.0),
92+
top: SizeUtil.getAxisY(51.0)),
93+
child: RichText(
94+
text: TextSpan(
95+
children: [
96+
TextSpan(
97+
text: "Hristo ",
98+
style: TextStyle(fontWeight: FontWeight.w700)),
99+
TextSpan(
100+
text:
101+
"added 127 new photos to the Lorem Ipsum dolr sit amet.")
102+
],
103+
style: TextStyle(
104+
color: TEXT_BLACK,
105+
fontSize: SizeUtil.getAxisBoth(TEXT_NORMAL_SIZE),
106+
),
107+
),
108+
),
109+
);
110+
111+
Widget _timeDesc() => Container(
112+
padding: EdgeInsets.only(right: SizeUtil.getAxisX(159.0)),
113+
alignment: AlignmentDirectional.centerEnd,
114+
child: Text(
115+
"1 MINUTE",
116+
style: TextStyle(
117+
color: TEXT_BLACK,
118+
fontSize: SizeUtil.getAxisBoth(TEXT_SMALL_SIZE)),
119+
),
120+
);
121+
122+
Widget _contentView() => Container(
123+
padding: EdgeInsets.only(top: SizeUtil.getAxisY(41.0)),
124+
child: Column(
125+
crossAxisAlignment: CrossAxisAlignment.start,
126+
mainAxisAlignment: MainAxisAlignment.start,
127+
children: <Widget>[
128+
_header(),
129+
_timeDesc(),
130+
_postDesc(),
131+
_imageGroup(),
132+
Container(
133+
alignment: AlignmentDirectional.topStart,
134+
margin: EdgeInsets.only(
135+
top: SizeUtil.getAxisY(81.0),
136+
left: SizeUtil.getAxisX(60.0),
137+
right: SizeUtil.getAxisX(200.0)),
138+
child: Text(
139+
"LOREM IPSUM",
140+
style: TextStyle(
141+
color: TEXT_BLACK,
142+
fontSize: SizeUtil.getAxisBoth(TEXT_LARGE_SIZE),
143+
fontWeight: FontWeight.w700),
144+
),
145+
),
146+
Container(
147+
alignment: AlignmentDirectional.topStart,
148+
margin: EdgeInsets.only(
149+
top: SizeUtil.getAxisY(29.0),
150+
left: SizeUtil.getAxisX(60.0),
151+
right: SizeUtil.getAxisX(200.0)),
152+
child: Text(
153+
"Cras quis nulla com, aliquam lectus sed, blandit augue. Duis tincidunt urna non pretium",
154+
style: TextStyle(
155+
color: TEXT_BLACK,
156+
fontSize: SizeUtil.getAxisBoth(TEXT_NORMAL_SIZE),
157+
),
158+
),
159+
)
160+
],
161+
),
162+
);
163+
164+
Widget _body() => Stack(
165+
children: <Widget>[
166+
_redBackground(),
167+
_contentView(),
168+
],
169+
);
170+
171+
@override
172+
Widget build(BuildContext context) {
173+
return Scaffold(
174+
body: Container(
175+
constraints: BoxConstraints.expand(),
176+
decoration: BoxDecoration(
177+
gradient: LinearGradient(colors: [YELLOW, GREEN]),
178+
),
179+
child: Column(
180+
mainAxisAlignment: MainAxisAlignment.start,
181+
crossAxisAlignment: CrossAxisAlignment.start,
182+
children: <Widget>[
183+
TopTitleBar(),
184+
_body(),
185+
],
186+
),
187+
),
188+
);
189+
}
190+
}

lib/page/feed/FeedPageThirteen.dart

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
///
2+
/// Created by NieBin on 2018/12/26
3+
/// Github: https://github.com/nb312
4+
5+
///
6+
import "package:flutter/material.dart";
7+
8+
class FeedPageThirteen extends StatefulWidget {
9+
@override
10+
_FeedState createState() => _FeedState();
11+
}
12+
13+
class _FeedState extends State<FeedPageThirteen> {
14+
@override
15+
Widget build(BuildContext context) {
16+
return Scaffold(
17+
appBar: AppBar(
18+
title: Text("Feed Thirteen"),
19+
),
20+
body: Text("Feed page Thirteen"),
21+
);
22+
}
23+
}

lib/page/feed/FeedPageTwelve.dart

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
///
2+
/// Created by NieBin on 2018/12/26
3+
/// Github: https://github.com/nb312
4+
5+
///
6+
import "package:flutter/material.dart";
7+
8+
class FeedPageTwelve extends StatefulWidget {
9+
@override
10+
_FeedState createState() => _FeedState();
11+
}
12+
13+
class _FeedState extends State<FeedPageTwelve> {
14+
@override
15+
Widget build(BuildContext context) {
16+
return Scaffold(
17+
appBar: AppBar(
18+
title: Text("Feed Twelve"),
19+
),
20+
body: Text("Feed page Twelve"),
21+
);
22+
}
23+
}

lib/page/feed/feed_const.dart

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
///
2+
/// Created by NieBin on 2018/12/26
3+
/// Github: https://github.com/nb312
4+
5+
import "package:flutter/material.dart";
6+
7+
class FeedStringConst {
8+
static const FEED_NAME = "Feed";
9+
}
10+
11+
const CIRCLE_BUTTON_HEIGHT = 87.0;
12+
const TOP_BAR_HEIGHT = 152.0;
13+
const TOP_BAR_GRADIENT_HEIGHT = 133.0;
14+
15+
const TEXT_LARGE_SIZE = 40.0;
16+
const TEXT_NORMAL_2_SIZE = 28.0;
17+
const TEXT_NORMAL_SIZE = 26.0;
18+
const TEXT_SMALL_SIZE = 20.0;
19+
20+
class FeedImage {
21+
static const IMAGE_PATH = "images/feed";
22+
static const more_circle = "$IMAGE_PATH/feed_more.png";
23+
static const search_circle = "$IMAGE_PATH/feed_search.png";
24+
static const white_back = "$IMAGE_PATH/white_background.png";
25+
static const city = "$IMAGE_PATH/city.png";
26+
static const shop_river = "$IMAGE_PATH/shop_river.png";
27+
}

lib/page/feed/top_title.dart

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
///
2+
/// Created by NieBin on 2018/12/26
3+
/// Github: https://github.com/nb312
4+
5+
///
6+
import "package:flutter/material.dart";
7+
import 'feed_const.dart';
8+
import 'package:flutter_ui_nice/const/color_const.dart';
9+
import 'package:flutter_ui_nice/util/SizeUtil.dart';
10+
11+
class TopTitleBar extends StatelessWidget {
12+
@override
13+
Widget build(BuildContext context) {
14+
return Container(
15+
constraints:
16+
BoxConstraints.expand(height: SizeUtil.getAxisY(TOP_BAR_HEIGHT)),
17+
child: Stack(
18+
children: <Widget>[
19+
Container(
20+
constraints: BoxConstraints.expand(
21+
height: SizeUtil.getAxisY(TOP_BAR_GRADIENT_HEIGHT)),
22+
decoration:
23+
BoxDecoration(gradient: LinearGradient(colors: [YELLOW, BLUE])),
24+
),
25+
Center(
26+
child: Padding(
27+
padding: EdgeInsets.only(top: SizeUtil.getAxisY(30.0)),
28+
child: Text(
29+
FeedStringConst.FEED_NAME,
30+
style: TextStyle(
31+
color: TEXT_BLACK,
32+
fontSize: SizeUtil.getAxisBoth(TEXT_NORMAL_2_SIZE),
33+
fontWeight: FontWeight.w700),
34+
),
35+
),
36+
),
37+
Container(
38+
padding: EdgeInsets.symmetric(horizontal: SizeUtil.getAxisX(24.0)),
39+
alignment: AlignmentDirectional.bottomStart,
40+
child: Row(
41+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
42+
children: <Widget>[
43+
Image.asset(FeedImage.more_circle,
44+
width: SizeUtil.getAxisY(CIRCLE_BUTTON_HEIGHT),
45+
height: SizeUtil.getAxisY(CIRCLE_BUTTON_HEIGHT)),
46+
Image.asset(FeedImage.search_circle,
47+
width: SizeUtil.getAxisY(CIRCLE_BUTTON_HEIGHT),
48+
height: SizeUtil.getAxisY(CIRCLE_BUTTON_HEIGHT))
49+
]),
50+
)
51+
],
52+
),
53+
);
54+
}
55+
}

0 commit comments

Comments
 (0)