From 92383172547b10d0cedfaf0ebdeea279b276a27a Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Thu, 29 Jul 2021 15:01:39 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=85=85=E5=80=BC=E6=9B=B4=E6=94=B9,?= =?UTF-8?q?=E9=83=A8=E5=88=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/address/city_picker_page.dart | 32 ++- lib/address/edit_address_page.dart | 9 +- lib/article/hot_article_details_page.dart | 77 +++--- lib/article/hot_article_item.dart | 3 +- lib/article/video_playback_page.dart | 75 +++--- lib/generated/intl/messages_en.dart | 2 + lib/generated/l10n.dart | 20 ++ lib/home/founder_story_page.dart | 88 +++---- lib/home/guide_page.dart | 153 ++++++------ lib/home/home_page.dart | 9 +- lib/home/huixiang_brand_page.dart | 16 +- lib/home/main_home_page.dart | 18 +- lib/home/points_mall_page.dart | 17 +- lib/l10n/intl_en.arb | 2 + lib/login/login_page.dart | 13 +- lib/mine/mine_wallet_page.dart | 270 ++++++++++++---------- pubspec.lock | 15 +- pubspec.yaml | 2 +- 18 files changed, 440 insertions(+), 381 deletions(-) diff --git a/lib/address/city_picker_page.dart b/lib/address/city_picker_page.dart index cb4a38cd..331df4d5 100644 --- a/lib/address/city_picker_page.dart +++ b/lib/address/city_picker_page.dart @@ -1,17 +1,12 @@ - - - - - import 'package:flutter/material.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; class CityPickerPage extends StatefulWidget { @override State createState() { return _CityPickerPage(); } - } class _CityPickerPage extends State { @@ -25,14 +20,13 @@ class _CityPickerPage extends State { background: Colors.white, ), body: Container( - // child: AzListView(data: data, itemCount: 100, itemBuilder: (contetx, position) { - // - // }), - ), + // child: AzListView(data: data, itemCount: 100, itemBuilder: (contetx, position) { + // + // }), + ), ); } - Widget searchWidget() { return Container( height: 36, @@ -43,10 +37,11 @@ class _CityPickerPage extends State { borderRadius: BorderRadius.all(Radius.circular(4)), boxShadow: [ BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0,) + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ) ]), child: Row( children: [ @@ -65,9 +60,9 @@ class _CityPickerPage extends State { ), ), Container( - width: 1, + width: 1.w, color: Colors.black, - margin: EdgeInsets.only(top: 2, bottom: 2, left: 10, right: 16), + margin: EdgeInsets.only(top: 2.h, bottom: 2.h, left: 10.w, right: 16.w), ), Icon( Icons.search, @@ -88,5 +83,4 @@ class _CityPickerPage extends State { ), ); } - -} \ No newline at end of file +} diff --git a/lib/address/edit_address_page.dart b/lib/address/edit_address_page.dart index ee5fc292..c8a4f97e 100644 --- a/lib/address/edit_address_page.dart +++ b/lib/address/edit_address_page.dart @@ -6,6 +6,7 @@ import 'package:huixiang/retrofit/data/base_data.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'; class EditAddressPage extends StatefulWidget { final Map arguments; @@ -62,8 +63,8 @@ class _EditAddressPage extends State { child: Column( children: [ Container( - margin: EdgeInsets.only(bottom: 26), - padding: EdgeInsets.only(top: 16, bottom: 16), + margin: EdgeInsets.only(bottom: 26.h), + padding: EdgeInsets.only(top: 16.h, bottom: 16.h), decoration: BoxDecoration( color: Colors.white, boxShadow: [ @@ -114,7 +115,7 @@ class _EditAddressPage extends State { "保存", style: TextStyle( fontWeight: FontWeight.bold, - fontSize: 16, + fontSize: 16.sp, color: Colors.white, ), ), @@ -215,7 +216,7 @@ class _EditAddressPage extends State { child: Text( start, style: TextStyle( - fontSize: 16, + fontSize: 16.sp, fontWeight: FontWeight.bold, color: Color(0xFF353535), ), diff --git a/lib/article/hot_article_details_page.dart b/lib/article/hot_article_details_page.dart index 15c45128..308db321 100644 --- a/lib/article/hot_article_details_page.dart +++ b/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:flutter_screenutil/flutter_screenutil.dart'; class HotArticleDetailsPage extends StatefulWidget { @override @@ -55,7 +56,7 @@ class _HotArticleDetailsPage extends State { child: Column( children: [ Container( - margin: EdgeInsets.only(bottom: 20), + margin: EdgeInsets.only(bottom: 20.h), padding: EdgeInsets.all(16), decoration: BoxDecoration( color: Colors.white, @@ -73,11 +74,11 @@ class _HotArticleDetailsPage extends State { children: [ Text("牡丹花的养护知识", style: TextStyle( - fontSize: 24, + fontSize: 24.sp, fontWeight: FontWeight.bold, color: Color(0xff1A1A1A))), SizedBox( - height: 20, + height: 20.h, ), Row( children: [ @@ -85,17 +86,17 @@ class _HotArticleDetailsPage extends State { child: Image.network( "https://t7.baidu.com/it/u=2841334870,333581502&fm=193&f=GIF", fit: BoxFit.cover, - width: 44, - height: 44, + width: 44.w, + height: 44.h, ), clipBehavior: Clip.hardEdge, ), SizedBox( - width: 8, + width: 8.w, ), Expanded( child: Container( - height: 60, + height: 60.h, child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, @@ -107,7 +108,7 @@ class _HotArticleDetailsPage extends State { text: "百花谷", style: TextStyle( fontWeight: FontWeight.bold, - fontSize: 14, + fontSize: 14.sp, color: Colors.black), ), ]), @@ -118,7 +119,7 @@ class _HotArticleDetailsPage extends State { overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: Color(0xff808080), ), ), @@ -130,31 +131,31 @@ class _HotArticleDetailsPage extends State { ], ), SizedBox( - height: 20, + height: 20.h, ), RichText( text: TextSpan( text: "文本,是指书面语言的表现形式,从文学角度说,通常是具有完整、系统含义(Message)的一个句子或多个句子的组合。" "一个文本可以是一个句子(Sentence)、一个段落(Paragraph)或者一个篇章(Discourse)。广义“文本”:" "任何由书写所固定下来的任何话语。(利科尔) 狭义“文本”:由语言文字组成的文学实体,代指“作品”,相对于作者、世界构成一个独立、自足的系统。", - style: TextStyle(color:Color(0xFF1A1A1A), fontSize: 16), + style: TextStyle(color:Color(0xFF1A1A1A), fontSize: 16.sp), )), SizedBox( - height: 16, + 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, + height: 170.h, ), SizedBox( - height: 16, + height: 16.h, ), RichText( text: TextSpan( text: "文本,是指书面语言的表现形式,从文学角度说,通常是具有完整、系统含义(Message)的一个句子或多个句子的组合。一个文本可以", - style: TextStyle(color:Color(0xFF1A1A1A), fontSize: 16), + style: TextStyle(color:Color(0xFF1A1A1A), fontSize: 16.sp), )), ], ), @@ -178,11 +179,11 @@ class _HotArticleDetailsPage extends State { children: [ Padding(padding: EdgeInsets.all(16),child:Text("评论 (58) 喜欢 (58)", style: TextStyle( - fontSize: 16, + fontSize: 16.sp, fontWeight: FontWeight.bold, color: Color(0xff1A1A1A))),), SizedBox( - height: 600, + height: 600.h, child: ListView.builder( itemCount: 6, scrollDirection: Axis.vertical, @@ -198,7 +199,7 @@ class _HotArticleDetailsPage extends State { ), ), SizedBox( - height: 12, + height: 12.h, ), Container( padding: EdgeInsets.all(16), @@ -236,7 +237,7 @@ class _HotArticleDetailsPage extends State { border: InputBorder.none, hintText: "留下您精彩的评论吧~", hintStyle: TextStyle( - fontSize: 14, + fontSize: 14.sp, color: Color(0xffCDCCCC), ), ), @@ -247,11 +248,11 @@ class _HotArticleDetailsPage extends State { ), ), Padding( - padding: EdgeInsets.only(left: 20, right: 20), + padding: EdgeInsets.only(left: 20.w, right: 20.w), child: Text( "发送", style: TextStyle( - fontSize: 16, + fontSize: 16.sp, fontWeight: FontWeight.bold, color: Color(0XFF1A1A1A)), ), @@ -323,17 +324,17 @@ class _HotArticleDetailsPage extends State { child: Image.network( "https://t7.baidu.com/it/u=2841334870,333581502&fm=193&f=GIF", fit: BoxFit.cover, - width: 40, - height: 40, + width: 40.w, + height: 40.h, ), clipBehavior: Clip.hardEdge, ), SizedBox( - width: 12, + width: 12.w, ), Expanded( child: Container( - height: 60, + height: 60.h, child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, @@ -344,7 +345,7 @@ class _HotArticleDetailsPage extends State { text: "张三", style: TextStyle( fontWeight: FontWeight.bold, - fontSize: 14, + fontSize: 14.sp, color: Colors.black), ), ]), @@ -355,7 +356,7 @@ class _HotArticleDetailsPage extends State { overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: Color(0xff808080), ), ), @@ -370,12 +371,12 @@ class _HotArticleDetailsPage extends State { children: [ Image.asset( "assets/image/icon_like.png", - width: 16, - height: 16, + width: 16.w, + height: 16.h, ), Text( "58", - style: TextStyle(fontSize: 12, color: Color(0xff1A1A1A)), + style: TextStyle(fontSize: 12.sp, color: Color(0xff1A1A1A)), ), ], ), @@ -386,30 +387,30 @@ class _HotArticleDetailsPage extends State { padding: EdgeInsets.only(left: 68,right: 16), child: Text( "文本,是指书面语言的表现形式,从文学角度说,通常是具有完整、系统含义(Mess…", - style: TextStyle(fontSize: 14, color: Color(0xff1A1A1A)), + style: TextStyle(fontSize: 14.sp, color: Color(0xff1A1A1A)), ), ), SizedBox( - height: 12, + height: 12.h, ), Container( width: double.infinity, - margin: EdgeInsets.only(left: 68,right: 16), + margin: EdgeInsets.only(left: 68.w,right: 16.w), decoration: new BoxDecoration( color: Color(0xffF2F2F2), borderRadius: BorderRadius.circular(2.0), ), child: Padding( - padding: EdgeInsets.only(left: 4, top: 4, bottom: 4), + padding: EdgeInsets.only(left: 4.w, top: 4.h, bottom: 4.h), child: Text( "文本,是指书面语言的表现形式文本,是指、", - style: TextStyle(fontSize: 12, color: Color(0xff808080)), + style: TextStyle(fontSize: 12.sp, color: Color(0xff808080)), ), ), ), if (position == 5) Container( - height: 63, + height: 63.h, decoration: BoxDecoration( color: Color(0xffF2F2F2), boxShadow: [ @@ -420,11 +421,11 @@ class _HotArticleDetailsPage extends State { spreadRadius: 0) ], ), - margin: EdgeInsets.only(top: 30), + margin: EdgeInsets.only(top: 30.h), alignment: Alignment.center, child: Text( "-已显示全部评论-", - style: TextStyle(fontSize: 14, color: Color(0xff353535)), + style: TextStyle(fontSize: 14.sp, color: Color(0xff353535)), ), ), ], diff --git a/lib/article/hot_article_item.dart b/lib/article/hot_article_item.dart index 51e42a86..f4e13155 100644 --- a/lib/article/hot_article_item.dart +++ b/lib/article/hot_article_item.dart @@ -11,6 +11,7 @@ import 'package:huixiang/view_widget/hot_item.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 HotArticlePage extends StatefulWidget { @override @@ -127,7 +128,7 @@ class _HotArticlePage extends State { return AspectRatio( aspectRatio: 2.47, child: Container( - height: 130, + height: 130.h, margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), child: HotArticleItem(article: articles[position]), ), diff --git a/lib/article/video_playback_page.dart b/lib/article/video_playback_page.dart index 4da3ae94..67e1fb09 100644 --- a/lib/article/video_playback_page.dart +++ b/lib/article/video_playback_page.dart @@ -2,6 +2,7 @@ import 'package:chewie/chewie.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:video_player/video_player.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; class VideoPlaybackPage extends StatefulWidget { @override @@ -62,13 +63,13 @@ class _VideoPlaybackPage extends State { Stack( children: [ Container( - height: 274, + height: 274.h, child: Chewie( controller: chewieController, ), ), Container( - margin: EdgeInsets.only(top: 40, left: 16, right: 16), + margin: EdgeInsets.only(top: 40.h, left: 16.w, right: 16.w), decoration: BoxDecoration( color: Colors.transparent, ), @@ -88,8 +89,8 @@ class _VideoPlaybackPage extends State { ), Image.asset( "assets/image/icon_share_w.png", - width: 24, - height: 24, + width: 24.w, + height: 24.h, ), ], ), @@ -97,7 +98,7 @@ class _VideoPlaybackPage extends State { ], ), Container( - margin: EdgeInsets.only(bottom: 20), + margin: EdgeInsets.only(bottom: 20.h), padding: EdgeInsets.all(16), decoration: BoxDecoration( color: Colors.white, @@ -120,17 +121,17 @@ class _VideoPlaybackPage extends State { child: Image.network( "https://t7.baidu.com/it/u=2841334870,333581502&fm=193&f=GIF", fit: BoxFit.cover, - width: 44, - height: 44, + width: 44.w, + height: 44.h, ), clipBehavior: Clip.hardEdge, ), SizedBox( - width: 8, + width: 8.w, ), Expanded( child: Container( - height: 60, + height: 60.h, child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, @@ -141,7 +142,7 @@ class _VideoPlaybackPage extends State { text: "百花谷", style: TextStyle( fontWeight: FontWeight.bold, - fontSize: 14, + fontSize: 14.sp, color: Colors.black), ), ]), @@ -157,7 +158,7 @@ class _VideoPlaybackPage extends State { overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: Color(0xff808080), ), ), @@ -166,7 +167,7 @@ class _VideoPlaybackPage extends State { overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: Color(0xff808080), ), ), @@ -180,11 +181,11 @@ class _VideoPlaybackPage extends State { ], ), SizedBox( - height: 20, + height: 20.h, ), Text("牡丹花的养护知识", style: TextStyle( - fontSize: 24, + fontSize: 24.sp, fontWeight: FontWeight.bold, color: Color(0xff1A1A1A))), ], @@ -211,12 +212,12 @@ class _VideoPlaybackPage extends State { padding: EdgeInsets.all(16), child: Text("评论 (58) 喜欢 (58)", style: TextStyle( - fontSize: 16, + fontSize: 16.sp, fontWeight: FontWeight.bold, color: Color(0xff1A1A1A))), ), SizedBox( - height: 500, + height: 500.h, child: ListView.builder( itemCount: 6, scrollDirection: Axis.vertical, @@ -231,7 +232,7 @@ class _VideoPlaybackPage extends State { ), ), SizedBox( - height: 12, + height: 12.h, ), Container( padding: EdgeInsets.all(16), @@ -269,7 +270,7 @@ class _VideoPlaybackPage extends State { border: InputBorder.none, hintText: "留下您精彩的评论吧~", hintStyle: TextStyle( - fontSize: 14, + fontSize: 14.sp, color: Color(0xffCDCCCC), ), ), @@ -280,11 +281,11 @@ class _VideoPlaybackPage extends State { ), ), Padding( - padding: EdgeInsets.only(left: 20, right: 20), + padding: EdgeInsets.only(left: 20.w, right: 20.w), child: Text( "发送", style: TextStyle( - fontSize: 16, + fontSize: 16.sp, fontWeight: FontWeight.bold, color: Color(0XFF1A1A1A)), ), @@ -314,13 +315,13 @@ class _VideoPlaybackPage extends State { child: Image.network( "https://t7.baidu.com/it/u=2841334870,333581502&fm=193&f=GIF", fit: BoxFit.cover, - width: 40, - height: 40, + width: 40.w, + height: 40.h, ), clipBehavior: Clip.hardEdge, ), SizedBox( - width: 12, + width: 12.w, ), Expanded( child: Container( @@ -335,7 +336,7 @@ class _VideoPlaybackPage extends State { text: "张三", style: TextStyle( fontWeight: FontWeight.bold, - fontSize: 14, + fontSize: 14.sp, color: Colors.black), ), ]), @@ -346,7 +347,7 @@ class _VideoPlaybackPage extends State { overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( - fontSize: 12, + fontSize: 12.sp, color: Color(0xff808080), ), ), @@ -361,13 +362,13 @@ class _VideoPlaybackPage extends State { children: [ Image.asset( "assets/image/icon_like.png", - width: 16, - height: 16, + width: 16.w, + height: 16.h, ), Text( "58", style: - TextStyle(fontSize: 12, color: Color(0xff1A1A1A)), + TextStyle(fontSize: 12.sp, color: Color(0xff1A1A1A)), ), ], ), @@ -376,33 +377,33 @@ class _VideoPlaybackPage extends State { ), ), Padding( - padding: EdgeInsets.only(left: 68, right: 16), + padding: EdgeInsets.only(left: 68.w, right: 16.w), child: Text( "文本,是指书面语言的表现形式,从文学角度说,通常是具有完整、系统含义(Mess…", - style: TextStyle(fontSize: 14, color: Color(0xff1A1A1A)), + style: TextStyle(fontSize: 14.sp, color: Color(0xff1A1A1A)), ), ), SizedBox( - height: 12, + height: 12.h, ), Container( width: double.infinity, - margin: EdgeInsets.only(left: 68, right: 16), + margin: EdgeInsets.only(left: 68.w, right: 16.w), decoration: new BoxDecoration( color: Color(0xffF2F2F2), borderRadius: BorderRadius.circular(2.0), ), child: Padding( - padding: EdgeInsets.only(left: 4, top: 4, bottom: 4), + padding: EdgeInsets.only(left: 4.w, top: 4.h, bottom: 4.h), child: Text( "文本,是指书面语言的表现形式文本,是指、", - style: TextStyle(fontSize: 12, color: Color(0xff808080)), + style: TextStyle(fontSize: 12.sp, color: Color(0xff808080)), ), ), ), if (position == 5) Container( - height: 63, + height: 63.h, decoration: BoxDecoration( color: Color(0xffF2F2F2), boxShadow: [ @@ -413,11 +414,11 @@ class _VideoPlaybackPage extends State { spreadRadius: 0) ], ), - margin: EdgeInsets.only(top: 30), + margin: EdgeInsets.only(top: 30.h), alignment: Alignment.center, child: Text( "-已显示全部评论-", - style: TextStyle(fontSize: 14, color: Color(0xff353535)), + style: TextStyle(fontSize: 14.sp, color: Color(0xff353535)), ), ), ], diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 8b23a50e..a7e415f1 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -224,6 +224,7 @@ class MessageLookup extends MessageLookupByLibrary { "lianxishoujihao" : MessageLookupByLibrary.simpleMessage("联系手机号"), "lianxuqiandaolingqushuangbeijifen" : MessageLookupByLibrary.simpleMessage("连续签到领取双倍积分"), "lijicanjia" : MessageLookupByLibrary.simpleMessage("立即参加"), + "lijichongzhi" : MessageLookupByLibrary.simpleMessage("立即充值"), "lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即签到"), "lingqu" : MessageLookupByLibrary.simpleMessage("领取"), "lingquanzhongxin" : MessageLookupByLibrary.simpleMessage("领券中心"), @@ -344,6 +345,7 @@ class MessageLookup extends MessageLookupByLibrary { "shouhuodizhi" : MessageLookupByLibrary.simpleMessage("收货地址"), "shoujihao" : MessageLookupByLibrary.simpleMessage("手机号"), "shouye" : MessageLookupByLibrary.simpleMessage("首页"), + "shuaxin" : MessageLookupByLibrary.simpleMessage("刷新"), "shuaxinchenggong" : MessageLookupByLibrary.simpleMessage("刷新成功"), "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 3d5e298e..fb53fa1d 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -3795,6 +3795,26 @@ class S { ); } + /// `刷新` + String get shuaxin { + return Intl.message( + '刷新', + name: 'shuaxin', + desc: '', + args: [], + ); + } + + /// `立即充值` + String get lijichongzhi { + return Intl.message( + '立即充值', + name: 'lijichongzhi', + desc: '', + args: [], + ); + } + /// `并使用本机号码登录` String get privacy_policy4 { return Intl.message( diff --git a/lib/home/founder_story_page.dart b/lib/home/founder_story_page.dart index 4f2986b0..8dbcf9da 100644 --- a/lib/home/founder_story_page.dart +++ b/lib/home/founder_story_page.dart @@ -56,7 +56,7 @@ class _FounderStoryPage extends State { children: [ Container( // margin: EdgeInsets.only(bottom: 20), - padding: EdgeInsets.only(left: 32, right: 32, top: 24), + padding: EdgeInsets.only(left: 32.w, right: 32.w, top: 24.h), decoration: BoxDecoration( color: Colors.white, boxShadow: [ @@ -80,9 +80,9 @@ class _FounderStoryPage extends State { ), Text("关于创始人", style: - TextStyle(fontSize: 24, color: Color(0xff565656))), + TextStyle(fontSize: 24.sp, color: Color(0xff565656))), SizedBox( - height: 18, + height: 18.h, ), Container( width: double.infinity, @@ -100,13 +100,13 @@ class _FounderStoryPage extends State { height: 1.5), )), Padding( - padding: EdgeInsets.only(top: 50), + padding: EdgeInsets.only(top: 50.h), child: Align( alignment: Alignment.bottomRight, child: Image.asset( "assets/image/icon_story_1.png", - width: 222, - height: 52, + width: 222.w, + height: 52.h, ), ), ), @@ -114,7 +114,7 @@ class _FounderStoryPage extends State { ), ), SizedBox( - height: 16, + height: 16.h, ), RichText( text: TextSpan( @@ -122,34 +122,34 @@ class _FounderStoryPage extends State { "2018年在台湾生活了五十七年的李旭清女士决定回到父亲的家乡湖北寻根。在这里为了延续台湾回乡的经验,李姐在湖北武汉创立了,与此同行的还有李姐的两个女儿。" "为了推广更多的好食物,让更多的人参与到环境保护中,一心回乡遇到了知音,在大力支持下,“海峡姐妹餐饮诞生了!", style: TextStyle( - color: Color(0xFF1A1A1A), fontSize: 12, height: 1.5), + color: Color(0xFF1A1A1A), fontSize: 12.sp, height: 1.5.h), )), Image.asset( "assets/image/icon_story_2.png", alignment: Alignment.centerRight, ), SizedBox( - height: 16, + height: 16.h, ), Image.asset( "assets/image/laoban.png", fit: BoxFit.cover, width: double.infinity, - height: 228, + height: 228.h, ), SizedBox( - height: 50, + height: 50.h, ), Image.asset( "assets/image/icon_story_bj.png", alignment: Alignment.center, ), SizedBox( - height: 16, + height: 16.h, ), Text("回乡之路", style: - TextStyle(fontSize: 24, color: Color(0xff565656))), + TextStyle(fontSize: 24.sp, color: Color(0xff565656))), SizedBox( height: 20, ), @@ -161,10 +161,10 @@ class _FounderStoryPage extends State { _textWidget( "2005年,不忍农村凋零、土地被农药化肥毒化,带领年轻伙伴回乡购地,成立「回乡有机生活农场」,实践自然生态农耕,以复育生态、改良土壤为目的,创造一个与万物和谐共生的农耕模式。"), Padding( - padding: EdgeInsets.only(bottom: 20, left: 18), + padding: EdgeInsets.only(bottom: 20.h, left: 18.w), child: Text("…", style: TextStyle( - fontSize: 16, color: Color(0xff565656))), + fontSize: 16.sp, color: Color(0xff565656))), ), _textWidget("2019年,在武汉成立湖北海峡姐妹餐饮有限公司。" "成为百年川椒火锅(光谷店)运营方,通过“素食煮义”和“蔬食之力”推广有机永续美好生活," @@ -178,38 +178,38 @@ class _FounderStoryPage extends State { alignment: Alignment.center, ), SizedBox( - height: 16, + height: 16.h, ), Text("早期团队", style: - TextStyle(fontSize: 24, color: Color(0xff565656))), + TextStyle(fontSize: 24.sp, color: Color(0xff565656))), SizedBox( - height: 26, + height: 26.h, ), Image.asset( "assets/image/icon_story_td.png", fit: BoxFit.cover, width: double.infinity, - height: 228, + height: 228.h, ), SizedBox( - height: 24, + height: 24.h, ), Padding( padding: EdgeInsets.only( - top: 10, + top: 10.h, ), child: MySeparator( - width: 5, - height: 2, + width: 5.w, + height: 2.h, color: Color(0xFF32A060), ), ), SizedBox( - height: 17, + height: 17.h, ), Container( - margin: EdgeInsets.only(bottom: 20), + margin: EdgeInsets.only(bottom: 20.h), padding: EdgeInsets.all(12), decoration: BoxDecoration( color: Color(0xff32A060), @@ -227,27 +227,27 @@ class _FounderStoryPage extends State { "回乡有机团队(早期照片),当年,他们也都是企业高管、IT精英、大学毕业生。日出而作,日落而息,结婚生子," "子女们一起玩耍,上学读书。转眼间,孩子们都已长大,有些大学毕业后也加入了“回乡”。", style: TextStyle( - color: Colors.white, fontSize: 12, height: 1.5), + color: Colors.white, fontSize: 12.sp, height: 1.5.h), )), ), Padding( padding: EdgeInsets.only( - top: 10, + top: 10.h, ), child: MySeparator( - width: 5, - height: 2, + width: 5.w, + height: 2.h, color: Color(0xFF32A060), ), ), SizedBox( - height: 27, + height: 27.h, ), Text("传递理念", style: - TextStyle(fontSize: 24, color: Color(0xff565656))), + TextStyle(fontSize: 24.sp, color: Color(0xff565656))), SizedBox( - height: 20, + height: 20.h, ), Row( children: [ @@ -260,7 +260,7 @@ class _FounderStoryPage extends State { ], ), SizedBox( - height: 20, + height: 20.h, ), Row( children: [ @@ -273,7 +273,7 @@ class _FounderStoryPage extends State { ], ), SizedBox( - height: 42, + height: 42.h, ), ], ), @@ -389,21 +389,21 @@ class _FounderStoryPage extends State { Widget _textWidget(var text) { return Padding( - padding: EdgeInsets.only(bottom: 20), + padding: EdgeInsets.only(bottom: 20.h), child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "●", - style: TextStyle(fontSize: 10, color: Color(0xff32A060)), + style: TextStyle(fontSize: 10.sp, color: Color(0xff32A060)), ), SizedBox( - width: 5, + width: 5.w, ), Expanded( child: Text(text, - style: TextStyle(fontSize: 12, color: Colors.black))), + style: TextStyle(fontSize: 12.sp, color: Colors.black))), ], ), ); @@ -416,8 +416,8 @@ class _FounderStoryPage extends State { alignment: Alignment.center, children: [ Container( - width: 63, - height: 63, + width: 63.w, + height: 63.h, child:Stack( alignment: Alignment.center, children: [ @@ -429,7 +429,7 @@ class _FounderStoryPage extends State { ), ), Text(text,style:TextStyle( - fontSize: 18, + fontSize: 18.sp, fontWeight: FontWeight.w300, color: Colors.white) ,) ], @@ -449,11 +449,11 @@ class _FounderStoryPage extends State { // ), ), Container( - width: 73, - height: 73, + width: 73.w, + height: 73.h, child: CustomPaint( painter: MyPainter( - lineColor: Color(0xff32A060), width: 2, isDividerRound: true), + lineColor: Color(0xff32A060), width: 2.w, isDividerRound: true), ), ) ], diff --git a/lib/home/guide_page.dart b/lib/home/guide_page.dart index 50b8ab38..54411d92 100644 --- a/lib/home/guide_page.dart +++ b/lib/home/guide_page.dart @@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/view_widget/border_text.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; class GuidePage extends StatefulWidget { @override @@ -11,7 +12,6 @@ class GuidePage extends StatefulWidget { } class _GuidePage extends State { - @override Widget build(BuildContext context) { return Scaffold( @@ -35,7 +35,7 @@ class _GuidePage extends State { color: Colors.white, child: Center( child: Container( - margin: EdgeInsets.only(top: 120, left: 19, right: 19), + margin: EdgeInsets.only(top: 120.h, left: 19.w, right: 19.w), child: Stack( children: [ Column( @@ -48,29 +48,29 @@ class _GuidePage extends State { ), ), SizedBox( - height: 66, + height: 66.h, ), Padding( - padding: EdgeInsets.only(left: 37, right: 37), + padding: EdgeInsets.only(left: 37.w, right: 37.w), child: Text( "会员最新资讯抢先看", style: TextStyle( - fontSize: 24, + fontSize: 24.sp, fontWeight: FontWeight.bold, color: Color(0XFF32A060)), ), ), SizedBox( - height: 23, + height: 23.h, ), Padding( - padding: EdgeInsets.only(left: 19, right: 19), + padding: EdgeInsets.only(left: 19.w, right: 19.w), child: Text( "新增多项功能,海量优惠资讯实时推送", textAlign: TextAlign.center, style: TextStyle( - fontSize: 16, - height:1.5, + fontSize: 16.sp, + height: 1.5.h, fontWeight: FontWeight.w600, color: Color(0XFF727272)), ), @@ -88,23 +88,23 @@ class _GuidePage extends State { style: TextStyle(fontSize: 8, color: Colors.black), ), SizedBox( - width: 10, + width: 10.w, ), Text( "●", style: TextStyle( - fontSize: 8, color: Color(0xffB2B2B2)), + fontSize: 8.sp, color: Color(0xffB2B2B2)), ), SizedBox( - width: 10, + width: 10.w, ), Text( "●", style: TextStyle( - fontSize: 8, color: Color(0xffB2B2B2)), + fontSize: 8.sp, color: Color(0xffB2B2B2)), ), SizedBox( - height: 98, + height: 108.h, ), ], ), @@ -119,7 +119,7 @@ class _GuidePage extends State { color: Colors.white, child: Center( child: Container( - margin: EdgeInsets.only(top: 120, left: 19, right: 19), + margin: EdgeInsets.only(top: 120.h, left: 19.w, right: 19.w), child: Stack( children: [ Column( @@ -132,29 +132,29 @@ class _GuidePage extends State { ), ), SizedBox( - height: 66, + height: 66.h, ), Padding( - padding: EdgeInsets.only(left: 37, right: 37), + padding: EdgeInsets.only(left: 37.w, right: 37.w), child: Text( "全新集团联盟店会员点餐", style: TextStyle( - fontSize: 24, + fontSize: 24.sp, fontWeight: FontWeight.bold, color: Color(0XFF32A060)), ), ), SizedBox( - height: 23, + height: 23.h, ), Padding( - padding: EdgeInsets.only(left: 19, right: 19), + padding: EdgeInsets.only(left: 19.w, right: 19.w), child: Text( "新增多项功能,使用平台钱包优惠多多,更有充值优惠享不停", textAlign: TextAlign.center, style: TextStyle( - fontSize: 16, - height:1.5, + fontSize: 16.sp, + height: 1.5.h, fontWeight: FontWeight.w600, color: Color(0XFF727272)), ), @@ -170,17 +170,18 @@ class _GuidePage extends State { Text( "●", style: TextStyle( - fontSize: 8, color: Color(0xffB2B2B2)), + fontSize: 8.sp, color: Color(0xffB2B2B2)), ), SizedBox( - width: 10, + width: 10.w, ), Text( "●", - style: TextStyle(fontSize: 8, color: Colors.black), + style: + TextStyle(fontSize: 8.sp, color: Colors.black), ), SizedBox( - width: 10, + width: 10.w, ), Text( "●", @@ -188,7 +189,7 @@ class _GuidePage extends State { fontSize: 8, color: Color(0xffB2B2B2)), ), SizedBox( - height: 98, + height: 108.h, ), ], ), @@ -203,7 +204,7 @@ class _GuidePage extends State { color: Colors.white, child: Center( child: Container( - margin: EdgeInsets.only(top: 120, left: 19, right: 19), + margin: EdgeInsets.only(top: 120.h, left: 19.w, right: 19.w), child: Stack( children: [ Column( @@ -219,11 +220,11 @@ class _GuidePage extends State { height: 66, ), Padding( - padding: EdgeInsets.only(left: 37, right: 37), + padding: EdgeInsets.only(left: 37.w, right: 37.w), child: Text( "会员活动专区", style: TextStyle( - fontSize: 24, + fontSize: 24.sp, fontWeight: FontWeight.bold, color: Color(0XFF32A060)), ), @@ -232,13 +233,13 @@ class _GuidePage extends State { height: 23, ), Padding( - padding: EdgeInsets.only(left: 19, right: 19), + padding: EdgeInsets.only(left: 19.w, right: 19.w), child: Text( "新增会员任务得积分,消费可得绿金、积分商城换购", textAlign: TextAlign.center, style: TextStyle( - fontSize: 16, - height:1.5, + fontSize: 16.sp, + height: 1.5.h, fontWeight: FontWeight.w600, color: Color(0XFF727272)), ), @@ -254,25 +255,26 @@ class _GuidePage extends State { Text( "●", style: TextStyle( - fontSize: 8, color: Color(0xffB2B2B2)), + fontSize: 8.sp, color: Color(0xffB2B2B2)), ), SizedBox( - width: 10, + width: 10.w, ), Text( "●", style: TextStyle( - fontSize: 8, color: Color(0xffB2B2B2)), + fontSize: 8.sp, color: Color(0xffB2B2B2)), ), SizedBox( - width: 10, + width: 10.w, ), Text( "●", - style: TextStyle(fontSize: 8, color: Colors.black), + style: + TextStyle(fontSize: 8.sp, color: Colors.black), ), SizedBox( - height: 98, + height: 108.h, ), ], ), @@ -287,66 +289,70 @@ class _GuidePage extends State { color: Colors.white, child: Center( child: Container( - margin: EdgeInsets.only(top: 108), - child: + child: Stack( + children: [ Column( children: [ - Image.asset( - "assets/image/icon_guide_4.png", - width: double.infinity, - fit: BoxFit.fill, - ), + Image.asset( + "assets/image/icon_guide_4.png", + width: double.infinity, + fit: BoxFit.fill, + ), SizedBox( - height: 66, + height: 66.h, ), Padding( - padding: EdgeInsets.only(left: 104, right: 104), + padding: EdgeInsets.only(left: 104.w, right: 104.w), child: Text( "会员活动专区", style: TextStyle( - fontSize: 24, + fontSize: 24.sp, fontWeight: FontWeight.bold, color: Color(0XFF32A060)), ), ), SizedBox( - height: 23, + height: 23.h, ), Padding( - padding: EdgeInsets.only(left: 52, right: 52), + padding: EdgeInsets.only(left: 52.w, right: 52.w), child: Text( "传递友爱纯净健康有机环保智慧理念", textAlign: TextAlign.center, style: TextStyle( - fontSize: 16, - height:1.5, + fontSize: 16.sp, + height: 1.5.h, fontWeight: FontWeight.w600, color: Color(0XFF727272)), ), ), - SizedBox( - height: 50, - ), - GestureDetector( - onTap: (){ - toNext(); - }, - child:Container( - margin: EdgeInsets.only(left: 71,right: 71), - alignment: Alignment.bottomCenter, - child:BorderText( - padding: EdgeInsets.all(11), - text: "立即体验", - fontSize: 20, - textColor: Color(0xFF32A060), - borderColor: Color(0xFF32A060), - borderWidth: 1, - radius: 26.5, - ), + ], + ), + Align( + alignment: Alignment.bottomCenter, + child: GestureDetector( + onTap: () { + toNext(); + }, + child: Container( + height: 50.h, + margin: EdgeInsets.only( + left: 71.w, right: 71.w, bottom: 55.h), + alignment: Alignment.bottomCenter, + child: BorderText( + padding: EdgeInsets.all(11), + text: "立即体验", + fontSize: 20.sp, + textColor: Color(0xFF32A060), + borderColor: Color(0xFF32A060), + borderWidth: 1.w, + radius: 26.5, ), ), - ], + ), ), + ], + ), ), ), ) @@ -366,5 +372,4 @@ class _GuidePage extends State { } }); } - } diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index 29969e3f..8e6f58f5 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -222,7 +222,8 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { ), brands(), Container( - margin: EdgeInsets.only(left: 16.5.w, right: 16.5.w, bottom: 40.h), + margin: + EdgeInsets.only(left: 16.5.w, right: 16.5.w, bottom: 40.h), padding: EdgeInsets.only(bottom: 10.h), decoration: BoxDecoration( borderRadius: BorderRadius.all( @@ -468,7 +469,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { fadeSrc: "assets/image/default_1.png", ), SizedBox( - height: 4, + height: 4.h, ), Container( margin: EdgeInsets.only(left: 8, right: 8), @@ -477,7 +478,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( - height: 14, + height: 14.h, ), Row( children: [ @@ -549,7 +550,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { Image.asset( "assets/image/icon_calendar_today_sharp.png", width: 20, - height: 20, + height: 20.h, ), SizedBox( width: 8, diff --git a/lib/home/huixiang_brand_page.dart b/lib/home/huixiang_brand_page.dart index 5a2f1b7f..e29c60ad 100644 --- a/lib/home/huixiang_brand_page.dart +++ b/lib/home/huixiang_brand_page.dart @@ -293,7 +293,7 @@ class _BrandPage extends State ), ), SizedBox( - height: 40, + height: 40.h, ), InkWell( onTap: () { @@ -309,7 +309,7 @@ class _BrandPage extends State ), ), SizedBox( - height: 20, + height: 20.h, ), InkWell( onTap: () { @@ -325,7 +325,7 @@ class _BrandPage extends State ), ), SizedBox( - height: 40, + height: 40.h, ), Text( S.of(context).linian, @@ -336,7 +336,7 @@ class _BrandPage extends State ), ), SizedBox( - height: 20, + height: 20.h, ), InkWell( onTap: () { @@ -352,7 +352,7 @@ class _BrandPage extends State ], ), SizedBox( - height: 18, + height: 18.h, ), Row( children: [ @@ -387,7 +387,7 @@ class _BrandPage extends State children: [ Container( width: 63, - height: 63, + height: 63.h, child: Stack( alignment: Alignment.center, children: [ @@ -422,7 +422,7 @@ class _BrandPage extends State ), Container( width: 73, - height: 73, + height: 73.h, child: CustomPaint( painter: MyPainter( lineColor: Color(0xff32A060), width: 2, isDividerRound: true), @@ -476,7 +476,7 @@ class _BrandPage extends State /// contentType 跳转类型(0:不跳转,1:积分商品,2:活动,3:文章) bannerClick(BannerData bannerData) async { - switch(bannerData.contentType) { + switch (bannerData.contentType) { case 1: Navigator.of(context).pushNamed('/router/integral_store_page', arguments: {"goodsId": bannerData.content}); diff --git a/lib/home/main_home_page.dart b/lib/home/main_home_page.dart index 24468e02..a2b802b5 100644 --- a/lib/home/main_home_page.dart +++ b/lib/home/main_home_page.dart @@ -28,11 +28,15 @@ class _MainHomePage extends State tabcontroller.addListener(() => () {}); //NoDataView(), - _widgetOptions = [HomePage((){ - setState(() { - tabcontroller.index = 2; - }); - }), ActivityListPage(), PointsMallPage()]; + _widgetOptions = [ + HomePage(() { + setState(() { + tabcontroller.index = 2; + }); + }), + ActivityListPage(), + PointsMallPage() + ]; eventBus.on().listen((event) { print("object: MainHomePage"); @@ -52,7 +56,7 @@ class _MainHomePage extends State backgroundColor: Color(0xFFFAFAFA), elevation: 0, toolbarOpacity: 0, - toolbarHeight: 50, + toolbarHeight: 50.h, automaticallyImplyLeading: false, actions: [ Container( @@ -64,7 +68,7 @@ class _MainHomePage extends State child: Image.asset( "assets/image/icon_notices.png", width: 24, - height: 24, + height: 24.h, ), ), ) diff --git a/lib/home/points_mall_page.dart b/lib/home/points_mall_page.dart index b8ea20cc..7d5012ed 100644 --- a/lib/home/points_mall_page.dart +++ b/lib/home/points_mall_page.dart @@ -38,8 +38,8 @@ class _PointsMallPage extends State var _itemText = S.current.morenpaixu; ApiService client; - RefreshController _refreshController = - RefreshController(initialRefresh: false, initialLoadStatus: LoadStatus.canLoading); + RefreshController _refreshController = RefreshController( + initialRefresh: false, initialLoadStatus: LoadStatus.canLoading); List sortString = [ S.current.morenpaixu, // S.current.duihuanlianggaodaodi, @@ -239,7 +239,8 @@ class _PointsMallPage extends State //垂直子Widget之间间距 mainAxisSpacing: 16.w, //子Widget宽高比例 0.59 - childAspectRatio: 166.w / (281.h / 2 + (281.h / 2) * AppUtils.textScale(context)), + childAspectRatio: 166.w / + (281.h / 2 + (281.h / 2) * AppUtils.textScale(context)), ), itemBuilder: (contetx, index) { return GestureDetector( @@ -328,7 +329,11 @@ class _PointsMallPage extends State ), Expanded( child: Container( - margin: EdgeInsets.only(left: 12.w, right: 12.w, top: 10.h,), + margin: EdgeInsets.only( + left: 12.w, + right: 12.w, + top: 10.h, + ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, @@ -441,7 +446,7 @@ class _PointsMallPage extends State MImage( userinfo != null ? userinfo.headimg : "", width: 50, - height: 50, + height: 50.h, radius: BorderRadius.all(Radius.circular(2)), fit: BoxFit.cover, errorSrc: "assets/image/default_1.png", @@ -469,7 +474,7 @@ class _PointsMallPage extends State Image.asset( "assets/image/icon_an_crown.png", width: 14, - height: 14, + height: 14.h, ), SizedBox( width: 5, diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 9988653e..d2d3c8f6 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -393,6 +393,8 @@ "jifenbuzu": "您的积分不足", "haowu": "好物", "huixiangtoutiao": "回乡头条", + "shuaxin": "刷新", + "lijichongzhi": "立即充值", diff --git a/lib/login/login_page.dart b/lib/login/login_page.dart index b0761c5e..b1c5a8ea 100644 --- a/lib/login/login_page.dart +++ b/lib/login/login_page.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; import 'dart:ui'; - import 'package:flutter/gestures.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/main.dart'; @@ -17,7 +16,7 @@ import 'package:flutter/services.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:dio/dio.dart'; -import 'package:photo_view/photo_view.dart'; +// import 'package:photo_view/photo_view.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; @@ -394,11 +393,11 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { child: Stack( alignment: Alignment.center, children: [ - PhotoView( - imageProvider: AssetImage("assets/image/laoban.png"), - initialScale: Platform.isAndroid ? 1.02 : 1.2, - basePosition: alignmentProgress, - ), + // PhotoView( + // imageProvider: AssetImage("assets/image/laoban.png"), + // initialScale: Platform.isAndroid ? 1.02 : 1.2, + // basePosition: alignmentProgress, + // ), Positioned( top: 54.h, left: 28.w, diff --git a/lib/mine/mine_wallet_page.dart b/lib/mine/mine_wallet_page.dart index bb50e89a..fe804257 100644 --- a/lib/mine/mine_wallet_page.dart +++ b/lib/mine/mine_wallet_page.dart @@ -149,7 +149,7 @@ class _MineWalletPage extends State { child: Column( children: [ balance(), - rechargeWithdrawal(), + // rechargeWithdrawal(), balanceHistory(), ], ), @@ -189,25 +189,25 @@ class _MineWalletPage extends State { SizedBox( height: 16.h, ), - // Row( - // children: [ - // Container( - // width: 3, - // height: 15, - // color: Color(0xFF20662A), - // ), - // SizedBox( - // width: 3, - // ), - // Text( - // "09/2021", - // style: TextStyle( - // color: Color(0xFF353535), - // fontSize: 14, - // ), - // ), - // ], - // ), + Row( + children: [ + Container( + width: 3.w, + height: 15.h, + color: Color(0xFF20662A), + ), + SizedBox( + width: 3.w, + ), + Text( + "07/2021", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 14.sp, + ), + ), + ], + ), Container( margin: EdgeInsets.only(top: 14.h), child: ListView.builder( @@ -314,13 +314,43 @@ class _MineWalletPage extends State { ), child: Column( children: [ - Text( - S.of(context).zhanghuyue, - style: TextStyle( - fontWeight: FontWeight.bold, - color: Color(0xFF353535), - fontSize: 16.sp, - ), + Stack( + alignment: Alignment.center, + children: [ + Align( + alignment: Alignment.center, + child: Text( + S.of(context).zhanghuyue, + style: TextStyle( + fontWeight: FontWeight.bold, + color: Color(0xFF353535), + fontSize: 16.sp, + ), + ), + ), + GestureDetector( + onTap: () { + queryUserBalance(); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Icon( + Icons.refresh, + size: 20, + color: Color(0xFF8A8A8A), + ), + Text( + S.of(context).shuaxin, + style: TextStyle( + color: Color(0xFF353535), + fontSize: 12.sp, + ), + ) + ], + ), + ), + ], ), SizedBox( height: 16.h, @@ -348,19 +378,18 @@ class _MineWalletPage extends State { ), InkWell( onTap: () { - queryUserBalance(); + toRecharge(); }, child: RoundButton( - icons: Icon( - Icons.refresh, - color: Colors.white, - ), - text: S.of(context).shuaxinyue, + width: 103.w, + height: 30.h, + text: S.of(context).lijichongzhi, textColor: Colors.white, + fontWeight: FontWeight.bold, radius: 15, - backgroup: Color(0xFF20662A), - fontSize: 12.sp, - padding: EdgeInsets.fromLTRB(12.w, 4.h, 12.w, 4.h), + backgroup: Color(0xFF32A060), + fontSize: 14.sp, + padding: EdgeInsets.fromLTRB(24.w, 5.h, 24.w, 5.h), ), ), ], @@ -373,88 +402,89 @@ class _MineWalletPage extends State { loadBillInfo(); } - Widget rechargeWithdrawal() { - return Row( - children: [ - Expanded( - child: InkWell( - onTap: () { - toRecharge(); - }, - child: Container( - margin: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), - padding: EdgeInsets.fromLTRB(0, 7.h, 0, 7.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, - ) - ]), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - "assets/image/icon_wallet_recharge.png", - width: 40.w, - height: 40.h, - ), - Text( - S.of(context).chongzhi, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 16.sp, - color: Colors.black, - ), - ) - ], - ), - ), - ), - flex: 1, - ), - Expanded( - child: Container( - margin: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), - padding: EdgeInsets.fromLTRB(0, 7.h, 0, 7.h), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all(Radius.circular(8)), - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0) - ]), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - "assets/image/icon_wallet_withdrawal.png", - width: 40.w, - height: 40.w, - ), - Text( - S.of(context).tixian, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 16.sp, - color: Colors.black, - ), - ) - ], - ), - ), - flex: 1, - ), - ], - ); - } +//充值/提现 +// Widget rechargeWithdrawal() { +// return Row( +// children: [ +// Expanded( +// child: InkWell( +// onTap: () { +// toRecharge(); +// }, +// child: Container( +// margin: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), +// padding: EdgeInsets.fromLTRB(0, 7.h, 0, 7.h), +// decoration: BoxDecoration( +// color: Colors.white, +// borderRadius: BorderRadius.circular(8), +// boxShadow: [ +// BoxShadow( +// color: Colors.black.withAlpha(12), +// offset: Offset(0, 3), +// blurRadius: 14, +// spreadRadius: 0, +// ) +// ]), +// child: Row( +// mainAxisAlignment: MainAxisAlignment.center, +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// Image.asset( +// "assets/image/icon_wallet_recharge.png", +// width: 40.w, +// height: 40.h, +// ), +// Text( +// S.of(context).chongzhi, +// style: TextStyle( +// fontWeight: FontWeight.bold, +// fontSize: 16.sp, +// color: Colors.black, +// ), +// ) +// ], +// ), +// ), +// ), +// flex: 1, +// ), +// Expanded( +// child: Container( +// margin: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), +// padding: EdgeInsets.fromLTRB(0, 7.h, 0, 7.h), +// decoration: BoxDecoration( +// color: Colors.white, +// borderRadius: BorderRadius.all(Radius.circular(8)), +// boxShadow: [ +// BoxShadow( +// color: Colors.black.withAlpha(12), +// offset: Offset(0, 3), +// blurRadius: 14, +// spreadRadius: 0) +// ]), +// child: Row( +// mainAxisAlignment: MainAxisAlignment.center, +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// Image.asset( +// "assets/image/icon_wallet_withdrawal.png", +// width: 40.w, +// height: 40.w, +// ), +// Text( +// S.of(context).tixian, +// style: TextStyle( +// fontWeight: FontWeight.bold, +// fontSize: 16.sp, +// color: Colors.black, +// ), +// ) +// ], +// ), +// ), +// flex: 1, +// ), +// ], +// ); +// } } diff --git a/pubspec.lock b/pubspec.lock index 359b99d3..2bf3bc3c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -56,7 +56,7 @@ packages: name: async url: "https://pub.flutter-io.cn" source: hosted - version: "2.5.0" + version: "2.6.1" barcode: dependency: transitive description: @@ -637,13 +637,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "4.1.0" - photo_view: - dependency: "direct main" - description: - name: photo_view - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.11.1" platform: dependency: transitive description: @@ -872,7 +865,7 @@ packages: name: test_api url: "https://pub.flutter-io.cn" source: hosted - version: "0.2.19" + version: "0.3.0" timing: dependency: transitive description: @@ -993,7 +986,7 @@ packages: name: win32 url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.5" + version: "2.2.5" xdg_directories: dependency: transitive description: @@ -1016,5 +1009,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.13.0 <3.0.0" flutter: ">=2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 3940f6ba..99fe6413 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -85,7 +85,7 @@ dependencies: cached_network_image: ^2.0.0 flutter_html: ^1.3.0 #2.1.0 - photo_view: ^0.11.1 +# photo_view: ^0.11.1 chewie: ^0.12.2 video_player: ^1.0.1 From 5c09dc46426a5ffb643fccc3e6e9fcd9b523cf18 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Thu, 29 Jul 2021 15:32:03 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=83=A8=E5=88=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/l10n/intl_zh_CN.arb | 2 ++ lib/l10n/intl_zh_Hans_CN.arb | 3 ++- lib/l10n/intl_zh_Hant_CN.arb | 2 ++ lib/l10n/intl_zh_TW.arb | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index 89a2d283..08dec15b 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -394,6 +394,8 @@ "jifenbuzu": "您的积分不足", "haowu": "好物", "huixiangtoutiao": "回乡头条", + "shuaxin": "刷新", + "lijichongzhi": "立即充值", diff --git a/lib/l10n/intl_zh_Hans_CN.arb b/lib/l10n/intl_zh_Hans_CN.arb index 3d1b41a6..e4f6bb4c 100644 --- a/lib/l10n/intl_zh_Hans_CN.arb +++ b/lib/l10n/intl_zh_Hans_CN.arb @@ -392,9 +392,10 @@ "bangong": "办公", "fenxiangdao": "分享到", "jifenbuzu": "您的积分不足", - "haowu": "好物", "huixiangtoutiao": "回乡头条", + "shuaxin": "刷新", + "lijichongzhi": "立即充值", diff --git a/lib/l10n/intl_zh_Hant_CN.arb b/lib/l10n/intl_zh_Hant_CN.arb index 77394321..6b00946b 100644 --- a/lib/l10n/intl_zh_Hant_CN.arb +++ b/lib/l10n/intl_zh_Hant_CN.arb @@ -386,6 +386,8 @@ "jifenbuzu": "您的積分不足", "haowu": "好物", "huixiangtoutiao": "回鄉頭條", + "shuaxin": "刷新", + "lijichongzhi": "立即充值", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index 77394321..6b00946b 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -386,6 +386,8 @@ "jifenbuzu": "您的積分不足", "haowu": "好物", "huixiangtoutiao": "回鄉頭條", + "shuaxin": "刷新", + "lijichongzhi": "立即充值", From 86ac4c958d3d1ee3ce8e3430ddca28c8d113e79b Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Thu, 29 Jul 2021 16:16:18 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=83=A8=E5=88=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/generated/intl/messages_zh_CN.dart | 2 ++ lib/generated/intl/messages_zh_Hans_CN.dart | 2 ++ lib/generated/intl/messages_zh_Hant_CN.dart | 2 ++ lib/generated/intl/messages_zh_TW.dart | 2 ++ lib/home/points_mall_page.dart | 3 ++- 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index bec66f88..00c9db44 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -223,6 +223,7 @@ class MessageLookup extends MessageLookupByLibrary { "lianxishoujihao" : MessageLookupByLibrary.simpleMessage("联系手机号"), "lianxuqiandaolingqushuangbeijifen" : MessageLookupByLibrary.simpleMessage("连续签到领取双倍积分"), "lijicanjia" : MessageLookupByLibrary.simpleMessage("立即参加"), + "lijichongzhi" : MessageLookupByLibrary.simpleMessage("立即充值"), "lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即签到"), "lingqu" : MessageLookupByLibrary.simpleMessage("领取"), "lingquanzhongxin" : MessageLookupByLibrary.simpleMessage("领券中心"), @@ -343,6 +344,7 @@ class MessageLookup extends MessageLookupByLibrary { "shouhuodizhi" : MessageLookupByLibrary.simpleMessage("收货地址"), "shoujihao" : MessageLookupByLibrary.simpleMessage("手机号"), "shouye" : MessageLookupByLibrary.simpleMessage("首页"), + "shuaxin" : MessageLookupByLibrary.simpleMessage("刷新"), "shuaxinchenggong" : MessageLookupByLibrary.simpleMessage("刷新成功"), "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart index cd09a76d..b2fdfde9 100644 --- a/lib/generated/intl/messages_zh_Hans_CN.dart +++ b/lib/generated/intl/messages_zh_Hans_CN.dart @@ -223,6 +223,7 @@ class MessageLookup extends MessageLookupByLibrary { "lianxishoujihao" : MessageLookupByLibrary.simpleMessage("联系手机号"), "lianxuqiandaolingqushuangbeijifen" : MessageLookupByLibrary.simpleMessage("连续签到领取双倍积分"), "lijicanjia" : MessageLookupByLibrary.simpleMessage("立即参加"), + "lijichongzhi" : MessageLookupByLibrary.simpleMessage("立即充值"), "lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即签到"), "lingqu" : MessageLookupByLibrary.simpleMessage("领取"), "lingquanzhongxin" : MessageLookupByLibrary.simpleMessage("领券中心"), @@ -343,6 +344,7 @@ class MessageLookup extends MessageLookupByLibrary { "shouhuodizhi" : MessageLookupByLibrary.simpleMessage("收货地址"), "shoujihao" : MessageLookupByLibrary.simpleMessage("手机号"), "shouye" : MessageLookupByLibrary.simpleMessage("首页"), + "shuaxin" : MessageLookupByLibrary.simpleMessage("刷新"), "shuaxinchenggong" : MessageLookupByLibrary.simpleMessage("刷新成功"), "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失败"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新余额"), diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart index 2edf6df6..4e5177c0 100644 --- a/lib/generated/intl/messages_zh_Hant_CN.dart +++ b/lib/generated/intl/messages_zh_Hant_CN.dart @@ -223,6 +223,7 @@ class MessageLookup extends MessageLookupByLibrary { "lianxishoujihao" : MessageLookupByLibrary.simpleMessage("聯繫手機號"), "lianxuqiandaolingqushuangbeijifen" : MessageLookupByLibrary.simpleMessage("連續簽到領取雙倍積分"), "lijicanjia" : MessageLookupByLibrary.simpleMessage("立即參加"), + "lijichongzhi" : MessageLookupByLibrary.simpleMessage("立即充值"), "lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即簽到"), "lingqu" : MessageLookupByLibrary.simpleMessage("領取"), "lingquanzhongxin" : MessageLookupByLibrary.simpleMessage("領券中心"), @@ -343,6 +344,7 @@ class MessageLookup extends MessageLookupByLibrary { "shouhuodizhi" : MessageLookupByLibrary.simpleMessage("收貨地址"), "shoujihao" : MessageLookupByLibrary.simpleMessage("手機號"), "shouye" : MessageLookupByLibrary.simpleMessage("首頁"), + "shuaxin" : MessageLookupByLibrary.simpleMessage("刷新"), "shuaxinchenggong" : MessageLookupByLibrary.simpleMessage("刷新成功"), "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失敗"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新餘額"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index f712df42..27161919 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -223,6 +223,7 @@ class MessageLookup extends MessageLookupByLibrary { "lianxishoujihao" : MessageLookupByLibrary.simpleMessage("聯繫手機號"), "lianxuqiandaolingqushuangbeijifen" : MessageLookupByLibrary.simpleMessage("連續簽到領取雙倍積分"), "lijicanjia" : MessageLookupByLibrary.simpleMessage("立即參加"), + "lijichongzhi" : MessageLookupByLibrary.simpleMessage("立即充值"), "lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即簽到"), "lingqu" : MessageLookupByLibrary.simpleMessage("領取"), "lingquanzhongxin" : MessageLookupByLibrary.simpleMessage("領券中心"), @@ -343,6 +344,7 @@ class MessageLookup extends MessageLookupByLibrary { "shouhuodizhi" : MessageLookupByLibrary.simpleMessage("收貨地址"), "shoujihao" : MessageLookupByLibrary.simpleMessage("手機號"), "shouye" : MessageLookupByLibrary.simpleMessage("首頁"), + "shuaxin" : MessageLookupByLibrary.simpleMessage("刷新"), "shuaxinchenggong" : MessageLookupByLibrary.simpleMessage("刷新成功"), "shuaxinshibai" : MessageLookupByLibrary.simpleMessage("刷新失敗"), "shuaxinyue" : MessageLookupByLibrary.simpleMessage("刷新餘額"), diff --git a/lib/home/points_mall_page.dart b/lib/home/points_mall_page.dart index 7d5012ed..dae81987 100644 --- a/lib/home/points_mall_page.dart +++ b/lib/home/points_mall_page.dart @@ -348,13 +348,14 @@ class _PointsMallPage extends State ), ), SizedBox( - height: 8.h, + height: 5.h, ), Container( height: 30.h * AppUtils.textScale(context), child: Text( goods.description, maxLines: 2, + overflow: TextOverflow.ellipsis, style: TextStyle( color: Color(0xFF727272), fontSize: 12.sp,