Browse Source

ui更改

null_safety
w-R 4 years ago
parent
commit
3a53b527ce
  1. BIN
      assets/image/2x/icon_deliver_goods.png
  2. BIN
      assets/image/2x/icon_deliver_goods_h.png
  3. BIN
      assets/image/2x/icon_delivery.png
  4. BIN
      assets/image/2x/icon_delivery_h.png
  5. BIN
      assets/image/2x/icon_like.png
  6. BIN
      assets/image/2x/icon_like_h.png
  7. BIN
      assets/image/2x/icon_more.png
  8. BIN
      assets/image/2x/icon_place_ order.png
  9. BIN
      assets/image/2x/icon_place_ order_h.png
  10. BIN
      assets/image/2x/icon_share.png
  11. BIN
      assets/image/2x/icon_sign.png
  12. BIN
      assets/image/2x/icon_sign_h.png
  13. BIN
      assets/image/2x/icon_transport.png
  14. BIN
      assets/image/2x/icon_transport_h.png
  15. BIN
      assets/image/3x/icon_deliver_goods.png
  16. BIN
      assets/image/3x/icon_deliver_goods_h.png
  17. BIN
      assets/image/3x/icon_delivery.png
  18. BIN
      assets/image/3x/icon_delivery_h.png
  19. BIN
      assets/image/3x/icon_like.png
  20. BIN
      assets/image/3x/icon_like_h.png
  21. BIN
      assets/image/3x/icon_more.png
  22. BIN
      assets/image/3x/icon_place_ order.png
  23. BIN
      assets/image/3x/icon_place_ order_h.png
  24. BIN
      assets/image/3x/icon_share.png
  25. BIN
      assets/image/3x/icon_sign.png
  26. BIN
      assets/image/3x/icon_sign_h.png
  27. BIN
      assets/image/3x/icon_transport.png
  28. BIN
      assets/image/3x/icon_transport_h.png
  29. BIN
      assets/image/icon_deliver_goods.png
  30. BIN
      assets/image/icon_deliver_goods_h.png
  31. BIN
      assets/image/icon_delivery.png
  32. BIN
      assets/image/icon_delivery_h.png
  33. BIN
      assets/image/icon_like.png
  34. BIN
      assets/image/icon_like_h.png
  35. BIN
      assets/image/icon_more.png
  36. BIN
      assets/image/icon_place_ order.png
  37. BIN
      assets/image/icon_place_ order_h.png
  38. BIN
      assets/image/icon_share.png
  39. BIN
      assets/image/icon_sign.png
  40. BIN
      assets/image/icon_sign_h.png
  41. BIN
      assets/image/icon_transport.png
  42. BIN
      assets/image/icon_transport_h.png
  43. 436
      lib/article/hot_article_details_page.dart
  44. 10
      lib/generated/intl/messages_en.dart
  45. 68
      lib/generated/l10n.dart
  46. 3
      lib/home/huixiang_brand_page.dart
  47. 8
      lib/l10n/intl_en.arb
  48. 9
      lib/main.dart
  49. 1
      lib/mine/mine_card_page.dart
  50. 2
      lib/mine/mine_page.dart
  51. 149
      lib/mine/roll_center_page.dart
  52. 232
      lib/order/logistics_information_page.dart
  53. 375
      lib/order/order_history_page.dart
  54. 40
      lib/setting/help_feedback_page.dart
  55. 166
      lib/view_widget/hot_item.dart
  56. 2
      lib/view_widget/round_button.dart

BIN
assets/image/2x/icon_deliver_goods.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/2x/icon_deliver_goods_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/2x/icon_delivery.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/2x/icon_delivery_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/image/2x/icon_like.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

BIN
assets/image/2x/icon_like_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/image/2x/icon_more.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

BIN
assets/image/2x/icon_place_ order.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
assets/image/2x/icon_place_ order_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
assets/image/2x/icon_share.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 788 B

BIN
assets/image/2x/icon_sign.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
assets/image/2x/icon_sign_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/image/2x/icon_transport.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/2x/icon_transport_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/image/3x/icon_deliver_goods.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
assets/image/3x/icon_deliver_goods_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
assets/image/3x/icon_delivery.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
assets/image/3x/icon_delivery_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
assets/image/3x/icon_like.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/3x/icon_like_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
assets/image/3x/icon_more.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

BIN
assets/image/3x/icon_place_ order.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
assets/image/3x/icon_place_ order_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
assets/image/3x/icon_share.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/3x/icon_sign.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
assets/image/3x/icon_sign_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
assets/image/3x/icon_transport.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
assets/image/3x/icon_transport_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
assets/image/icon_deliver_goods.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

BIN
assets/image/icon_deliver_goods_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

BIN
assets/image/icon_delivery.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

BIN
assets/image/icon_delivery_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

BIN
assets/image/icon_like.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

BIN
assets/image/icon_like_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

BIN
assets/image/icon_more.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

BIN
assets/image/icon_place_ order.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

BIN
assets/image/icon_place_ order_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

BIN
assets/image/icon_share.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

BIN
assets/image/icon_sign.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

BIN
assets/image/icon_sign_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

BIN
assets/image/icon_transport.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

BIN
assets/image/icon_transport_h.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

436
lib/article/hot_article_details_page.dart

@ -1,6 +1,7 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/view_widget/round_button.dart';
class HotArticleDetailsPage extends StatefulWidget {
@override
@ -10,40 +11,425 @@ class HotArticleDetailsPage extends StatefulWidget {
}
class _HotArticleDetailsPage extends State<HotArticleDetailsPage> {
var controller = new ScrollController();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Color(0xFFF7F7F7),
elevation: 0,
title: Text(
// S.of(context).wenzhangxiangqing,
"文章详情",
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
return Scaffold(
appBar: AppBar(
backgroundColor: Color(0xFFFFFFFF),
elevation: 0,
centerTitle: false,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56,
automaticallyImplyLeading: true,
actions: [rightAction()],
title: Text(
S.of(context).wenzhangxiangqing,
style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold),
),
),
centerTitle: false,
leading: GestureDetector(
body: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: [
Container(
margin: EdgeInsets.only(bottom: 20),
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0)
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("牡丹花的养护知识",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: Color(0xff1A1A1A))),
SizedBox(
height: 20,
),
Row(
children: [
ClipOval(
child: Image.network(
"https://t7.baidu.com/it/u=2841334870,333581502&fm=193&f=GIF",
fit: BoxFit.cover,
width: 44,
height: 44,
),
clipBehavior: Clip.hardEdge,
),
SizedBox(
width: 8,
),
Expanded(
child: Container(
height: 60,
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text.rich(
TextSpan(children: [
TextSpan(
text: "百花谷",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14,
color: Colors.black),
),
]),
textDirection: TextDirection.ltr,
),
Text(
"2021.04.12 12:12",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12,
color: Color(0xff808080),
),
),
],
),
),
flex: 1,
)
],
),
SizedBox(
height: 20,
),
Text(
"文本,是指书面语言的表现形式,从文学角度说,通常是具有完整、系统含义(Message)的一个句子或多个句子的组合。一个文本可以是一个句子(Sentence)、一个段落(Paragraph)或者一个篇章(Discourse)。广义“文本”:任何由书写所固定下来的任何话语。(利科尔) 狭义“文本”:由语言文字组成的文学实体,代指“作品”,相对于作者、世界构成一个独立、自足的系统。",
textAlign: TextAlign.justify,
style:
TextStyle(fontSize: 16, color: Color(0xFF1A1A1A)),
),
SizedBox(
height: 16,
),
Image.network(
"https://t7.baidu.com/it/u=2487758541,1861252964&fm=193&f=GIF",
fit: BoxFit.cover,
width: double.infinity,
height: 170,
),
SizedBox(
height: 16,
),
Text(
"文本,是指书面语言的表现形式,从文学角度说,通常是具有完整、系统含义(Message)的一个句子或多个句子的组合。一个文本可以",
textAlign: TextAlign.justify,
style:
TextStyle(fontSize: 16, color: Color(0xFF1A1A1A)),
),
],
),
),
Container(
margin: EdgeInsets.only(bottom: 20),
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0)
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("评论 (58) 喜欢 (58)",
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Color(0xff1A1A1A))),
SizedBox(
height: 28,
),
// Container(
// child: ListView.builder(
// itemCount: 10,
// itemBuilder: (context, position) {
// _commentItem();
// return Container(
// margin: EdgeInsets.only(
// left: 16, right: 16, top: position == 0 ? 32 : 8, bottom: 8),
// padding: EdgeInsets.only(top: 16, bottom: 16),
// decoration: BoxDecoration(
// color: Colors.white,
// boxShadow: [
// BoxShadow(
// color: Colors.black.withAlpha(12),
// offset: Offset(0, 3),
// blurRadius: 14,
// spreadRadius: 0)
// ],
// borderRadius: BorderRadius.all(Radius.circular(8))),
// child: _commentItem(),
// );
// }),
// )
_commentItem()
],
),
),
SizedBox(
height: 30,
),
Container(
alignment: Alignment.center,
child: Text(
"-已显示全部评论-",
style: TextStyle(fontSize: 14, color: Color(0xff353535)),
),
),
SizedBox(
height: 12,
),
Container(
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0)
],
borderRadius: new BorderRadius.only(
topLeft: Radius.circular(8.0),
topRight: Radius.circular(8.0),
),
),
child: Row(
children: [
Expanded(
flex: 1,
child: Container(
decoration: new BoxDecoration(
color: Color(0xffF2F2F2),
borderRadius: BorderRadius.circular(2.0)),
child: Column(
children: [
Container(
margin: const EdgeInsets.fromLTRB(4, 0, 4, 0),
alignment: Alignment.topLeft,
child: TextField(
maxLines: 8,
minLines: 1,
decoration: InputDecoration(
border: InputBorder.none,
hintText: "留下您精彩的评论吧~",
hintStyle: TextStyle(
fontSize: 14,
color: Color(0xffCDCCCC),
),
),
),
),
],
),
),
),
Padding(
padding: EdgeInsets.only(left: 20, right: 20),
child: Text(
"发送",
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Color(0XFF1A1A1A)),
),
),
Image.asset("assets/image/icon_like_h.png")
],
),
),
],
),
),
),
);
}
var _status = 0;
var _bgStatus = false;
Widget rightAction() {
if (_status == 0) {
return Container(
margin: EdgeInsets.only(right: 17),
child: GestureDetector(
onTap: () {
setState(() {
_status = (_status + 1) % 2;
});
},
child: Image.asset(
"assets/image/icon_share.png",
width: 24,
height: 24,
),
),
);
} else {
return GestureDetector(
onTap: () {
Navigator.of(context).pop();
setState(() {
_status = (_status + 1) % 2;
});
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
margin: EdgeInsets.only(right: 17),
padding: EdgeInsets.only(top: 15, bottom: 15),
alignment: Alignment.center,
child: RoundButton(
text: S.of(context).wancheng,
textColor: _bgStatus ? Colors.white : Color(0xFFA0A0A0),
backgroup: _bgStatus ? Color(0xFF32A060) : Color(0xFFD8D8D8),
fontSize: 14,
fontWeight: FontWeight.bold,
padding: EdgeInsets.only(left: 12, right: 12, top: 2, bottom: 2),
radius: 12,
),
),
);
}
}
Widget _commentItem() {
return Container(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
ClipOval(
child: Image.network(
"https://t7.baidu.com/it/u=2841334870,333581502&fm=193&f=GIF",
fit: BoxFit.cover,
width: 40,
height: 40,
),
clipBehavior: Clip.hardEdge,
),
SizedBox(
width: 12,
),
Expanded(
child: Container(
height: 60,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text.rich(
TextSpan(children: [
TextSpan(
text: "张三",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14,
color: Colors.black),
),
]),
textDirection: TextDirection.ltr,
),
Text(
"2021.04.12 12:12",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12,
color: Color(0xff808080),
),
),
],
),
),
flex: 1,
),
Container(
alignment: Alignment.topRight,
child: Row(
children: [
Image.asset(
"assets/image/icon_like.png",
width: 16,
height: 16,
),
Text(
"58",
style: TextStyle(fontSize: 12, color: Color(0xff1A1A1A)),
),
],
),
),
],
),
Padding(
padding: EdgeInsets.only(left: 68),
child: Text(
"文本,是指书面语言的表现形式,从文学角度说,通常是具有完整、系统含义(Mess…",
style: TextStyle(fontSize: 14, color: Color(0xff1A1A1A)),
),
),
SizedBox(
height: 12,
),
Container(
width: double.infinity,
margin: EdgeInsets.only(left: 68),
decoration: new BoxDecoration(
color: Color(0xffF2F2F2),
borderRadius: BorderRadius.circular(2.0),
),
child: Padding(
padding: EdgeInsets.only(left: 4, top: 4, bottom: 4),
child: Text(
"文本,是指书面语言的表现形式文本,是指、",
style: TextStyle(fontSize: 12, color: Color(0xff808080)),
),
),
)
],
),
titleSpacing: 2,
leadingWidth: 56,
),
);
);
}
}

10
lib/generated/intl/messages_en.dart

@ -80,7 +80,9 @@ class MessageLookup extends MessageLookupByLibrary {
"chuangjianshijian" : m1,
"chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事"),
"code_error" : MessageLookupByLibrary.simpleMessage("验证码输入错误"),
"daifukuan" : MessageLookupByLibrary.simpleMessage("待付款"),
"dailingqu" : MessageLookupByLibrary.simpleMessage("待领取"),
"daizhifu" : MessageLookupByLibrary.simpleMessage("待支付"),
"dangqiandengji" : MessageLookupByLibrary.simpleMessage("当前等级"),
"dangqianshangpinduihuanhexiaoma" : MessageLookupByLibrary.simpleMessage("当前商品兑换核销码已核销完成"),
"diancan" : MessageLookupByLibrary.simpleMessage("点餐"),
@ -195,6 +197,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingxuanzhemendian" : MessageLookupByLibrary.simpleMessage("请选择门店"),
"qingxuanzheninxiangshezhideyuyan" : MessageLookupByLibrary.simpleMessage("请选择您想设置的语言"),
"qingzaiguidingshijianneizhifu" : MessageLookupByLibrary.simpleMessage("请在规定时间内完成支付"),
"quanbu" : MessageLookupByLibrary.simpleMessage("全部"),
"quanbudingdan" : MessageLookupByLibrary.simpleMessage("全部订单"),
"quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兑换"),
"quanxian" : MessageLookupByLibrary.simpleMessage("权限"),
@ -208,6 +211,7 @@ class MessageLookup extends MessageLookupByLibrary {
"quwancheng" : MessageLookupByLibrary.simpleMessage("去完成"),
"quxiao" : MessageLookupByLibrary.simpleMessage("取消"),
"quxiaodingdan" : MessageLookupByLibrary.simpleMessage("取消订单"),
"quxiaozhifu" : MessageLookupByLibrary.simpleMessage("取消支付"),
"quzhifu" : MessageLookupByLibrary.simpleMessage("去支付"),
"remenwenzhangshipin" : MessageLookupByLibrary.simpleMessage("热门文章视频"),
"remenwenzhangshipinliebiao" : MessageLookupByLibrary.simpleMessage("热门文章视频列表"),
@ -248,7 +252,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"),
"weihexiao" : MessageLookupByLibrary.simpleMessage("未核销"),
"weikaiqi" : MessageLookupByLibrary.simpleMessage("未开启"),
"weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "),
"weiwancheng" : MessageLookupByLibrary.simpleMessage("未完成"),
"weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"),
"wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章详情"),
@ -259,6 +263,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wodeqianbao" : MessageLookupByLibrary.simpleMessage("我的钱包"),
"wodeshengri" : MessageLookupByLibrary.simpleMessage("我的生日"),
"wodexiaoxi" : MessageLookupByLibrary.simpleMessage("我的消息"),
"wuliuxinxi" : MessageLookupByLibrary.simpleMessage("物流信息"),
"xiadanshijian" : MessageLookupByLibrary.simpleMessage("下单时间"),
"xiadanshijian_" : m16,
"xiangji" : MessageLookupByLibrary.simpleMessage("相机"),
@ -277,7 +282,7 @@ class MessageLookup extends MessageLookupByLibrary {
"yishijiao" : MessageLookupByLibrary.simpleMessage("已失效"),
"yishiming" : MessageLookupByLibrary.simpleMessage("已实名"),
"yishixiao" : MessageLookupByLibrary.simpleMessage("已失效"),
"yiwancheng" : MessageLookupByLibrary.simpleMessage(" 已完成 "),
"yiwancheng" : MessageLookupByLibrary.simpleMessage("已完成"),
"yiwanchengdingdan" : MessageLookupByLibrary.simpleMessage("已完成订单"),
"yiyoujifen" : MessageLookupByLibrary.simpleMessage("已有积分"),
"yonghuming" : MessageLookupByLibrary.simpleMessage("用户名"),
@ -297,6 +302,7 @@ class MessageLookup extends MessageLookupByLibrary {
"zhifubao" : MessageLookupByLibrary.simpleMessage("支付宝"),
"zhifufangshi" : MessageLookupByLibrary.simpleMessage("支付方式"),
"zhifuxiangqing" : MessageLookupByLibrary.simpleMessage("支付详情"),
"zhizuozhong" : MessageLookupByLibrary.simpleMessage("制作中"),
"zhongwenjianti" : MessageLookupByLibrary.simpleMessage("中文简体"),
"ziqu" : MessageLookupByLibrary.simpleMessage("自取"),
"ziti" : MessageLookupByLibrary.simpleMessage("自提"),

68
lib/generated/l10n.dart

@ -645,10 +645,10 @@ class S {
);
}
/// ` `
/// ``
String get weiwancheng {
return Intl.message(
' 未完成 ',
'未完成',
name: 'weiwancheng',
desc: '',
args: [],
@ -665,10 +665,10 @@ class S {
);
}
/// ` `
/// ``
String get yiwancheng {
return Intl.message(
' 已完成 ',
'已完成',
name: 'yiwancheng',
desc: '',
args: [],
@ -2425,6 +2425,66 @@ class S {
);
}
/// ``
String get quanbu {
return Intl.message(
'全部',
name: 'quanbu',
desc: '',
args: [],
);
}
/// ``
String get daifukuan {
return Intl.message(
'待付款',
name: 'daifukuan',
desc: '',
args: [],
);
}
/// ``
String get daizhifu {
return Intl.message(
'待支付',
name: 'daizhifu',
desc: '',
args: [],
);
}
/// ``
String get quxiaozhifu {
return Intl.message(
'取消支付',
name: 'quxiaozhifu',
desc: '',
args: [],
);
}
/// ``
String get zhizuozhong {
return Intl.message(
'制作中',
name: 'zhizuozhong',
desc: '',
args: [],
);
}
/// ``
String get wuliuxinxi {
return Intl.message(
'物流信息',
name: 'wuliuxinxi',
desc: '',
args: [],
);
}
/// `使`
String get privacy_policy4 {
return Intl.message(

3
lib/home/huixiang_brand_page.dart

@ -538,8 +538,7 @@ class _BrandPage extends State<BrandPage> with SingleTickerProviderStateMixin {
),
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(

8
lib/l10n/intl_en.arb

@ -243,6 +243,14 @@
"lingjuanzhongxing": "领卷中心",
"shouhuodizhi": "收货地址",
"tianjiadizhi": "添加地址",
"quanbu": "全部",
"daifukuan": "待付款",
"weiwancheng": "未完成",
"daizhifu": "待支付",
"quxiaozhifu": "取消支付",
"zhizuozhong": "制作中",
"yiwancheng": "已完成",
"wuliuxinxi": "物流信息",

9
lib/main.dart

@ -23,6 +23,7 @@ import 'package:huixiang/order/exchange_history_page.dart';
import 'package:huixiang/order/exchange_order_page.dart';
import 'package:huixiang/order/exchange_order_success_page.dart';
import 'package:huixiang/order/exchange_order_detail_page.dart';
import 'package:huixiang/order/logistics_information_page.dart';
import 'package:huixiang/order/order_detail_page.dart';
import 'package:huixiang/order/order_history_page.dart';
import 'package:huixiang/order/store_selector_page.dart';
@ -40,6 +41,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'main_page.dart';
import 'mine/manage_address_page.dart';
import 'mine/roll_center_page.dart';
void main() {
if (Platform.isAndroid) {
@ -76,7 +78,8 @@ class MyApp extends StatelessWidget {
S.delegate
],
supportedLocales: S.delegate.supportedLocales,
home: LoginPage(),
// home: LoginPage(),
home: MainPage(),
routes: <String, WidgetBuilder>{
'/router/main_page': (_) => MainPage(),
'/router/msg_page': (_) => MainMessagePage(),
@ -87,6 +90,7 @@ class MyApp extends StatelessWidget {
'/router/mine_wallet': (_) => MineWalletPage(),
'/router/user_info_page': (_) => UserInfoPage(),
'/router/mine_card': (_) => MineCardPage(),
'/router/roll_center_page': (_) => RollCenterPage(),
'/router/mine_card_invalid': (_) => MineCardInvalidPage(),
'/router/permission_setting': (_) => PermissionSettingPage(),
'/router/manage_address_page': (_) => ManageAddressPage(),
@ -106,9 +110,10 @@ class MyApp extends StatelessWidget {
'/router/write_off_success_page': (_) => WriteOffSuccessPage(),
'/router/order_history_page': (_) => OrderHistoryPage(),
'/router/order_details': (_) => OrderDetailPage(),
// '/router/logistics_information_page': (_) => LogisticsInformationPage(),
'/router/recharge_page': (_) => RechargePage(),
'/router/hot_article_page': (_) => HotArticlePage(),
// '/router/hot_article_details_page': (_) => HotArticleDetailsPage(),
'/router/hot_article_details_page': (_) => HotArticleDetailsPage(),
// '/router/ui_test': (_) => UITest(),
}),
);

1
lib/mine/mine_card_page.dart

@ -15,7 +15,6 @@ class MineCardPage extends StatefulWidget {
class _MineCardPage extends State<MineCardPage>
with SingleTickerProviderStateMixin{
RefreshController _refreshController;
RefreshController _refreshControllerOne;
RefreshController _refreshControllerTwo;

2
lib/mine/mine_page.dart

@ -194,7 +194,7 @@ class _MinePage extends State<MinePage> {
),
InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/exchange_history_page');
Navigator.of(context).pushNamed('/router/roll_center_page');
},
child: mineItem(
S.of(context).linjuanzhongxin,

149
lib/mine/roll_center_page.dart

@ -0,0 +1,149 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/view_widget/coupon_widget.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:huixiang/view_widget/my_tab.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
class RollCenterPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _RollCenterPage();
}
}
class _RollCenterPage extends State<RollCenterPage>
with SingleTickerProviderStateMixin {
RefreshController _refreshController;
@override
void initState() {
super.initState();
tabController = TabController(length: 3, vsync: this);
_refreshController = RefreshController(initialRefresh: false);
}
List<String> items = ["1", "2", "3", "4", "5", "6", "7", "8"];
void _onRefresh() async {
// monitor network fetch
await Future.delayed(Duration(milliseconds: 1000));
// if failed,use refreshFailed()
_refreshController.refreshCompleted();
}
void _onLoading() async {
// monitor network fetch
await Future.delayed(Duration(milliseconds: 1000));
// if failed,use loadFailed(),if no data return,use LoadNodata()
items.add((items.length + 1).toString());
if (mounted) setState(() {});
_refreshController.loadComplete();
}
TabController tabController;
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
title: Text(
"领卷中心",
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
centerTitle: false,
backgroundColor: Color(0xFFF7F7F7),
elevation: 0,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56,
),
body: Container(
child: Column(
children: [
ItemTitle(
text: S
.of(context)
.keyongyouhuiquan,
imgPath: "assets/image/icon_card_coupon.png",
moreText: S
.of(context)
.chakanshixiaoquan,
onTap: () {
Navigator.of(context).pushNamed(
'/router/mine_card_invalid');
},
),
Expanded(
flex: 1,
child: Container(
child: SmartRefresher(
enablePullDown: true,
enablePullUp: true,
header: ClassicHeader(),
footer: CustomFooter(
builder: (context, mode) {
Widget body;
if (mode == LoadStatus.idle) {
body = Text("pull up load");
} else if (mode == LoadStatus.loading) {
body = CupertinoActivityIndicator();
} else if (mode == LoadStatus.failed) {
body = Text("Load Failed!Click retry!");
} else if (mode == LoadStatus.canLoading) {
body = Text("release to load more");
} else {
body = Text(S
.of(context)
.meiyougengduoyouhuiquan);
}
return Container(
height: 55.0,
child: Center(child: body),
);
},
),
controller: _refreshController,
onRefresh: _onRefresh,
onLoading: _onLoading,
child: ListView.builder(
itemBuilder: (c, i) {
return CouponWidget(true, true, () {
tabController.index = 1;
});
},
itemCount: items.length,
),
),
),
)
],
),
),
),
);
}
}

232
lib/order/logistics_information_page.dart

@ -0,0 +1,232 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/view_widget/round_button.dart';
class LogisticsInformationPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _LogisticsInformationPage();
}
}
class _LogisticsInformationPage extends State<LogisticsInformationPage> {
var controller = new ScrollController();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Color(0xFFF7F7F7),
elevation: 0,
centerTitle: false,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56,
title: Text(
S.of(context).wuliuxinxi,
style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold),
),
),
body: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: [
_orderInformation(),
SizedBox(
height: 16,
),
Container(
alignment: Alignment.bottomCenter,
margin: EdgeInsets.only(left: 16,right: 16),
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
bottomLeft: Radius.circular(4),
topRight: Radius.circular(8),
bottomRight: Radius.circular(4),
),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0)
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("订单跟踪",style: TextStyle(fontSize:16,fontWeight: FontWeight.bold,color: Color(0xff353535)),),
SizedBox(
height: 32,
),
Row(
children: [
],
),
],
),
),
],
),
),
),
);
}
Widget _orderInformation() {
return Container(
margin: EdgeInsets.only(left: 16,right: 16),
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(4),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0)
],
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
children: [
Image.network(
"https://t7.baidu.com/it/u=810585695,3039658333&fm=193&f=GIF",
width: 95,
height: 95,
fit: BoxFit.cover,
),
Container(
padding: EdgeInsets.only(left: 31,right: 31,top: 5,bottom:5),
alignment: Alignment.bottomCenter,
decoration:BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(0),
bottomLeft: Radius.circular(4),
topRight: Radius.circular(0),
bottomRight: Radius.circular(4),
),
color: Color(0x53000000),
),
child:Text(
"共3件",
style:TextStyle(
fontSize: 12,
color: Colors.white,
),
),
),
],
),
SizedBox(
width: 12,
),
Expanded(
flex: 1,
child: Container(
height: 95,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
"物流状态:",
style: TextStyle(
color: Color(0xff353535),
fontSize: 14,
),
),
Text(
"已发货",
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 14,
fontWeight: FontWeight.bold
),
)
],
),
SizedBox(
height: 8,
),
Row(
children: [
Text(
"物流公司:",
style: TextStyle(
color: Color(0xff353535),
fontSize: 14,
),
),
Text(
"圆通快递",
style: TextStyle(
color: Colors.black,
fontSize: 14,
),
)
],
),
SizedBox(
height: 8,
),
Row(
children: [
Text(
"物流单号:",
style: TextStyle(
color: Color(0xff353535),
fontSize: 14,
),
),
Text(
"1234567890412",
style: TextStyle(
color: Colors.black,
fontSize: 14,
),
)
],
),
],
),
),
)
],
),
],
),
);
}
}

375
lib/order/order_history_page.dart

@ -20,7 +20,6 @@ class _OrderHistoryPage extends State<OrderHistoryPage>
@override
void initState() {
super.initState();
}
@override
@ -30,16 +29,16 @@ class _OrderHistoryPage extends State<OrderHistoryPage>
tabcontroller = TabController(length: 4, vsync: this);
tabs = [
MyTab(
text: S.of(context).quanbudingdan,
text: S.of(context).quanbu,
),
MyTab(
text: S.of(context).weiwancheng,
text: S.of(context).daifukuan,
),
MyTab(
text: S.of(context).yiwancheng,
text: S.of(context).weiwancheng,
),
MyTab(
text: S.of(context).yiquxiao,
text: S.of(context).yiwancheng,
)
];
_pages = [
@ -141,13 +140,32 @@ class _OrderHistoryList extends State<OrderHistoryList> {
bool isRemake = true;
var statusStr = "";
@override
void initState() {
super.initState();
switch (widget.orderStatus) {
case 0:
statusStr = "待支付";
break;
case 1:
statusStr = "待支付";
break;
case 2:
statusStr = "已发货";break;
default:
statusStr = "已完成";
break;
}
}
Widget orderItem() {
return Container(
margin: EdgeInsets.fromLTRB(16, 8, 16, 8),
padding: EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
borderRadius: BorderRadius.circular(4),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
@ -155,26 +173,35 @@ class _OrderHistoryList extends State<OrderHistoryList> {
blurRadius: 14,
spreadRadius: 0)
]),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.network(
"https://t7.baidu.com/it/u=1348120667,563487140&fm=193&f=GIF",
width: 82,
height: 82,
fit: BoxFit.contain,
),
Expanded(
child: Container(
height: 97,
margin: EdgeInsets.only(left: 24),
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 19,
height: 19,
margin: EdgeInsets.only(left: 12, top: 12),
alignment: Alignment.center,
decoration: new BoxDecoration(
color: Color(0xff32A060),
borderRadius: BorderRadius.circular(2),
),
child: Text("",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Colors.white)),
),
Expanded(
child: Container(
width: double.infinity,
margin: EdgeInsets.only(left: 6, top: 12),
alignment: Alignment.centerLeft,
child: Text(
"前进麦味·天然烘焙(凯德1818店)",
style: TextStyle(
fontWeight: FontWeight.bold,
@ -182,66 +209,258 @@ class _OrderHistoryList extends State<OrderHistoryList> {
color: Color(0xFF353535),
),
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context).xiadanshijian_("2020.01.20~2020.1.21"),
style: TextStyle(
fontSize: 10,
color: Color(0xFF727272),
),
),
SizedBox(
height: 4,
),
flex: 1,
),
Padding(
padding: EdgeInsets.only(top: 12, right: 12),
child: Text(statusStr,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
color: Color(0xffFE951E))),
),
],
),
Container(
margin: EdgeInsets.only(left: 37),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context).xiadanshijian_("2020.01.20~2020.1.21"),
style: TextStyle(
fontSize: 10,
color: Color(0xFF727272),
),
if (isRemake)
Text(
"海盐牛角+咸蛋黄芋泥+草莓奶昔…",
style: TextStyle(
fontSize: 10,
color: Color(0xFFEDB12F),
),
),
SizedBox(
height: 8,
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.network(
"https://t7.baidu.com/it/u=1348120667,563487140&fm=193&f=GIF",
width: 75,
height: 75,
fit: BoxFit.contain,
),
SizedBox(
height: 4,
),
],
if (isRemake)
Text(
"桑葚椰汁水果茶",
style: TextStyle(
fontSize: 10,
color: Color(0xFF353535),
),
),
],
),
],
),
Padding(
padding: EdgeInsets.only(right: 22),
child: Image.asset(
"assets/image/icon_more.png",
fit: BoxFit.fill,
alignment: Alignment.centerRight,
width: 24,
height: 24,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text.rich(TextSpan(children: [
TextSpan(
text: S.of(context).jiesuanjine,
style: TextStyle(
fontSize: 12,
color: Color(0xFF353535),
)
],
),
),
SizedBox(
height: 12,
),
Container(
margin: EdgeInsets.only(right: 12, bottom: 12),
child: Directionality(
textDirection: TextDirection.rtl,
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text.rich(TextSpan(children: [
TextSpan(
text: "合计:",
style: TextStyle(
fontSize: 12,
color: Color(0xFF868686),
),
),
TextSpan(
text: S.of(context).yuan("58.2"),
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
])),
SizedBox(
width: 4,
),
TextSpan(
text: S.of(context).yuan("58.2"),
style: TextStyle(
Text.rich(TextSpan(children: [
TextSpan(
text: "",
style: TextStyle(
fontSize: 12,
color: Color(0xFF868686),
),
),
TextSpan(
text: "5",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
TextSpan(
text: "",
style: TextStyle(
fontSize: 12,
color: Color(0xFF868686),
),
),
])),
],
),
SizedBox(
height: 8,
),
Row(
children: [
if (widget.orderStatus == 2)
RoundButton(
text: "确认收货",
textColor: Colors.white,
fontSize: 12,
backgroup: Color(0xFF32A060),
radius: 2,
padding: EdgeInsets.fromLTRB(17, 4, 17, 4),
),
if (widget.orderStatus == 2)
Container(
width: 72,
height: 24,
margin: EdgeInsets.only(right: 10),
child: TextButton(
onPressed: () {
// Navigator.of(context).pushNamed('/router/logistics_information_page');
},
style: ButtonStyle(
padding:
MaterialStateProperty.all(EdgeInsets.zero),
side: MaterialStateProperty.all(
BorderSide(
color: Color(0xff32A060), width: 0.5),
),
),
child: Text(
"查看物流",
style: TextStyle(
color: Color(0xff32A060), fontSize: 12),
),
),
),
if (widget.orderStatus == 3)
RoundButton(
text: "再来一单",
textColor: Colors.white,
fontSize: 12,
fontWeight: FontWeight.bold,
color: Color(0xFF32A060),
backgroup: Color(0xFF32A060),
radius: 2,
padding: EdgeInsets.fromLTRB(17, 4, 17, 4),
),
if (widget.orderStatus == 3)
Container(
width: 72,
height: 24,
margin: EdgeInsets.only(right: 10),
child: TextButton(
onPressed: () {},
style: ButtonStyle(
padding:
MaterialStateProperty.all(EdgeInsets.zero),
side: MaterialStateProperty.all(
BorderSide(
color: Color(0xff32A060), width: 0.5),
),
),
child: Text(
"删除一单",
style: TextStyle(
color: Color(0xff32A060), fontSize: 12),
),
),
),
if (widget.orderStatus == 0 || widget.orderStatus == 1)
RoundButton(
text: S.of(context).quzhifu,
textColor: Colors.white,
fontSize: 12,
backgroup: Color(0xFF32A060),
radius: 2,
padding: EdgeInsets.fromLTRB(17, 4, 17, 4),
),
SizedBox(
width: 10,
),
])),
RoundButton(
text: S.of(context).quzhifu,
textColor: Colors.white,
fontSize: 12,
backgroup: Color(0xFF32A060),
radius: 2,
padding: EdgeInsets.fromLTRB(8, 4, 8, 4),
)
],
),
],
),
),
flex: 1,
)
if (widget.orderStatus == 0 || widget.orderStatus == 1)
Container(
width: 72,
height: 24,
child: TextButton(
onPressed: () {},
style: ButtonStyle(
padding:
MaterialStateProperty.all(EdgeInsets.zero),
side: MaterialStateProperty.all(
BorderSide(
color: Color(0xff32A060), width: 0.5),
),
),
child: Text(
S.of(context).quxiaozhifu,
style: TextStyle(
color: Color(0xff32A060), fontSize: 12),
),
),
),
if (widget.orderStatus == 3)
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.only(left: 37),
alignment: Alignment.centerLeft,
child: Text(
"取单号 201",
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Colors.black),
),
),
),
],
),
],
)),
),
],
),
);

40
lib/setting/help_feedback_page.dart

@ -217,46 +217,6 @@ class _HelpFeedbackPage extends State<HelpFeedbackPage>{
],
),
);
// bool isExpanded;
// return Container(
// width: double.infinity,
// height: 186,
// margin: const EdgeInsets.all(16),
// decoration: new BoxDecoration(
// color: Color(0xffffffff),
// borderRadius: BorderRadius.circular(4.0)
// ),
// child: Container(
// margin:EdgeInsets.only(left: 20,top: 20,bottom: 8,right: 20) ,
// alignment: Alignment.topLeft,
// child:Column(
// children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Padding(padding: EdgeInsets.only(bottom: 8),child:
// Text("如何领取优惠券?",style: TextStyle(
// fontSize: 16,color: Color(0xff353535),
// ),),),
// Container(
// alignment: Alignment.centerRight,
// padding: EdgeInsets.all(6),
// margin: EdgeInsets.only(bottom: 8),
// child: Icon(
// Icons.arrow_forward_ios,
// color: Colors.black,
// size: 20,
// ),
// ),
// ],
// ),
// Text("点击我的,进入我页面后,点击下方的领劵中心,进入后即可领取优惠券哦~",style:
// TextStyle(fontSize: 14,color: Color(0xff8B8B8B)),)
// ],
// ),
// ),
// );
}
}

166
lib/view_widget/hot_item.dart

@ -5,97 +5,103 @@ import 'package:huixiang/view_widget/icon_text.dart';
class HotArticleItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
return hotItem();
return GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/hot_article_details_page');
},
child: hotItem(),
);
}
Widget hotItem() {
return Container(
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(4),
),
child: Row(
children: [
Stack(
alignment: Alignment.center,
children: [
AspectRatio(
aspectRatio: 1,
child: ClipRRect(
child: Image.network(
"https://t7.baidu.com/it/u=2675747560,2138287772&fm=193&f=GIF",
fit: BoxFit.cover,
),
borderRadius: BorderRadius.circular(2),
),
),
Icon(Icons.play_circle_outline, size: 24, color: Colors.white,),
],
),
SizedBox(
width: 12,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(4),
),
child: Row(
children: [
Stack(
alignment: Alignment.center,
children: [
Text(
"牡丹花的养护知识牡丹花的养…",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Colors.black,
AspectRatio(
aspectRatio: 1,
child: ClipRRect(
child: Image.network(
"https://t7.baidu.com/it/u=2675747560,2138287772&fm=193&f=GIF",
fit: BoxFit.cover,
),
borderRadius: BorderRadius.circular(2),
),
),
Text(
"首先,牡丹种植的最佳时间通常是9月下旬至10月上旬,所以人们希望在首先,牡丹种植的最佳时间通常是9月下旬…",
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF353535),
Icon(Icons.play_circle_outline, size: 24, color: Colors.white,),
],
),
SizedBox(
width: 12,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"牡丹花的养护知识牡丹花的养…",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Colors.black,
),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
IconText(
"2020.01.03",
textStyle: TextStyle(
fontSize: 10.sp,
color: Color(0xFFB2B2B2),
),
leftIcon: Icons.access_time_rounded,
iconSize: 10,
iconColor: Color(0xFFB2B2B2),
Text(
"首先,牡丹种植的最佳时间通常是9月下旬至10月上旬,所以人们希望在首先,牡丹种植的最佳时间通常是9月下旬…",
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF353535),
),
Text(
"作者:百花谷",
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFFB2B2B2),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
IconText(
"2020.01.03",
textStyle: TextStyle(
fontSize: 10.sp,
color: Color(0xFFB2B2B2),
),
leftIcon: Icons.access_time_rounded,
iconSize: 10,
iconColor: Color(0xFFB2B2B2),
),
),
],
),
],
Text(
"作者:百花谷",
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFFB2B2B2),
),
),
],
),
],
),
),
),
],
),
],
),
);
}
}

2
lib/view_widget/round_button.dart

@ -25,7 +25,7 @@ class RoundButton extends StatelessWidget {
this.width,
this.icons,
this.padding,
this.fontWeight = FontWeight.normal, this.callback});
this.fontWeight = FontWeight.normal, this.callback,});
@override
Widget build(BuildContext context) {

Loading…
Cancel
Save