Browse Source

修改UI, bug

null_safety
fmk 4 years ago
parent
commit
a6b3a1e531
  1. 6
      lib/address/address_map_page.dart
  2. 10
      lib/address/edit_address_page.dart
  3. 600
      lib/article/hot_article_details_page.dart
  4. 35
      lib/article/hot_article_item.dart
  5. 2
      lib/generated/intl/messages_en.dart
  6. 2
      lib/generated/intl/messages_zh_CN.dart
  7. 2
      lib/generated/intl/messages_zh_Hans_CN.dart
  8. 2
      lib/generated/intl/messages_zh_Hant_CN.dart
  9. 2
      lib/generated/intl/messages_zh_TW.dart
  10. 20
      lib/generated/l10n.dart
  11. 37
      lib/home/founder_story_page.dart
  12. 1
      lib/home/huixiang_brand_page.dart
  13. 39
      lib/home/main_home_page.dart
  14. 66
      lib/integral/integral_page.dart
  15. 48
      lib/integral_store/integral_store_details_page.dart
  16. 2
      lib/l10n/intl_en.arb
  17. 2
      lib/l10n/intl_zh_CN.arb
  18. 2
      lib/l10n/intl_zh_Hans_CN.arb
  19. 2
      lib/l10n/intl_zh_Hant_CN.arb
  20. 2
      lib/l10n/intl_zh_TW.arb
  21. 12
      lib/login/login_page.dart
  22. 22
      lib/main.dart
  23. 88
      lib/message/main_message_page.dart
  24. 73
      lib/mine/coupons_page.dart
  25. 2
      lib/mine/edit_name.dart
  26. 36
      lib/mine/manage_address_page.dart
  27. 36
      lib/mine/mine_card_invalid_page.dart
  28. 50
      lib/mine/mine_card_page.dart
  29. 38
      lib/mine/mine_vip_level_page.dart
  30. 34
      lib/mine/mine_wallet_page.dart
  31. 38
      lib/mine/recharge_page.dart
  32. 34
      lib/mine/roll_center_page.dart
  33. 36
      lib/mine/user_info_page.dart
  34. 34
      lib/mine/vip_balance_page.dart
  35. 33
      lib/mine/vip_detail_page.dart
  36. 36
      lib/order/exchange_history_page.dart
  37. 31
      lib/order/exchange_order_detail_page.dart
  38. 42
      lib/order/exchange_order_page.dart
  39. 36
      lib/order/exchange_order_success_page.dart
  40. 34
      lib/order/logistics_information_page.dart
  41. 40
      lib/order/order_detail_page.dart
  42. 36
      lib/order/order_history_page.dart
  43. 44
      lib/order/store_selector_page.dart
  44. 41
      lib/order/write_off_page.dart
  45. 59
      lib/order/write_off_success_page.dart
  46. 2
      lib/retrofit/retrofit_api.dart
  47. 34
      lib/setting/about_page.dart
  48. 35
      lib/setting/help_feedback_page.dart
  49. 34
      lib/setting/permission_setting_page.dart
  50. 34
      lib/setting/setting_page.dart
  51. 34
      lib/setting/treaty_page.dart
  52. 6
      lib/union/store_details_page.dart
  53. 4
      lib/union/union_details_page.dart
  54. 20
      lib/view_widget/my_appbar.dart
  55. 33
      lib/view_widget/pay_input_view.dart

6
lib/address/address_map_page.dart

@ -151,9 +151,9 @@ class _AddressMapPage extends State<AddressMapPage> {
// await AmapCore.init('feaae7986201b571cace1b83728be5bb');
if (await Permission.locationWhenInUse.serviceStatus.isEnabled) {
bool isShown = await Permission.contacts.shouldShowRequestRationale;
if (isShown) {
SmartDialog.showToast("shouldShowRequest");
}
// if (isShown) {
// SmartDialog.showToast("shouldShowRequest");
// }
if (await Permission.location.isPermanentlyDenied) {
//openAppSettings
} else if (await Permission.location.isGranted) {

10
lib/address/edit_address_page.dart

@ -154,19 +154,19 @@ class _EditAddressPage extends State<EditAddressPage> {
String city = addressController.text;
String address = houseNumberController.text;
if (name == null || name == "") {
SmartDialog.showToast("请输入收货人姓名");
SmartDialog.showToast("请输入收货人姓名", alignment: Alignment.center);
return;
}
if (mobile == null || mobile == "") {
SmartDialog.showToast("请输入收货人手机号");
SmartDialog.showToast("请输入收货人手机号", alignment: Alignment.center);
return;
}
if (city == null || city == "") {
SmartDialog.showToast("请输入收货人地址");
SmartDialog.showToast("请输入收货人地址", alignment: Alignment.center);
return;
}
if (address == null || address == "") {
SmartDialog.showToast("请输入收货人详细地址");
SmartDialog.showToast("请输入收货人详细地址", alignment: Alignment.center);
return;
}
BaseData baseData;
@ -202,7 +202,7 @@ class _EditAddressPage extends State<EditAddressPage> {
}
if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast(preAddress == null ? "保存成功" : "修改成功");
SmartDialog.showToast(preAddress == null ? "保存成功" : "修改成功", alignment: Alignment.center);
Navigator.of(context).pop();
}
}

600
lib/article/hot_article_details_page.dart

@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
class HotArticleDetailsPage extends StatefulWidget {
@override
@ -16,255 +17,244 @@ class _HotArticleDetailsPage extends State<HotArticleDetailsPage> {
@override
Widget build(BuildContext context) {
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: [
Padding(padding: EdgeInsets.only(right: 16),child:Image.asset(
appBar: MyAppBar(
background: Color(0xFFFFFFFF),
leadingColor: Colors.black,
title: S.of(context).wenzhangxiangqing,
titleColor: Colors.black,
titleSize: 16.sp,
action: Padding(
padding: EdgeInsets.only(right: 16.w),
child: Image.asset(
"assets/image/icon_share.png",
width: 24,
height: 24,
),)
],
title: Text(
S.of(context).wenzhangxiangqing,
style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold),
width: 24.w,
height: 24.h,
),
),
),
body: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: [
Container(
margin: EdgeInsets.only(bottom: 20.h),
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.sp,
fontWeight: FontWeight.bold,
color: Color(0xff1A1A1A))),
SizedBox(
height: 20.h,
body: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: [
Container(
margin: EdgeInsets.only(bottom: 20.h),
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.sp,
fontWeight: FontWeight.bold,
color: Color(0xff1A1A1A),
),
Row(
children: [
ClipOval(
child: Image.network(
"https://t7.baidu.com/it/u=2841334870,333581502&fm=193&f=GIF",
fit: BoxFit.cover,
width: 44.w,
height: 44.h,
),
clipBehavior: Clip.hardEdge,
),
SizedBox(
width: 8.w,
),
SizedBox(
height: 20.h,
),
Row(
children: [
ClipOval(
child: Image.network(
"https://t7.baidu.com/it/u=2841334870,333581502&fm=193&f=GIF",
fit: BoxFit.cover,
width: 44.w,
height: 44.h,
),
Expanded(
child: Container(
height: 60.h,
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text.rich(
TextSpan(children: [
TextSpan(
text: "百花谷",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Colors.black),
),
]),
textDirection: TextDirection.ltr,
),
Text(
"2021.04.12 12:12",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xff808080),
clipBehavior: Clip.hardEdge,
),
SizedBox(
width: 8.w,
),
Expanded(
child: Container(
height: 60.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text.rich(
TextSpan(children: [
TextSpan(
text: "百花谷",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Colors.black),
),
]),
textDirection: TextDirection.ltr,
),
Text(
"2021.04.12 12:12",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xff808080),
),
],
),
),
],
),
flex: 1,
)
],
),
SizedBox(
height: 20.h,
),
RichText(
text: TextSpan(
text: "文本,是指书面语言的表现形式,从文学角度说,通常是具有完整、系统含义(Message)的一个句子或多个句子的组合。"
"一个文本可以是一个句子(Sentence)、一个段落(Paragraph)或者一个篇章(Discourse)。广义“文本”:"
"任何由书写所固定下来的任何话语。(利科尔) 狭义“文本”:由语言文字组成的文学实体,代指“作品”,相对于作者、世界构成一个独立、自足的系统。",
style: TextStyle(color:Color(0xFF1A1A1A), fontSize: 16.sp),
)),
SizedBox(
height: 16.h,
),
Image.network(
"https://t7.baidu.com/it/u=2487758541,1861252964&fm=193&f=GIF",
fit: BoxFit.cover,
width: double.infinity,
height: 170.h,
),
SizedBox(
height: 16.h,
),
RichText(
text: TextSpan(
text: "文本,是指书面语言的表现形式,从文学角度说,通常是具有完整、系统含义(Message)的一个句子或多个句子的组合。一个文本可以",
style: TextStyle(color:Color(0xFF1A1A1A), fontSize: 16.sp),
)),
],
),
),
flex: 1,
)
],
),
SizedBox(
height: 20.h,
),
RichText(
text: TextSpan(
text:
"文本,是指书面语言的表现形式,从文学角度说,通常是具有完整、系统含义(Message)的一个句子或多个句子的组合。"
"一个文本可以是一个句子(Sentence)、一个段落(Paragraph)或者一个篇章(Discourse)。广义“文本”:"
"任何由书写所固定下来的任何话语。(利科尔) 狭义“文本”:由语言文字组成的文学实体,代指“作品”,相对于作者、世界构成一个独立、自足的系统。",
style:
TextStyle(color: Color(0xFF1A1A1A), fontSize: 16.sp),
)),
SizedBox(
height: 16.h,
),
Image.network(
"https://t7.baidu.com/it/u=2487758541,1861252964&fm=193&f=GIF",
fit: BoxFit.cover,
width: double.infinity,
height: 170.h,
),
SizedBox(
height: 16.h,
),
RichText(
text: TextSpan(
text:
"文本,是指书面语言的表现形式,从文学角度说,通常是具有完整、系统含义(Message)的一个句子或多个句子的组合。一个文本可以",
style:
TextStyle(color: Color(0xFF1A1A1A), fontSize: 16.sp),
)),
],
),
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: [
Padding(padding: EdgeInsets.all(16),child:Text("评论 (58) 喜欢 (58)",
),
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: [
Padding(
padding: EdgeInsets.all(16),
child: Text("评论 (58) 喜欢 (58)",
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.bold,
color: Color(0xff1A1A1A))),),
SizedBox(
height: 600.h,
child: ListView.builder(
itemCount: 6,
scrollDirection: Axis.vertical,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return _commentItem(position);
},
),
color: Color(0xff1A1A1A))),
),
SizedBox(
height: 600.h,
child: ListView.builder(
itemCount: 6,
scrollDirection: Axis.vertical,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return _commentItem(position);
},
),
],
),
),
SizedBox(
height: 12.h,
),
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),
),
],
),
),
SizedBox(
height: 12.h,
),
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.sp,
color: Color(0xffCDCCCC),
),
),
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.sp,
color: Color(0xffCDCCCC),
),
),
),
],
),
),
],
),
),
Padding(
padding: EdgeInsets.only(left: 20.w, right: 20.w),
child: Text(
"发送",
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.bold,
color: Color(0XFF1A1A1A)),
),
),
Padding(
padding: EdgeInsets.only(left: 20.w, right: 20.w),
child: Text(
"发送",
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.bold,
color: Color(0XFF1A1A1A)),
),
Image.asset("assets/image/icon_like_h.png")
],
),
),
Image.asset("assets/image/icon_like_h.png")
],
),
],
),
),
],
),
),
),
);
}
@ -316,75 +306,79 @@ class _HotArticleDetailsPage extends State<HotArticleDetailsPage> {
return Container(
child: Column(
children: [
Padding(padding: EdgeInsets.all(16),child: 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.w,
height: 40.h,
Padding(
padding: EdgeInsets.all(16),
child: 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.w,
height: 40.h,
),
clipBehavior: Clip.hardEdge,
),
clipBehavior: Clip.hardEdge,
),
SizedBox(
width: 12.w,
),
Expanded(
child: Container(
height: 60.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text.rich(
TextSpan(children: [
TextSpan(
text: "张三",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Colors.black),
SizedBox(
width: 12.w,
),
Expanded(
child: Container(
height: 60.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text.rich(
TextSpan(children: [
TextSpan(
text: "张三",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Colors.black),
),
]),
textDirection: TextDirection.ltr,
),
Text(
"2021.04.12 12:12",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xff808080),
),
]),
textDirection: TextDirection.ltr,
),
],
),
),
flex: 1,
),
Container(
alignment: Alignment.topRight,
child: Row(
children: [
Image.asset(
"assets/image/icon_like.png",
width: 16.w,
height: 16.h,
),
Text(
"2021.04.12 12:12",
overflow: TextOverflow.ellipsis,
maxLines: 2,
"58",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xff808080),
),
fontSize: 12.sp, color: Color(0xff1A1A1A)),
),
],
),
),
flex: 1,
),
Container(
alignment: Alignment.topRight,
child: Row(
children: [
Image.asset(
"assets/image/icon_like.png",
width: 16.w,
height: 16.h,
),
Text(
"58",
style: TextStyle(fontSize: 12.sp, color: Color(0xff1A1A1A)),
),
],
),
),
],
),),
],
),
),
Padding(
padding: EdgeInsets.only(left: 68,right: 16),
padding: EdgeInsets.only(left: 68, right: 16),
child: Text(
"文本,是指书面语言的表现形式,从文学角度说,通常是具有完整、系统含义(Mess…",
style: TextStyle(fontSize: 14.sp, color: Color(0xff1A1A1A)),
@ -395,7 +389,7 @@ class _HotArticleDetailsPage extends State<HotArticleDetailsPage> {
),
Container(
width: double.infinity,
margin: EdgeInsets.only(left: 68.w,right: 16.w),
margin: EdgeInsets.only(left: 68.w, right: 16.w),
decoration: new BoxDecoration(
color: Color(0xffF2F2F2),
borderRadius: BorderRadius.circular(2.0),
@ -409,25 +403,25 @@ class _HotArticleDetailsPage extends State<HotArticleDetailsPage> {
),
),
if (position == 5)
Container(
height: 63.h,
decoration: BoxDecoration(
color: Color(0xffF2F2F2),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0)
],
),
margin: EdgeInsets.only(top: 30.h),
alignment: Alignment.center,
child: Text(
"-已显示全部评论-",
style: TextStyle(fontSize: 14.sp, color: Color(0xff353535)),
Container(
height: 63.h,
decoration: BoxDecoration(
color: Color(0xffF2F2F2),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0)
],
),
margin: EdgeInsets.only(top: 30.h),
alignment: Alignment.center,
child: Text(
"-已显示全部评论-",
style: TextStyle(fontSize: 14.sp, color: Color(0xff353535)),
),
),
),
],
),
);

35
lib/article/hot_article_item.dart

@ -8,6 +8,7 @@ import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/hot_item.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
@ -77,34 +78,12 @@ class _HotArticlePage extends State<HotArticlePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Color(0xFFF7F7F7),
elevation: 0,
title: Text(
S.of(context).huixiangtoutiao,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
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,
appBar: MyAppBar(
background: Color(0xFFF7F7F7),
leadingColor: Colors.black,
title: S.of(context).huixiangtoutiao,
titleColor: Colors.black,
titleSize: 18.sp,
),
body: Container(
child: SmartRefresher(

2
lib/generated/intl/messages_en.dart

@ -185,6 +185,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("会员积分"),
"huiyuanka" : MessageLookupByLibrary.simpleMessage("会员卡"),
"huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("会员卡详情"),
"huiyuanyue" : MessageLookupByLibrary.simpleMessage("会员余额"),
"huode" : MessageLookupByLibrary.simpleMessage("获得"),
@ -300,6 +301,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingzhuo" : MessageLookupByLibrary.simpleMessage("清桌"),
"qishoupeisongzhongyujisongdashijian" : MessageLookupByLibrary.simpleMessage("骑手配送中,预计送达时间"),
"qishouyijiedanquhuozhong" : MessageLookupByLibrary.simpleMessage("骑手已接单、取货中"),
"quanbao" : MessageLookupByLibrary.simpleMessage("券包"),
"quanbu" : MessageLookupByLibrary.simpleMessage("全部"),
"quanbudingdan" : MessageLookupByLibrary.simpleMessage("全部订单"),
"quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兑换"),

2
lib/generated/intl/messages_zh_CN.dart

@ -184,6 +184,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("会员积分"),
"huiyuanka" : MessageLookupByLibrary.simpleMessage("会员卡"),
"huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("会员卡详情"),
"huiyuanyue" : MessageLookupByLibrary.simpleMessage("会员余额"),
"huode" : MessageLookupByLibrary.simpleMessage("获得"),
@ -299,6 +300,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingzhuo" : MessageLookupByLibrary.simpleMessage("清桌"),
"qishoupeisongzhongyujisongdashijian" : MessageLookupByLibrary.simpleMessage("骑手配送中,预计送达时间"),
"qishouyijiedanquhuozhong" : MessageLookupByLibrary.simpleMessage("骑手已接单、取货中"),
"quanbao" : MessageLookupByLibrary.simpleMessage("券包"),
"quanbu" : MessageLookupByLibrary.simpleMessage("全部"),
"quanbudingdan" : MessageLookupByLibrary.simpleMessage("全部订单"),
"quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兑换"),

2
lib/generated/intl/messages_zh_Hans_CN.dart

@ -184,6 +184,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("会员积分"),
"huiyuanka" : MessageLookupByLibrary.simpleMessage("会员卡"),
"huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("会员卡详情"),
"huiyuanyue" : MessageLookupByLibrary.simpleMessage("会员余额"),
"huode" : MessageLookupByLibrary.simpleMessage("获得"),
@ -299,6 +300,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingzhuo" : MessageLookupByLibrary.simpleMessage("清桌"),
"qishoupeisongzhongyujisongdashijian" : MessageLookupByLibrary.simpleMessage("骑手配送中,预计送达时间"),
"qishouyijiedanquhuozhong" : MessageLookupByLibrary.simpleMessage("骑手已接单、取货中"),
"quanbao" : MessageLookupByLibrary.simpleMessage("券包"),
"quanbu" : MessageLookupByLibrary.simpleMessage("全部"),
"quanbudingdan" : MessageLookupByLibrary.simpleMessage("全部订单"),
"quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兑换"),

2
lib/generated/intl/messages_zh_Hant_CN.dart

@ -184,6 +184,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("會員等級"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("會員等級説明"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("會員積分"),
"huiyuanka" : MessageLookupByLibrary.simpleMessage("會員卡"),
"huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("會員卡詳情"),
"huiyuanyue" : MessageLookupByLibrary.simpleMessage("會員餘額"),
"huode" : MessageLookupByLibrary.simpleMessage("獲得"),
@ -299,6 +300,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingzhuo" : MessageLookupByLibrary.simpleMessage("清桌"),
"qishoupeisongzhongyujisongdashijian" : MessageLookupByLibrary.simpleMessage("騎手配送中,預計送達時間"),
"qishouyijiedanquhuozhong" : MessageLookupByLibrary.simpleMessage("騎手已接單、取貨中"),
"quanbao" : MessageLookupByLibrary.simpleMessage("券包"),
"quanbu" : MessageLookupByLibrary.simpleMessage("全部"),
"quanbudingdan" : MessageLookupByLibrary.simpleMessage("全部訂單"),
"quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兌換"),

2
lib/generated/intl/messages_zh_TW.dart

@ -184,6 +184,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("會員等級"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("會員等級説明"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("會員積分"),
"huiyuanka" : MessageLookupByLibrary.simpleMessage("會員卡"),
"huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("會員卡詳情"),
"huiyuanyue" : MessageLookupByLibrary.simpleMessage("會員餘額"),
"huode" : MessageLookupByLibrary.simpleMessage("獲得"),
@ -299,6 +300,7 @@ class MessageLookup extends MessageLookupByLibrary {
"qingzhuo" : MessageLookupByLibrary.simpleMessage("清桌"),
"qishoupeisongzhongyujisongdashijian" : MessageLookupByLibrary.simpleMessage("騎手配送中,預計送達時間"),
"qishouyijiedanquhuozhong" : MessageLookupByLibrary.simpleMessage("騎手已接單、取貨中"),
"quanbao" : MessageLookupByLibrary.simpleMessage("券包"),
"quanbu" : MessageLookupByLibrary.simpleMessage("全部"),
"quanbudingdan" : MessageLookupByLibrary.simpleMessage("全部訂單"),
"quanbuduihuan" : MessageLookupByLibrary.simpleMessage("全部兌換"),

20
lib/generated/l10n.dart

@ -4035,6 +4035,26 @@ class S {
);
}
/// ``
String get huiyuanka {
return Intl.message(
'会员卡',
name: 'huiyuanka',
desc: '',
args: [],
);
}
/// ``
String get quanbao {
return Intl.message(
'券包',
name: 'quanbao',
desc: '',
args: [],
);
}
/// `使`
String get privacy_policy4 {
return Intl.message(

37
lib/home/founder_story_page.dart

@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/MyPainter.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/separator.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -18,36 +19,12 @@ class _FounderStoryPage extends State<FounderStoryPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Color(0xFFFFFFFF),
elevation: 0,
centerTitle: false,
title: Text(
S.of(context).guanyuchuangshiren,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18.sp,
),
),
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2.w,
leadingWidth: 56.w,
automaticallyImplyLeading: true,
appBar: MyAppBar(
background: Color(0xFFFFFFFF),
leadingColor: Colors.black,
title: S.of(context).guanyuchuangshiren,
titleColor: Colors.black,
titleSize: 18.sp,
),
body: Container(
child: SingleChildScrollView(

1
lib/home/huixiang_brand_page.dart

@ -170,7 +170,6 @@ class _BrandPage extends State<BrandPage>
assetUriMatcher(): assetImageRender(),
networkSourceMatcher(extension: "svg"): svgNetworkImageRender(),
networkSourceMatcher(): networkImageRender(loadingWidget: () {
// return Image.asset("assets/image/default_1.png",);
return Container();
}),
},

39
lib/home/main_home_page.dart

@ -5,6 +5,7 @@ import 'package:huixiang/home/home_page.dart';
import 'package:huixiang/home/points_mall_page.dart';
import 'package:huixiang/main.dart';
import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_tab.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -52,29 +53,25 @@ class _MainHomePage extends State<MainHomePage>
return DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
backgroundColor: Color(0xFFFAFAFA),
elevation: 0,
toolbarOpacity: 0,
appBar: MyAppBar(
background: Color(0xFFFAFAFA),
toolbarHeight: 50.h,
automaticallyImplyLeading: false,
actions: [
Container(
margin: EdgeInsets.only(right: 17.w),
child: GestureDetector(
onTap: () {
// Navigator.of(context).pushNamed("/router/msg_page");
Navigator.of(context).pushNamed('/router/system_msg_page');
},
child: Image.asset(
"assets/image/icon_notices.png",
width: 24.w,
height: 24.h,
),
leading: false,
action: Container(
margin: EdgeInsets.only(right: 17.w),
child: GestureDetector(
onTap: () {
// Navigator.of(context).pushNamed("/router/msg_page");
Navigator.of(context).pushNamed('/router/system_msg_page');
},
child: Image.asset(
"assets/image/icon_notices.png",
width: 24.w,
height: 24.h,
),
)
],
title: TabBar(
),
),
titleChild: TabBar(
controller: tabcontroller,
automaticIndicatorColorAdjustment: true,
isScrollable: true,

66
lib/integral/integral_page.dart

@ -11,6 +11,7 @@ import 'package:huixiang/retrofit/data/sign_info.dart';
import 'package:huixiang/retrofit/data/task.dart';
import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
import 'package:shared_preferences/shared_preferences.dart';
@ -73,51 +74,30 @@ class _IntegralPage extends State<IntegralPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).jifenxiangqing,
style: TextStyle(color: Colors.white),
),
centerTitle: false,
backgroundColor: Color(0xFF3A405A),
elevation: 0,
actions: [
Container(
alignment: Alignment.center,
margin: EdgeInsets.only(right: 16.w),
child: GestureDetector(
onTap: () {
Navigator.of(context)
.pushNamed('/router/integral_detailed_page');
},
child: Text(
S.of(context).mingxi,
style: TextStyle(
color: Colors.white,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
),
appBar: MyAppBar(
background: Color(0xFF3A405A),
leadingColor: Colors.white,
title: S.of(context).jifenxiangqing,
titleColor: Colors.white,
titleSize: 16.sp,
action: Container(
alignment: Alignment.center,
margin: EdgeInsets.only(right: 16.w),
child: GestureDetector(
onTap: () {
Navigator.of(context)
.pushNamed('/router/integral_detailed_page');
},
child: Text(
S.of(context).mingxi,
style: TextStyle(
color: Colors.white,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
),
),
)
],
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.white,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56.w,
),
body: SingleChildScrollView(
child: Container(
@ -509,14 +489,14 @@ class _IntegralPage extends State<IntegralPage> {
///
signIn() async {
if ((signInfo != null && signInfo.todayHasSignin)) {
SmartDialog.showToast("今日已签到了");
SmartDialog.showToast("今日已签到了", alignment: Alignment.center);
return;
}
SmartDialog.showLoading(msg: S.of(context).zhengzaijiazai);
BaseData baseData = await apiService.signIn();
if (baseData != null && baseData.isSuccess) {
querySignInfo();
SmartDialog.showToast("签到成功");
SmartDialog.showToast("签到成功", alignment: Alignment.center);
}
}

48
lib/integral_store/integral_store_details_page.dart

@ -10,6 +10,7 @@ import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/goods.dart';
import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -60,47 +61,12 @@ class _IntegralStoreDetailsPage extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Color(0xFFFFFFFF),
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,
),
),
),
title: Text(
S.of(context).shangpinxiangqing,
style: TextStyle(
color: Colors.black,
fontSize: 16.sp,
fontWeight: FontWeight.bold,
),
),
titleSpacing: 2,
leadingWidth: 56.w,
// actions: [
// Container(
// margin: EdgeInsets.only(right: 15.w),
// child: GestureDetector(
// onTap: () {},
// child: Icon(
// Icons.share,
// size: 24,
// color: Colors.black,
// ),
// ),
// )
// ],
appBar: MyAppBar(
background: Color(0xFFFFFFFF),
leadingColor: Colors.black,
title: S.of(context).shangpinxiangqing,
titleColor: Colors.black,
titleSize: 16.sp,
),
body: Container(
child: Column(

2
lib/l10n/intl_en.arb

@ -418,6 +418,8 @@
"jujue": "拒绝",
"yinsizhengce1": " 感谢您使用一心回乡APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读一心回乡",
"yinsizhengce2": "     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。",
"huiyuanka": "会员卡",
"quanbao": "券包",

2
lib/l10n/intl_zh_CN.arb

@ -419,6 +419,8 @@
"jujue": "拒绝",
"yinsizhengce1": " 感谢您使用一心回乡APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读一心回乡",
"yinsizhengce2": "     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。",
"huiyuanka": "会员卡",
"quanbao": "券包",

2
lib/l10n/intl_zh_Hans_CN.arb

@ -419,6 +419,8 @@
"jujue": "拒绝",
"yinsizhengce1": " 感谢您使用一心回乡APP。我们非常重视您的个人信息和隐私保护。为了更好地保证您的个人权益,在您使用我们的产品前,请务必仔细阅读一心回乡",
"yinsizhengce2": "     在您同意后,我们才会根据您的使用需求,收集部分可能涉及的数据(地理位置、相机、存储等信息)。",
"huiyuanka": "会员卡",
"quanbao": "券包",

2
lib/l10n/intl_zh_Hant_CN.arb

@ -413,6 +413,8 @@
"jujue": "拒絕",
"yinsizhengce1": " 感謝您使用一心回鄉APP。我們非常的重視您的個人信息和隱私保護。為了更好地保證您的個人權益,在您使用我們的產品前,請務必仔細閱讀一心回鄉",
"yinsizhengce2": "     在您同意後,我們才會根據您的使用需求,收集部分可能涉及(地理位置、相機、存儲等信息)的數據。",
"huiyuanka": "會員卡",
"quanbao": "券包",

2
lib/l10n/intl_zh_TW.arb

@ -411,6 +411,8 @@
"jujue": "拒絕",
"yinsizhengce1": " 感謝您使用一心回鄉APP。我們非常的重視您的個人信息和隱私保護。為了更好地保證您的個人權益,在您使用我們的產品前,請務必仔細閱讀一心回鄉",
"yinsizhengce2": "     在您同意後,我們才會根據您的使用需求,收集部分可能涉及(地理位置、相機、存儲等信息)的數據。",
"huiyuanka": "會員卡",
"quanbao": "券包",

12
lib/login/login_page.dart

@ -165,7 +165,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
return;
}
if (!checkStatus) {
SmartDialog.showToast(S.of(context).gouxuanxieyi);
SmartDialog.showToast(S.of(context).gouxuanxieyi, alignment: Alignment.center);
return;
}
var mobile = _controllerPhone.text;
@ -185,12 +185,12 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
{
btnText = S.of(context).send_code,
_sendCodeStatus = 0,
SmartDialog.showToast("${value.msg}"),
SmartDialog.showToast("${value.msg}", alignment: Alignment.center),
refresh()
}
})
.catchError((error) {
SmartDialog.showToast("$error");
SmartDialog.showToast("$error", alignment: Alignment.center);
});
}
}
@ -235,7 +235,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
return;
}
if (!checkStatus) {
SmartDialog.showToast(S.of(context).gouxuanxieyi);
SmartDialog.showToast(S.of(context).gouxuanxieyi, alignment: Alignment.center);
return;
}
var mobile = _controllerPhone.text;
@ -271,7 +271,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
SmartDialog.showLoading(msg: S.of(context).zhengzaijiazai);
BaseData value = await client.memberLogin(param).catchError((error) {
print(error);
SmartDialog.showToast("$error");
SmartDialog.showToast("$error", alignment: Alignment.center);
});
Future.delayed(Duration(seconds: 2), () {
SmartDialog.dismiss();
@ -289,7 +289,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
Navigator.of(context).popAndPushNamed('/router/main_page');
}
} else {
SmartDialog.showToast("${value.msg}");
SmartDialog.showToast("${value.msg}", alignment: Alignment.center);
}
});
}

22
lib/main.dart

@ -89,8 +89,6 @@ void main() async {
XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin();
initSdk() async {
print("object: initsdk");
///ios startXg前需要调用此方法
xgFlutterPlugin.configureClusterDomainName("tpns.sh.tencent.com");
xgFlutterPlugin.setEnableDebug(true);
@ -171,31 +169,13 @@ class MyApp extends StatelessWidget {
final String name = settings.name;
final Function pageContentBuilder = routers[name];
if (pageContentBuilder != null) {
final Route route = MaterialPageRoute(
final Route route = CupertinoPageRoute(
builder: (context) {
return pageContentBuilder(context,
arguments: settings.arguments);
},
settings: settings,
);
//final Route route = PageRouteBuilder(
// pageBuilder: (context, animation, secondaryAnimation) {
// return pageContentBuilder(context,
// arguments: settings.arguments);
// },
// transitionsBuilder:
// (context, animation, secondaryAnimation, child) {
// return SlideTransition(
// child: child,
// position: animation.drive(
// Tween(begin: Offset(1.0, 0.0), end: Offset.zero).chain(
// CurveTween(curve: Curves.ease),
// ),
// ),
// );
// },
// settings: settings,
// );
return route;
}
return MaterialPageRoute(

88
lib/message/main_message_page.dart

@ -3,6 +3,7 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/message/mine_message.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart';
class MainMessagePage extends StatefulWidget {
@ -26,71 +27,28 @@ class _MainMessagePage extends State<MainMessagePage>
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFFFFFFFF),
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).xiaoxi,
style: TextStyle(color: Colors.black),
),
// bottom: PreferredSize(
// preferredSize: Size(double.infinity, 38),
// child: TabBar(
// controller: tabcontroller,
// isScrollable: true,
// indicatorWeight: 2,
// indicatorColor: Color(0xFF39B54A),
// labelPadding: EdgeInsets.only(left: 25, right: 25),
// indicatorPadding: EdgeInsets.only(left: 25, right: 25, top: 3),
// unselectedLabelStyle:
// TextStyle(fontSize: 16, fontWeight: FontWeight.normal),
// labelStyle: TextStyle(
// color: Colors.black,
// fontSize: 16,
// fontWeight: FontWeight.bold),
// labelColor: Colors.black,
// tabs: [
// MyTab(text: S.of(context).huodongzixun),
// MyTab(
// text: S.of(context).wodexiaoxi,
// ),
// ]),
// ),
),
body: MineMessagePage(_status),
// TabBarView(
// children: [
// RealTimeInfoPage(),
// MineMessagePage(_status, (status) {
// setState(() {
// _bgStatus = status;
// });
// })
// ],
// controller: tabcontroller,
// ),
);
backgroundColor: Color(0xFFFFFFFF),
appBar: MyAppBar(
title: S.of(context).xiaoxi,
titleColor: Colors.black,
titleSize: 18.sp,
background: Color(0xFFF7F7F7),
leadingColor: Colors.black,
action: rightAction(),
),
body: MineMessagePage(_status),
// TabBarView(
// children: [
// RealTimeInfoPage(),
// MineMessagePage(_status, (status) {
// setState(() {
// _bgStatus = status;
// });
// })
// ],
// controller: tabcontroller,
// ),
);
}
var _status = 0;

73
lib/mine/coupons_page.dart

@ -10,6 +10,7 @@ import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/new_coupon_widget.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:huixiang/view_widget/receive_success.dart';
import 'package:huixiang/view_widget/selector_store_dialog.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
@ -24,7 +25,6 @@ class CouponsPage extends StatefulWidget {
}
class _CouponsPage extends State<CouponsPage> {
ApiService apiService;
RefreshController _refreshController;
@ -115,7 +115,8 @@ class _CouponsPage extends State<CouponsPage> {
S.of(context).keyongquan,
style: TextStyle(
fontSize: 14.sp,
fontWeight: state == 1 ? FontWeight.bold : FontWeight.normal,
fontWeight:
state == 1 ? FontWeight.bold : FontWeight.normal,
color: state == 1 ? Colors.black : Color(0xff727272),
),
),
@ -141,7 +142,8 @@ class _CouponsPage extends State<CouponsPage> {
S.of(context).shixiaoquan,
style: TextStyle(
fontSize: 14.sp,
fontWeight: state == 3 ? FontWeight.bold : FontWeight.normal,
fontWeight:
state == 3 ? FontWeight.bold : FontWeight.normal,
color: state == 3 ? Colors.black : Color(0xff727272),
),
),
@ -163,30 +165,46 @@ class _CouponsPage extends State<CouponsPage> {
),
onRefresh: _onRefresh,
onLoading: queryCard,
child: ListView.builder(
itemBuilder: (context, position) {
return GestureDetector(
child: NewCouponWidget(coupons[position], (type) {
if (type == 1) {
receiveCoupon(coupons[position].id);
} else {
if (coupons[position].bizType == 5) {
Navigator.of(context).pushNamed('/router/write_off_page',arguments: {
"couponId":coupons[position].id
});
} else {
showStoreSelector(coupons[position].storeList);
}
}
}, () {
setState(() {
coupons[position].isEx = !coupons[position].isEx;
});
}, type: 0,),
);
},
itemCount: coupons != null ? coupons.length : 0,
),
child: (coupons != null && coupons.length > 0)
? ListView.builder(
itemBuilder: (context, position) {
return GestureDetector(
child: NewCouponWidget(
coupons[position],
(type) {
if (type == 1) {
receiveCoupon(coupons[position].id);
} else {
if (coupons[position].bizType == 5) {
Navigator.of(context).pushNamed(
'/router/write_off_page',
arguments: {
"couponId": coupons[position].id
});
} else {
showStoreSelector(
coupons[position].storeList);
}
}
},
() {
setState(() {
coupons[position].isEx =
!coupons[position].isEx;
});
},
type: 0,
),
);
},
itemCount: coupons != null ? coupons.length : 0,
)
: NoDataView(
isShowBtn: false,
text: "你还没有券~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
),
),
),
],
@ -220,5 +238,4 @@ class _CouponsPage extends State<CouponsPage> {
},
);
}
}

2
lib/mine/edit_name.dart

@ -35,7 +35,7 @@ class _EditName extends State<EditName> {
if(name != null && name != "") {
Navigator.of(context).pop(name);
} else {
SmartDialog.showToast("请输入用户名");
SmartDialog.showToast("请输入用户名", alignment: Alignment.center);
}
},
child: Text(

36
lib/mine/manage_address_page.dart

@ -7,9 +7,11 @@ import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/border_text.dart';
import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class ManageAddressPage extends StatefulWidget {
final Map<String, dynamic> arguments;
@ -52,34 +54,12 @@ class _ManageAddressPage extends State<ManageAddressPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).shouhuodizhi,
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,
appBar: MyAppBar(
title: S.of(context).shouhuodizhi,
titleColor: Colors.black,
titleSize: 18.sp,
background: Color(0xFFF7F7F7),
leadingColor: Colors.black,
),
body: Column(
children: [

36
lib/mine/mine_card_invalid_page.dart

@ -7,9 +7,11 @@ import 'package:huixiang/retrofit/data/coupon.dart';
import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/coupon_widget.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class MineCardInvalidPage extends StatefulWidget {
@override
@ -84,34 +86,12 @@ class _MineCardInvalidPage extends State<MineCardInvalidPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).shixiaoyouhuiquan,
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,
appBar: MyAppBar(
title: S.of(context).shixiaoyouhuiquan,
titleColor: Colors.black,
titleSize: 18.sp,
background: Color(0xFFF7F7F7),
leadingColor: Colors.black,
),
body: Container(
child: SmartRefresher(

50
lib/mine/mine_card_page.dart

@ -1,8 +1,10 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/mine/vip_card_page.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_tab.dart';
import 'coupons_page.dart';
@ -15,47 +17,27 @@ class MineCardPage extends StatefulWidget {
class _MineCardPage extends State<MineCardPage>
with SingleTickerProviderStateMixin {
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 2,
child: Scaffold(
appBar: AppBar(
title: Text(
S.of(context).kaquan,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
centerTitle: false,
backgroundColor: Colors.white,
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,
appBar: MyAppBar(
title: S.of(context).kaquan,
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
toolbarHeight: kToolbarHeight + MediaQuery.of(context).padding.top,
bottom: TabBar(
// isScrollable: true, //
indicatorColor: Color(0xff39B54A),
labelColor: Colors.black,
labelStyle: TextStyle(fontSize: 17, fontWeight: FontWeight.bold),
labelStyle: TextStyle(
fontSize: 17.sp,
fontWeight: FontWeight.bold,
),
unselectedLabelStyle: TextStyle(
fontSize: 16,
fontSize: 16.sp,
fontWeight: FontWeight.normal,
),
// controller: tabController,
@ -64,8 +46,8 @@ class _MineCardPage extends State<MineCardPage>
indicatorSize: TabBarIndicatorSize.label,
//
tabs: <Widget>[
Tab(text: "会员卡"),
Tab(text: "券包"),
MyTab(text: S.of(context).huiyuanka),
MyTab(text: S.of(context).quanbao),
],
),
),

38
lib/mine/mine_vip_level_page.dart

@ -9,6 +9,7 @@ import 'package:huixiang/retrofit/data/rank.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/mine_vip_view.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:shared_preferences/shared_preferences.dart';
class MineVipLevelPage extends StatefulWidget {
@ -52,42 +53,19 @@ class _MineVipLevelPage extends State<MineVipLevelPage> {
});
} else {
SmartDialog.showToast(rankData.msg);
SmartDialog.showToast(rankData.msg, alignment: Alignment.center);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).wodehuiyuandengji,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18.sp,
),
),
centerTitle: false,
backgroundColor: Color(0xFFFFFFFF),
elevation: 0,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2.w,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).wodehuiyuandengji,
titleColor: Colors.black,
titleSize: 18.sp,
background: Color(0xFFFFFFFF),
leadingColor: Colors.black,
),
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),

34
lib/mine/mine_wallet_page.dart

@ -10,6 +10,7 @@ import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -102,34 +103,11 @@ class _MineWalletPage extends State<MineWalletPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).wodeqianbao,
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.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).wodeqianbao,
titleColor: Colors.black,
background: Color(0xFFF7F7F7),
leadingColor: Colors.black,
),
body: SmartRefresher(
controller: refreshController,

38
lib/mine/recharge_page.dart

@ -10,6 +10,7 @@ import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/item_input_widget.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:shared_preferences/shared_preferences.dart';
@ -40,35 +41,12 @@ class _RechargePage extends State<RechargePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).chongzhi,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18.sp,
),
),
centerTitle: false,
backgroundColor: Color(0xFFFFFFFF),
elevation: 0,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).chongzhi,
titleColor: Colors.black,
titleSize: 18.sp,
background: Color(0xFFFFFFFF),
leadingColor: Colors.black,
),
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
@ -251,7 +229,7 @@ class _RechargePage extends State<RechargePage> {
recharge() async {
String money = controller.text;
if (money == null || money == "") {
SmartDialog.showToast(S.of(context).qingshuruchongzhijine);
SmartDialog.showToast(S.of(context).qingshuruchongzhijine, alignment: Alignment.center);
return;
}
int amount = int.tryParse(money);

34
lib/mine/roll_center_page.dart

@ -9,6 +9,7 @@ import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/new_coupon_widget.dart';
import 'package:huixiang/view_widget/receive_success.dart';
@ -82,34 +83,11 @@ class _RollCenterPage extends State<RollCenterPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).lingquanzhongxin,
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.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).lingquanzhongxin,
titleColor: Colors.black,
background: Color(0xFFF7F7F7),
leadingColor: Colors.black,
),
body: Container(
child: Column(

36
lib/mine/user_info_page.dart

@ -11,6 +11,7 @@ import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/view_widget/cupertino_date_picker.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:image_cropper/image_cropper.dart';
import 'package:image_picker_gallery_camera/image_picker_gallery_camera.dart';
import 'package:intl/intl.dart';
@ -64,34 +65,11 @@ class _UserInfoPage extends State<UserInfoPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).zhanghaoxinxi,
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.sp,
),
),
),
titleSpacing: 2,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).zhanghaoxinxi,
titleColor: Colors.black,
background: Color(0xFFF7F7F7),
leadingColor: Colors.black,
),
body: Container(
child: Column(
@ -354,7 +332,7 @@ class _UserInfoPage extends State<UserInfoPage> {
var info = await apiService.editInfo(modifyInfo);
if (info.isSuccess) {
setState(() {
SmartDialog.showToast("用户信息修改成功");
SmartDialog.showToast("用户信息修改成功", alignment: Alignment.center);
});
}
}

34
lib/mine/vip_balance_page.dart

@ -6,6 +6,7 @@ import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/data/user_bill.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
@ -83,34 +84,11 @@ class _VipBalancePage extends State<VipBalancePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).yuemingxi,
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.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).yuemingxi,
titleColor: Colors.black,
background: Color(0xFFF7F7F7),
leadingColor: Colors.black,
),
body: Container(
child: (userBills == null || userBills.length == 0)

33
lib/mine/vip_detail_page.dart

@ -11,6 +11,7 @@ import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/painter_bg.dart';
import 'package:huixiang/utils/status_utils.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
@ -83,32 +84,12 @@ class _VipDetailPage extends State<VipDetailPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).huiyuankaxiangqing,
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
),
centerTitle: false,
backgroundColor: Color(0xFF3A405A),
brightness: Brightness.dark,
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.white,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).huiyuankaxiangqing,
titleColor: Colors.white,
background: Color(0xFF3A405A),
// brightness: Brightness.dark,
leadingColor: Colors.white,
),
body: Column(
children: [

36
lib/order/exchange_history_page.dart

@ -8,6 +8,7 @@ import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/my_tab.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
@ -66,35 +67,12 @@ class _ExchangeHistoryPage extends State<ExchangeHistoryPage>
return DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
title: Text(
S.of(context).duihuanlishi,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18.sp,
),
),
centerTitle: false,
backgroundColor: Color(0xFFFFFFFF),
elevation: 0,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).duihuanlishi,
titleColor: Colors.black,
titleSize: 18.sp,
background: Color(0xFFFFFFFF),
leadingColor: Colors.black,
bottom: PreferredSize(
preferredSize: Size(double.infinity, 38.h),
child: TabBar(

31
lib/order/exchange_order_detail_page.dart

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/separator.dart';
class ExchangeOrderDetailPage extends StatefulWidget {
@ -13,31 +14,11 @@ class _ExchangeOrderDetailPage extends State<ExchangeOrderDetailPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).yiwanchengdingdan,
style: TextStyle(color: Colors.black),
),
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,
appBar: MyAppBar(
title: S.of(context).yiwanchengdingdan,
titleColor: Colors.black,
leadingColor: Colors.black,
background: Color(0xFFF7F7F7),
),
body: SingleChildScrollView(
child: Container(

42
lib/order/exchange_order_page.dart

@ -8,6 +8,7 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -43,35 +44,12 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).dingdanqueren,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
centerTitle: false,
backgroundColor: Color(0xFFFAFAFA),
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,
appBar: MyAppBar(
title: S.of(context).dingdanqueren,
titleColor: Colors.black,
titleSize: 18.sp,
background: Color(0xFFFAFAFA),
leadingColor: Colors.black,
),
body: Column(
children: [
@ -426,12 +404,12 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
creditOrder() async {
if (widget.arguments["useTyped"] == 1 &&
(storeId == null || storeId == "")) {
SmartDialog.showToast("请选择一个门店");
SmartDialog.showToast("请选择一个门店", alignment: Alignment.center);
return;
}
if (widget.arguments["useTyped"] == 2 &&
(userAddressId == null || userAddressId == "")) {
SmartDialog.showToast("请选择一个收货地址");
SmartDialog.showToast("请选择一个收货地址", alignment: Alignment.center);
return;
}
BaseData baseDate = await apiService.creditOrder({
@ -449,7 +427,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
"${int.tryParse(points) - int.tryParse(widget.arguments["price"])}";
Navigator.of(context).pop();
} else {
SmartDialog.showToast(baseDate.msg);
SmartDialog.showToast(baseDate.msg, alignment: Alignment.center);
}
}
}

36
lib/order/exchange_order_success_page.dart

@ -7,6 +7,7 @@ import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/border_text.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -45,35 +46,12 @@ class _ExchangeOrderSuccessPage extends State<ExchangeOrderSuccessPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).zhifuxiangqing,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18.sp,
),
),
centerTitle: false,
backgroundColor: Color(0xFFFAFAFA),
elevation: 0,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).zhifuxiangqing,
titleColor: Colors.black,
titleSize: 18.sp,
background: Color(0xFFFAFAFA),
leadingColor: Colors.black,
),
body: Container(
alignment: Alignment.center,

34
lib/order/logistics_information_page.dart

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
class LogisticsInformationPage extends StatefulWidget {
@override
@ -13,34 +14,11 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Color(0xFFF7F7F7),
elevation: 0,
title: Text(
S.of(context).wuliuxinxi,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
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,
appBar: MyAppBar(
background: Color(0xFFF7F7F7),
title: S.of(context).wuliuxinxi,
titleColor: Colors.black,
leadingColor: Colors.black,
),
body:Container(
child: SingleChildScrollView(

40
lib/order/order_detail_page.dart

@ -8,6 +8,7 @@ import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/view_widget/border_text.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/pay_input_view.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:huixiang/view_widget/separator.dart';
@ -73,32 +74,11 @@ class _OrderDetailPage extends State<OrderDetailPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).jinxingzhongdedingdan,
style: TextStyle(color: Colors.white),
),
centerTitle: false,
backgroundColor: Color(0xFF3A405A),
brightness: Brightness.dark,
elevation: 0,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.white,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).jinxingzhongdedingdan,
titleColor: Colors.white,
background: Color(0xFF3A405A),
leadingColor: Colors.white,
bottom: PreferredSize(
preferredSize: Size(double.infinity, orderStatus >= 4 ? 98.h : 108.h),
child: Container(
@ -473,14 +453,6 @@ class _OrderDetailPage extends State<OrderDetailPage> {
}
carryOnPay() async {
// if (orderInfo == null) return;
// BaseData baseData = await apiService.continuePay(
// {"orderCode": orderInfo.orderCode}).catchError((onError) {});
// if (baseData != null && baseData.isSuccess) {
// // queryDetails();
// } else {
// SmartDialog.showToast(baseData.msg);
// }
showDialog(
context: context,
builder: (context) {

36
lib/order/order_history_page.dart

@ -8,6 +8,7 @@ import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/status_utils.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/my_tab.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
@ -46,35 +47,12 @@ class _OrderHistoryPage extends State<OrderHistoryPage>
return DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
title: Text(
S.of(context).dingdan,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18.sp,
),
),
centerTitle: false,
backgroundColor: Color(0xFFFFFFFF),
elevation: 0,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2.w,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).dingdan,
titleColor: Colors.black,
titleSize: 18.sp,
background: Color(0xFFFFFFFF),
leadingColor: Colors.black,
bottom: PreferredSize(
preferredSize: Size(double.infinity, 38.h),
child: TabBar(

44
lib/order/store_selector_page.dart

@ -10,6 +10,7 @@ import 'package:huixiang/retrofit/data/store.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/loading_view.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:amap_flutter_base/amap_flutter_base.dart';
@ -95,9 +96,9 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
startLocation() async {
if (await Permission.locationWhenInUse.serviceStatus.isEnabled) {
bool isShown = await Permission.contacts.shouldShowRequestRationale;
if (isShown) {
SmartDialog.showToast("shouldShowRequestRationale");
}
// if (isShown) {
// SmartDialog.showToast("shouldShowRequestRationale");
// }
if (await Permission.location.isPermanentlyDenied) {
openAppSettings();
getLatLng();
@ -171,35 +172,12 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).mendianxuanzhe,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18.sp,
),
),
centerTitle: false,
backgroundColor: Color(0xFFFAFAFA),
elevation: 0,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).mendianxuanzhe,
titleColor: Colors.black,
titleSize: 18.sp,
background: Color(0xFFFAFAFA),
leadingColor: Colors.black,
),
body: Container(
margin: EdgeInsets.only(top: 18.h),
@ -223,7 +201,7 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
InkWell(
onTap: () {
if (groupValue == null) {
SmartDialog.showToast(S.of(context).qingxuanzeyigemendian);
SmartDialog.showToast(S.of(context).qingxuanzeyigemendian, alignment: Alignment.center);
return;
}
Store store = storeList[groupValue];

41
lib/order/write_off_page.dart

@ -1,7 +1,9 @@
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:huixiang/view_widget/separator.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class WriteOffPage extends StatefulWidget {
@ -20,35 +22,12 @@ class _WriteOffPage extends State<WriteOffPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFF32A060),
appBar: AppBar(
title: Text(
"核销码详情",
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
centerTitle: false,
backgroundColor: Color(0xFF32A060),
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.white,
size: 24,
),
),
),
titleSpacing: 2,
leadingWidth: 56,
appBar: MyAppBar(
title: S.of(context).hexiaomaxiangqing,
titleSize: 18.sp,
titleColor: Colors.white,
background: Color(0xFF32A060),
leadingColor: Colors.white,
),
body: Container(
alignment: Alignment.topCenter,
@ -72,7 +51,7 @@ class _WriteOffPage extends State<WriteOffPage> {
Text(
"马克杯兑换核销码",
style: TextStyle(
fontSize: 16,
fontSize: 16.sp,
fontWeight: FontWeight.bold,
color: Color(0xFF353535)),
),
@ -82,7 +61,7 @@ class _WriteOffPage extends State<WriteOffPage> {
Text(
"有效期:2020.01~2020.01.21",
style: TextStyle(
fontSize: 12, color: Color(0xFF353535)),
fontSize: 12.sp, color: Color(0xFF353535)),
),
],
mainAxisAlignment: MainAxisAlignment.center,

59
lib/order/write_off_success_page.dart

@ -1,6 +1,8 @@
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class WriteOffSuccessPage extends StatefulWidget {
@override
@ -13,35 +15,12 @@ class _WriteOffSuccessPage extends State<WriteOffSuccessPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).hexiaomaxiangqing,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
centerTitle: false,
backgroundColor: Color(0xFFFAFAFA),
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,
appBar: MyAppBar(
title: S.of(context).hexiaomaxiangqing,
titleColor: Colors.black,
titleSize: 18.sp,
background: Color(0xFFFAFAFA),
leadingColor: Colors.black,
),
body: Container(
alignment: Alignment.center,
@ -50,47 +29,47 @@ class _WriteOffSuccessPage extends State<WriteOffSuccessPage> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 46,
height: 46.h,
),
Image.asset(
"assets/image/icon_order_success.png",
width: 76,
height: 76,
width: 76.w,
height: 76.h,
fit: BoxFit.contain,
),
SizedBox(
height: 16,
height: 16.h,
),
Text(
S.of(context).hexiaochenggong,
style: TextStyle(
color: Color(0xFF353535),
fontSize: 21,
fontSize: 21.sp,
fontWeight: FontWeight.bold),
),
SizedBox(
height: 12,
height: 12.h,
),
Text(
S.of(context).dangqianshangpinduihuanhexiaoma,
style: TextStyle(
color: Color(0xFF727272),
fontSize: 12,
fontSize: 12.sp,
fontWeight: FontWeight.bold),
),
SizedBox(
height: 40,
height: 40.h,
),
Container(
margin: EdgeInsets.only(left: 20, right: 20),
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: RoundButton(
text: S.of(context).fanhuiduihuanlishi,
textColor: Colors.white,
backgroup: Color(0xFF32A060),
radius: 4,
fontWeight: FontWeight.bold,
fontSize: 16,
padding: EdgeInsets.only(top: 12, bottom: 12),
fontSize: 16.sp,
padding: EdgeInsets.only(top: 12.h, bottom: 12.h),
),
)
],

2
lib/retrofit/retrofit_api.dart

@ -88,7 +88,7 @@ abstract class ApiService {
);
} else if (map["code"] != 0 && response.request.baseUrl == baseUrl) {
///poi服务请求不需要toast
SmartDialog.showToast(map["msg"]);
SmartDialog.showToast(map["msg"], alignment: Alignment.center);
}
debugPrint("======================= 响应数据结束 =======================\n");
}, onError: (DioError e) {

34
lib/setting/about_page.dart

@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:package_info/package_info.dart';
class AboutPage extends StatefulWidget {
@ -27,34 +28,11 @@ class _AboutPage extends State<AboutPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).guanyu,
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.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2.w,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).guanyu,
titleColor: Colors.black,
background: Color(0xFFF7F7F7),
leadingColor: Colors.black,
),
body: Stack(
children: [

35
lib/setting/help_feedback_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/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -17,34 +18,12 @@ class _HelpFeedbackPage extends State<HelpFeedbackPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).bangzhuyufankui,
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.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2.w,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).bangzhuyufankui,
titleColor: Colors.black,
background: Color(0xFFF7F7F7),
leadingColor: Colors.black,
),
body: Container(
decoration: new BoxDecoration(

34
lib/setting/permission_setting_page.dart

@ -4,6 +4,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/request_permission.dart';
import 'package:permission_handler/permission_handler.dart';
@ -62,34 +63,11 @@ class _PermissionSettingPage extends State<PermissionSettingPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).quanxianshezhi,
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.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2.w,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).quanxianshezhi,
titleColor: Colors.black,
background: Color(0xFFF7F7F7),
leadingColor: Colors.black,
),
body: Container(
child: ListView.builder(

34
lib/setting/setting_page.dart

@ -8,6 +8,7 @@ import 'package:huixiang/main.dart';
import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:path_provider/path_provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
@ -45,34 +46,11 @@ class _SettingPage extends State<SettingPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).shezhi,
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,
appBar: MyAppBar(
title: S.of(context).shezhi,
titleColor: Colors.black,
background: Color(0xFFF7F7F7),
leadingColor: Colors.black,
),
body: Container(
decoration: new BoxDecoration(

34
lib/setting/treaty_page.dart

@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
// import 'package:webview_flutter/webview_flutter.dart';
// import 'package:webview_flutter/src/webview_cupertino.dart';
@ -25,34 +26,11 @@ class _TreatyPage extends State<TreatyPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).yinsishengming,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
centerTitle: false,
backgroundColor: Colors.transparent,
elevation: 0,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2.w,
leadingWidth: 56.w,
appBar: MyAppBar(
title: S.of(context).yinsishengming,
titleColor: Colors.black,
background: Colors.transparent,
leadingColor: Colors.black,
),
body: Container(
width: MediaQuery.of(context).size.width,

6
lib/union/store_details_page.dart

@ -81,7 +81,11 @@ class _StoreDetailsPage extends State<StoreDetailsPage> {
: article != null
? article.viceTitle
: "",
[],
[activity != null
? activity.coverImg
: article != null
? article.coverImg
: "",],
activity != null
? activity.coverImg
: article != null

4
lib/union/union_details_page.dart

@ -721,7 +721,7 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
receiveVip() async {
BaseData baseData = await apiService.minLogin(storeInfo.id);
if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast(S.of(context).lingquchenggong);
SmartDialog.showToast(S.of(context).lingquchenggong, alignment: Alignment.center);
setState(() {
isReceive = false;
});
@ -909,7 +909,7 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
_loginMin() async {
if (storeInfo == null) return;
if (!isEnable()) {
SmartDialog.showToast(S.of(context).zanbuzhichixianshangdiancan);
SmartDialog.showToast(S.of(context).zanbuzhichixianshangdiancan, alignment: Alignment.center);
return;
}
BaseData baseData = await apiService.minLogin(storeInfo.id);

20
lib/view_widget/my_appbar.dart

@ -1,8 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
final Function onTap;
final Widget action;
final Widget bottom;
final Widget titleChild;
final String title;
final double titleSize;
final Color titleColor;
@ -10,16 +13,20 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
final Color background;
final Size preferredSize;
final double toolbarHeight;
final bool leading;
MyAppBar({
Key key,
this.onTap,
this.action,
this.bottom,
this.titleChild,
this.title,
this.toolbarHeight,
this.background = const Color(0xFFF7F7F7),
this.leadingColor = Colors.black,
this.titleColor = Colors.black,
this.titleSize = 18,
this.leading = true,
}) : preferredSize = Size.fromHeight(toolbarHeight ?? kToolbarHeight),
super(key: key);
@ -28,13 +35,13 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
return AppBar(
backgroundColor: background,
elevation: 0,
leading: GestureDetector(
leading: leading ? GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10),
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
@ -42,12 +49,12 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
size: 24,
),
),
),
) : Container(),
titleSpacing: 2,
centerTitle: false,
leadingWidth: 56,
title: (title == null || title == "")
? null
leadingWidth: leading ? 56.w : 10.w,
title: ((title == null || title == "") && titleChild != null)
? titleChild
: Text(
title,
style: TextStyle(
@ -66,6 +73,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
),
)
],
bottom: bottom,
);
}
}

33
lib/view_widget/pay_input_view.dart

@ -3,6 +3,8 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/view_widget/keyboard/custom_password_field_widget.dart';
import 'package:huixiang/view_widget/keyboard/keyboard_widget.dart';
import 'package:huixiang/view_widget/keyboard/pay_password.dart' as keyevent;
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class PayInputWidget extends StatefulWidget {
@override
@ -16,31 +18,12 @@ class _PayInputWidget extends State<PayInputWidget> {
Widget build(BuildContext context) {
var height = (MediaQuery.of(context).size.width - (20 * 7.0)) / 6.0;
return Scaffold(
appBar: AppBar(
centerTitle: true,
title: Text(
S.of(context).shuruzhifumima,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
color: Color(0xFF353535),
),
),
backgroundColor: Colors.white,
elevation: 0,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
margin: EdgeInsets.only(left: 25),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
appBar: MyAppBar(
title: S.of(context).shuruzhifumima,
titleSize: 14.sp,
titleColor: Color(0xFF353535),
background: Colors.white,
leadingColor: Colors.black,
),
body: Container(
color: Color(0xFFD5D7DD).withAlpha(237),

Loading…
Cancel
Save