Skip to content

add some picture and comply page 10 of group 05 #1

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Dec 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added doc/01-#-no.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/02-walk_through-no.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/03-navigation-no.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/04-profile-no.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/05-feed-no.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/06-chat-no.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/07-shopping-no.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/08-statistics-no.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/09-media-no.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/10-camera-no.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/feed/city.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/feed/feed_more.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/feed/feed_search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/feed/shop_river.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/feed/white_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion lib/const/color_const.dart
Original file line number Diff line number Diff line change
@@ -11,4 +11,7 @@ const BOTTOM_COLORS = [MAIN_COLOR, DARK_COLOR];
const YELLOW = Color(0xfffbed96);
const BLUE = Color(0xffabecd6);
const PURPLE = Color(0xffccc3fc);
const RED = Color(0xffffb6b3);
const RED = Color(0xffF2A7B3);
const GREEN = Color(0xffc7e5b4);
const RED_LIGHT = Color(0xffFFC3A0);
const TEXT_BLACK = Color(0xFF353535);
10 changes: 10 additions & 0 deletions lib/const/page_str_const.dart
Original file line number Diff line number Diff line change
@@ -42,6 +42,16 @@ const FEED_PAGES = [
"Feed page 01",
"Feed page 02",
"Feed page 03",
"Feed page 04",
"Feed page 05",
"Feed page 06",
"Feed page 07",
"Feed page 08",
"Feed page 09",
"Feed page 10",
"Feed page 11",
"Feed page 12",
"Feed page 13",

/// fixme you could add by your group one name fit one page.
];
13 changes: 12 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -19,8 +19,19 @@ class MyApp extends StatelessWidget {
routes: {
SIGN_UP_PAGES[0]: (context) => SignPageOne(),
SIGN_UP_PAGES[1]: (context) => SignPageTwo(),
//FIXME there are other pages to jump with 'page_str_const.dart',there should be make by manager

///FEED group page
FEED_PAGES[0]: (context) => FeedPageOne(),
FEED_PAGES[0]: (context) => FeedPageOne(),
FEED_PAGES[0]: (context) => FeedPageOne(),
FEED_PAGES[0]: (context) => FeedPageOne(),
FEED_PAGES[0]: (context) => FeedPageOne(),
FEED_PAGES[0]: (context) => FeedPageOne(),
FEED_PAGES[9]: (context) => FeedPageTen(),
FEED_PAGES[10]: (context) => FeedPageEleven(),
FEED_PAGES[11]: (context) => FeedPageTwelve(),
FEED_PAGES[12]: (context) => FeedPageThirteen(),
//FIXME there are other pages to jump with 'page_str_const.dart',there should be make by manager
},
onUnknownRoute: (setting) =>
MaterialPageRoute(builder: (context) => EmptyPage()),
23 changes: 23 additions & 0 deletions lib/page/feed/FeedPageEleven.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
///
/// Created by NieBin on 2018/12/26
/// Github: https://github.com/nb312
/// Email: niebin312@gmail.com
///
import "package:flutter/material.dart";

class FeedPageEleven extends StatefulWidget {
@override
_FeedState createState() => _FeedState();
}

class _FeedState extends State<FeedPageEleven> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Feed Eleven"),
),
body: Text("Feed page Eleven"),
);
}
}
190 changes: 190 additions & 0 deletions lib/page/feed/FeedPageTen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
///
/// Created by NieBin on 2018/12/26
/// Github: https://github.com/nb312
/// Email: niebin312@gmail.com
///
import "package:flutter/material.dart";
import 'top_title.dart';
import 'package:flutter_ui_nice/const/color_const.dart';
import 'package:flutter_ui_nice/util/SizeUtil.dart';
import 'feed_const.dart';

class FeedPageTen extends StatefulWidget {
@override
_FeedState createState() => _FeedState();
}

class _FeedState extends State<FeedPageTen> {
Widget _redBackground() => Container(
alignment: AlignmentDirectional.topStart,
constraints: BoxConstraints.expand(
height: SizeUtil.getAxisY(1043.0), width: SizeUtil.getAxisX(630.0)),
margin: EdgeInsets.only(
top: SizeUtil.getAxisY(82.0),
),
decoration: BoxDecoration(
gradient: LinearGradient(colors: [RED_LIGHT, RED]),
borderRadius: BorderRadius.only(
topRight: Radius.circular(SizeUtil.getAxisBoth(22.0)),
bottomLeft: Radius.circular(SizeUtil.getAxisBoth(22.0)),
bottomRight: Radius.circular(SizeUtil.getAxisBoth(22.0)),
),
),
);

Widget _imageGroup() => Container(
constraints: BoxConstraints.expand(
height: SizeUtil.getAxisY(495.0), width: SizeUtil.getAxisX(685.0)),
margin: EdgeInsets.only(top: SizeUtil.getAxisY(43.0)),
child: Row(
children: <Widget>[
Container(
constraints:
BoxConstraints.expand(width: SizeUtil.getAxisX(442.0)),
child: Image.asset(
FeedImage.shop_river,
fit: BoxFit.fill,
),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
flex: 1,
child: Image.asset(
FeedImage.white_back,
fit: BoxFit.cover,
),
),
Expanded(
flex: 1,
child: Image.asset(
FeedImage.city,
fit: BoxFit.cover,
),
),
],
),
)
],
),
);

Widget _header() => Padding(
padding: EdgeInsets.only(left: SizeUtil.getAxisX(26.0)),
child: Container(
width: SizeUtil.getAxisBoth(CIRCLE_BUTTON_HEIGHT),
height: SizeUtil.getAxisBoth(CIRCLE_BUTTON_HEIGHT),
decoration: BoxDecoration(
image: DecorationImage(image: AssetImage(FeedImage.white_back)),
borderRadius: BorderRadius.circular(
SizeUtil.getAxisBoth(22.0),
),
),
),
);

Widget _postDesc() => Container(
padding: EdgeInsets.only(
left: SizeUtil.getAxisX(60.0),
right: SizeUtil.getAxisX(152.0),
top: SizeUtil.getAxisY(51.0)),
child: RichText(
text: TextSpan(
children: [
TextSpan(
text: "Hristo ",
style: TextStyle(fontWeight: FontWeight.w700)),
TextSpan(
text:
"added 127 new photos to the Lorem Ipsum dolr sit amet.")
],
style: TextStyle(
color: TEXT_BLACK,
fontSize: SizeUtil.getAxisBoth(TEXT_NORMAL_SIZE),
),
),
),
);

Widget _timeDesc() => Container(
padding: EdgeInsets.only(right: SizeUtil.getAxisX(159.0)),
alignment: AlignmentDirectional.centerEnd,
child: Text(
"1 MINUTE",
style: TextStyle(
color: TEXT_BLACK,
fontSize: SizeUtil.getAxisBoth(TEXT_SMALL_SIZE)),
),
);

Widget _contentView() => Container(
padding: EdgeInsets.only(top: SizeUtil.getAxisY(41.0)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
_header(),
_timeDesc(),
_postDesc(),
_imageGroup(),
Container(
alignment: AlignmentDirectional.topStart,
margin: EdgeInsets.only(
top: SizeUtil.getAxisY(81.0),
left: SizeUtil.getAxisX(60.0),
right: SizeUtil.getAxisX(200.0)),
child: Text(
"LOREM IPSUM",
style: TextStyle(
color: TEXT_BLACK,
fontSize: SizeUtil.getAxisBoth(TEXT_LARGE_SIZE),
fontWeight: FontWeight.w700),
),
),
Container(
alignment: AlignmentDirectional.topStart,
margin: EdgeInsets.only(
top: SizeUtil.getAxisY(29.0),
left: SizeUtil.getAxisX(60.0),
right: SizeUtil.getAxisX(200.0)),
child: Text(
"Cras quis nulla com, aliquam lectus sed, blandit augue. Duis tincidunt urna non pretium",
style: TextStyle(
color: TEXT_BLACK,
fontSize: SizeUtil.getAxisBoth(TEXT_NORMAL_SIZE),
),
),
)
],
),
);

Widget _body() => Stack(
children: <Widget>[
_redBackground(),
_contentView(),
],
);

@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
constraints: BoxConstraints.expand(),
decoration: BoxDecoration(
gradient: LinearGradient(colors: [YELLOW, GREEN]),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
TopTitleBar(),
_body(),
],
),
),
);
}
}
23 changes: 23 additions & 0 deletions lib/page/feed/FeedPageThirteen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
///
/// Created by NieBin on 2018/12/26
/// Github: https://github.com/nb312
/// Email: niebin312@gmail.com
///
import "package:flutter/material.dart";

class FeedPageThirteen extends StatefulWidget {
@override
_FeedState createState() => _FeedState();
}

class _FeedState extends State<FeedPageThirteen> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Feed Thirteen"),
),
body: Text("Feed page Thirteen"),
);
}
}
23 changes: 23 additions & 0 deletions lib/page/feed/FeedPageTwelve.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
///
/// Created by NieBin on 2018/12/26
/// Github: https://github.com/nb312
/// Email: niebin312@gmail.com
///
import "package:flutter/material.dart";

class FeedPageTwelve extends StatefulWidget {
@override
_FeedState createState() => _FeedState();
}

class _FeedState extends State<FeedPageTwelve> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Feed Twelve"),
),
body: Text("Feed page Twelve"),
);
}
}
27 changes: 27 additions & 0 deletions lib/page/feed/feed_const.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
///
/// Created by NieBin on 2018/12/26
/// Github: https://github.com/nb312
/// Email: niebin312@gmail.com
import "package:flutter/material.dart";

class FeedStringConst {
static const FEED_NAME = "Feed";
}

const CIRCLE_BUTTON_HEIGHT = 87.0;
const TOP_BAR_HEIGHT = 152.0;
const TOP_BAR_GRADIENT_HEIGHT = 133.0;

const TEXT_LARGE_SIZE = 40.0;
const TEXT_NORMAL_2_SIZE = 28.0;
const TEXT_NORMAL_SIZE = 26.0;
const TEXT_SMALL_SIZE = 20.0;

class FeedImage {
static const IMAGE_PATH = "images/feed";
static const more_circle = "$IMAGE_PATH/feed_more.png";
static const search_circle = "$IMAGE_PATH/feed_search.png";
static const white_back = "$IMAGE_PATH/white_background.png";
static const city = "$IMAGE_PATH/city.png";
static const shop_river = "$IMAGE_PATH/shop_river.png";
}
55 changes: 55 additions & 0 deletions lib/page/feed/top_title.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
///
/// Created by NieBin on 2018/12/26
/// Github: https://github.com/nb312
/// Email: niebin312@gmail.com
///
import "package:flutter/material.dart";
import 'feed_const.dart';
import 'package:flutter_ui_nice/const/color_const.dart';
import 'package:flutter_ui_nice/util/SizeUtil.dart';

class TopTitleBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
constraints:
BoxConstraints.expand(height: SizeUtil.getAxisY(TOP_BAR_HEIGHT)),
child: Stack(
children: <Widget>[
Container(
constraints: BoxConstraints.expand(
height: SizeUtil.getAxisY(TOP_BAR_GRADIENT_HEIGHT)),
decoration:
BoxDecoration(gradient: LinearGradient(colors: [YELLOW, BLUE])),
),
Center(
child: Padding(
padding: EdgeInsets.only(top: SizeUtil.getAxisY(30.0)),
child: Text(
FeedStringConst.FEED_NAME,
style: TextStyle(
color: TEXT_BLACK,
fontSize: SizeUtil.getAxisBoth(TEXT_NORMAL_2_SIZE),
fontWeight: FontWeight.w700),
),
),
),
Container(
padding: EdgeInsets.symmetric(horizontal: SizeUtil.getAxisX(24.0)),
alignment: AlignmentDirectional.bottomStart,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Image.asset(FeedImage.more_circle,
width: SizeUtil.getAxisY(CIRCLE_BUTTON_HEIGHT),
height: SizeUtil.getAxisY(CIRCLE_BUTTON_HEIGHT)),
Image.asset(FeedImage.search_circle,
width: SizeUtil.getAxisY(CIRCLE_BUTTON_HEIGHT),
height: SizeUtil.getAxisY(CIRCLE_BUTTON_HEIGHT))
]),
)
],
),
);
}
}
Loading