From 9cca002a8e818d34a94ea4ccb932bdcd2fc0fb38 Mon Sep 17 00:00:00 2001 From: ZCM <772112648@qq.com> Date: Mon, 23 Mar 2020 17:50:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug:=201.=E3=80=8A=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E4=BB=8B=E7=BB=8D=EF=BC=9A=E8=BE=93=E5=85=A5=E4=B8=80?= =?UTF-8?q?=E6=AE=B5=E8=AF=9D=EF=BC=8C=E6=8D=A2=E8=A1=8C=E5=90=8E=E5=9C=A8?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E4=B8=80=E6=AE=B5=E8=AF=9D=EF=BC=8C=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E4=B9=8B=E5=90=8E=E6=98=AF=E6=98=BE=E7=A4=BA=E4=BA=86?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AE=B5=EF=BC=8C=E7=AC=AC=E4=BA=8C=E6=AE=B5?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=98=BE=E7=A4=BA=E5=87=BA=E6=9D=A5=E3=80=8B?= =?UTF-8?q?=202.=E3=80=8A=E6=8B=89=E9=BB=91=EF=BC=9A1.=E5=9C=A8=E6=8B=89?= =?UTF-8?q?=E9=BB=91=E7=95=8C=E9=9D=A2=EF=BC=8C=E6=B2=A1=E6=9C=89=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=A4=87=E6=B3=A8=E5=90=8D=E3=80=822.=E6=8A=8A?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E4=B8=AD=E7=9A=84=E9=BB=91=E5=90=8D=E5=8D=95?= =?UTF-8?q?=E5=85=A8=E9=83=A8=E7=A7=BB=E9=99=A4=E5=90=8E=EF=BC=8C=E8=BF=99?= =?UTF-8?q?=E4=B8=AA=E7=95=8C=E9=9D=A2=E6=88=90=E7=A9=BA=E7=99=BD=E4=BA=86?= =?UTF-8?q?=E3=80=82=E6=B2=A1=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0=203.?= =?UTF-8?q?=E3=80=8A=E8=BF=9E=E9=BA=A6=EF=BC=9A=E5=90=8D=E5=AD=97=E5=A4=AA?= =?UTF-8?q?=E9=95=BF=E5=AF=BC=E8=87=B4XX=E9=82=80=E8=AF=B7=E4=BD=A0?= =?UTF-8?q?=E6=8E=A5=E5=90=AC=E7=94=B5=E8=AF=9D=E6=B2=A1=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BA=86=E3=80=8B=204.=E3=80=8A=E7=BE=A4-=E5=90=8D=E5=AD=97?= =?UTF-8?q?=EF=BC=9A=E5=AF=B9=E6=AF=94=E5=A4=B4=E5=83=8F=E5=B1=85=E4=B8=AD?= =?UTF-8?q?=E5=AF=B9=E9=BD=90=E4=B8=80=E4=B8=8B=E3=80=8B=205.=E3=80=8A?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A5=BD=E5=8F=8B=EF=BC=9A=E5=B7=B2=E7=BB=8F?= =?UTF-8?q?=E6=98=AF=E5=A5=BD=E5=8F=8B=E4=BA=86=E3=80=82=E7=82=B9=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E8=BF=98=E6=98=BE=E7=A4=BA=E7=9D=80=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=A5=BD=E5=8F=8B=E3=80=8B=206.=E3=80=8A=E8=BA=AB=E9=AB=98?= =?UTF-8?q?=E4=BD=93=E9=87=8D=EF=BC=9A=E8=BA=AB=E9=AB=98=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E5=8F=98=E6=88=90=E4=BA=86175.0M=E3=80=82?= =?UTF-8?q?=E6=B3=A8=E6=84=8F=E5=A4=9A=E4=BA=86=E4=B8=AA0=EF=BC=8C?= =?UTF-8?q?=E5=B0=91=E4=BA=86=E4=B8=AAC=E3=80=8B=20=E6=95=B4=E7=90=86?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E7=BF=BB=E8=AF=91=E7=9A=84=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i18n/en-US.json | 9 +- i18n/ja-JP.json | 7 +- i18n/vi-VN.json | 25 +- i18n/zh-CN.json | 9 +- i18n/zh-HK.json | 9 +- lib/chat/company_server_view.dart | 6 +- lib/chat/group_chat_item.dart | 5 +- lib/chat/group_chat_view.dart | 43 ++-- lib/generated/i18n.dart | 34 +++ lib/home/ConversActionPage.dart | 316 ++++++++++++------------ lib/home/EditData.dart | 4 +- lib/home/IndexPage.dart | 2 + lib/home/InfoList.dart | 4 +- lib/home/MoneyPage.dart | 17 +- lib/home/MoneyPageOld.dart | 3 + lib/home/SelectPage.dart | 1 + lib/home/UserAgreement.dart | 4 + lib/home/WhiteAndBlackList.dart | 7 +- lib/home/address_book.dart | 2 +- lib/home/alter_select_view.dart | 8 +- lib/home/audio_chat_view.dart | 3 +- lib/home/create_group_view.dart | 10 +- lib/home/daily_bonus_page.dart | 1 + lib/home/find_page.dart | 1 + lib/home/friend_page.dart | 7 +- lib/home/goddess_hot.dart | 2 + lib/home/group_all_member.dart | 4 +- lib/home/group_announcement.dart | 8 +- lib/home/group_chat_page.dart | 3 +- lib/home/group_item_widget.dart | 23 +- lib/home/group_manage_page.dart | 1 + lib/home/group_qr_view.dart | 2 + lib/home/group_setting.dart | 7 + lib/home/homeMain.dart | 1 + lib/home/invite_detail_page.dart | 6 +- lib/home/join_group_confirm.dart | 3 + lib/home/last_chat_record_widget.dart | 4 +- lib/home/money_detail.dart | 6 +- lib/home/my_qr.dart | 3 +- lib/home/new_friends.dart | 31 ++- lib/home/qr_scanner_view.dart | 5 +- lib/home/splash_page.dart | 68 +++-- lib/main.dart | 1 + lib/map/google_map_location_picker.dart | 1 + lib/map/map.dart | 1 + lib/map/map_view.dart | 8 +- lib/models/friends_info.dart | 5 +- lib/utils/CustomUI.dart | 2 +- 48 files changed, 445 insertions(+), 287 deletions(-) diff --git a/i18n/en-US.json b/i18n/en-US.json index 614cf1c..9023b62 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -1215,10 +1215,9 @@ "translation_scenes_3": "KTV/酒吧", "translation_scenes_4": "其他", "file": "文件", - "max_file":"文件大于/s1M", - "translation_scenes_4": "其他", + "max_file": "文件大于/s1M", "translation_input_limit": "还可以输入/s1字", - "translation_more_desc": "更多描述" - - + "translation_more_desc": "更多描述", + "feedback_assistant": "反馈小助手", + "feedback_tips":"有什么问题都可以反馈给我哦" } \ No newline at end of file diff --git a/i18n/ja-JP.json b/i18n/ja-JP.json index ed39b9c..de76b5c 100644 --- a/i18n/ja-JP.json +++ b/i18n/ja-JP.json @@ -1215,8 +1215,9 @@ "translation_scenes_3": "KTV/酒吧", "translation_scenes_4": "其他", "file": "文件", - "max_file":"文件大于/s1M", - "translation_scenes_4": "其他", + "max_file": "文件大于/s1M", "translation_input_limit": "还可以输入/s1字", - "translation_more_desc": "更多描述" + "translation_more_desc": "更多描述", + "feedback_assistant": "反馈小助手", + "feedback_tips":"有什么问题都可以反馈给我哦" } \ No newline at end of file diff --git a/i18n/vi-VN.json b/i18n/vi-VN.json index 6bc796e..f25c0c9 100644 --- a/i18n/vi-VN.json +++ b/i18n/vi-VN.json @@ -1153,16 +1153,16 @@ "enter_num_qian": "Số lượng hối đổi (đơn vị K)", "enter_num_qian1": "Số lượng tiền rút (đơn vị K)", "daily_translate_voucher": "翻译券", - "msg_notice":"通知消息", - "select_notice_people":"选择提醒的人", - "search_phone":"查找手机号", - "not_have_user":"用户不存在", - "not_add_Myself":"你不能添加自己", - "you_are_blaklisted":"对方已拉黑了你", - "confrim_recovery":"确定恢复已被焚毁的照片吗?\n(已经看过的用户可以再看一次)", + "msg_notice": "通知消息", + "select_notice_people": "选择提醒的人", + "search_phone": "查找手机号", + "not_have_user": "用户不存在", + "not_add_Myself": "你不能添加自己", + "you_are_blaklisted": "对方已拉黑了你", + "confrim_recovery": "确定恢复已被焚毁的照片吗?\n(已经看过的用户可以再看一次)", "send_to": "發送到", - "search_plach":"搜索位置", - "finding_place":"查找位置", + "search_plach": "搜索位置", + "finding_place": "查找位置", "real_time_helper": "实时帮", "translation_butler": "翻译管家", "travel_butler": "出行管家", @@ -1215,8 +1215,9 @@ "translation_scenes_3": "KTV/酒吧", "translation_scenes_4": "其他", "file": "文件", - "max_file":"文件大于/s1M", - "translation_scenes_4": "其他", + "max_file": "文件大于/s1M", "translation_input_limit": "还可以输入/s1字", - "translation_more_desc": "更多描述" + "translation_more_desc": "更多描述", + "feedback_assistant": "反馈小助手", + "feedback_tips":"有什么问题都可以反馈给我哦" } \ No newline at end of file diff --git a/i18n/zh-CN.json b/i18n/zh-CN.json index ec7d98d..d7e67f7 100644 --- a/i18n/zh-CN.json +++ b/i18n/zh-CN.json @@ -1214,9 +1214,10 @@ "translation_scenes_2": "餐厅/酒店", "translation_scenes_3": "KTV/酒吧", "translation_scenes_4": "其他", - "translation_input_limit": "还可以输入/s1字", - "translation_more_desc": "更多描述", - "translation_scenes_4": "其他", + "translation_input_limit": "还可以输入/s1字", + "translation_more_desc": "更多描述", "file": "文件", - "max_file":"文件大于/s1M" + "max_file": "文件大于/s1M", + "feedback_assistant":"反馈小助手", + "feedback_tips":"有什么问题都可以反馈给我哦" } \ No newline at end of file diff --git a/i18n/zh-HK.json b/i18n/zh-HK.json index 6baea99..d6c91be 100644 --- a/i18n/zh-HK.json +++ b/i18n/zh-HK.json @@ -1215,10 +1215,9 @@ "translation_scenes_3": "KTV/酒吧", "translation_scenes_4": "其他", "file": "文件", - "max_file":"文件大於/s1M", - "translation_scenes_4": "其他", + "max_file": "文件大於/s1M", "translation_input_limit": "还可以输入/s1字", - "translation_more_desc": "更多描述" - - + "translation_more_desc": "更多描述", + "feedback_assistant": "反饋小助手", + "feedback_tips":"有什麼問題都可以反饋給我哦" } \ No newline at end of file diff --git a/lib/chat/company_server_view.dart b/lib/chat/company_server_view.dart index c22ff0e..7a59cec 100644 --- a/lib/chat/company_server_view.dart +++ b/lib/chat/company_server_view.dart @@ -46,7 +46,7 @@ class _CompanyServerPageState extends State { UserInfo companyInfo = UserInfo( userId: companyId, headimgurl: R.assetsImagesServerIcon, - nickName: '反馈小助手'); + nickName: I18n.of(Constants.getCurrentContext()).feedback_assistant); @override void initState() { @@ -278,7 +278,7 @@ class _CompanyServerPageState extends State { ? Padding( padding: EdgeInsets.all(8), child: Text( - '有什么问题都可以反馈给我哦', + I18n.of(context).feedback_tips, textAlign: TextAlign.center, textScaleFactor: 1.0, style: TextStyle(color: Colors.grey, fontSize: 12), @@ -318,7 +318,7 @@ class _CompanyServerPageState extends State { backgroundColor: const Color(0xFFE2E9F1), appBar: AppBar( title: Text( - '反馈小助手', + I18n.of(context).feedback_assistant, textScaleFactor: 1.0, style: TextStyle(color: Constants.BlackTextColor, fontSize: 16.47), diff --git a/lib/chat/group_chat_item.dart b/lib/chat/group_chat_item.dart index 3d59422..3fcf3fe 100644 --- a/lib/chat/group_chat_item.dart +++ b/lib/chat/group_chat_item.dart @@ -12,6 +12,7 @@ import 'package:chat/chat/upload_item.dart'; import 'package:chat/chat/video_view.dart'; import 'package:chat/data/UserData.dart'; import 'package:chat/data/constants.dart'; +import 'package:chat/utils/friend_list_mgr.dart'; import 'package:chat/utils/wpop/w_popup_menu.dart'; import 'package:flutter/services.dart'; import 'package:chat/generated/i18n.dart'; @@ -1299,7 +1300,9 @@ class _GroupChatPageItemState extends State child: Image.asset(R.assetsImagesDefaultNorAvatar))), onTap: () { AppNavigator.pushProfileInfoPage(context, memberModel.memberId, - fromWhere: 2, addMode: 1); + fromWhere: 2, + addMode: + FriendListMgr().isMyFriend(memberModel.memberId) ? 1 : 0); }, onLongPress: () { print('long press user'); diff --git a/lib/chat/group_chat_view.dart b/lib/chat/group_chat_view.dart index d62bdc5..bb42964 100644 --- a/lib/chat/group_chat_view.dart +++ b/lib/chat/group_chat_view.dart @@ -33,7 +33,6 @@ import 'input_bar.dart'; import 'package:chat/models/ref_name_provider.dart'; import 'package:fixnum/fixnum.dart'; - class GroupChatPage extends StatefulWidget { final GroupInfoModel groupInfoModel; final int enterType; // 0默认 1图片 @@ -91,13 +90,11 @@ class _GroupChatPageState extends State { msgList = ChatDataMgr().getGroupRecord(); - - for(int k=0;k { //转发消息 MsgModel originMsg = widget.enterContent; MsgModel msg = MsgHandler.createSendMsg( - ChatType.valueOf(originMsg.msgType), originMsg.msgContent,channelType: ChatChannelType.Group); + ChatType.valueOf(originMsg.msgType), originMsg.msgContent, + channelType: ChatChannelType.Group); msg.extraInfo = originMsg.extraInfo; msg.extraFile = originMsg.extraFile; msg.localFile = originMsg.localFile; @@ -124,8 +122,7 @@ class _GroupChatPageState extends State { }); } - - void _sendFile( File file) async { + void _sendFile(File file) async { // File file = await FilePicker.getFile(); int fileSize = file.lengthSync(); print('选择的文件 ${file.path} 大小 $fileSize'); @@ -135,7 +132,6 @@ class _GroupChatPageState extends State { return; } - var fileName = file.path.split('/').last; print('fileName $fileName'); @@ -151,17 +147,13 @@ class _GroupChatPageState extends State { fileMsg.size = fileSize; fileMsg.name = fileName; - var msg = MsgHandler.createSendMsg(ChatType.FileChatType, fileMsg.writeToBuffer(), - friendId: 0, - localFile: file.path, - channelType: - ChatChannelType.Group); + var msg = MsgHandler.createSendMsg( + ChatType.FileChatType, fileMsg.writeToBuffer(), + friendId: 0, localFile: file.path, channelType: ChatChannelType.Group); sendMsg(msg); - } - updateGroupInfo(args) { print('更新群信息'); if (mounted) { @@ -384,7 +376,8 @@ class _GroupChatPageState extends State { textScaleFactor: 1.0, style: TextStyle(color: Colors.grey), )) - : Scrollbar(child: ListView.builder( + : Scrollbar( + child: ListView.builder( reverse: true, shrinkWrap: true, itemCount: msgList.length, @@ -425,21 +418,18 @@ class _GroupChatPageState extends State { } MsgModel msg; - int count=0; - testBig(MsgModel msg)async{ - - - - for(int k=0;k<100;k++){ + int count = 0; + testBig(MsgModel msg) async { + for (int k = 0; k < 100; k++) { msg.msgContent = utf8.encode('测试$count'); Int64 time = Int64((DateTime.now()).millisecondsSinceEpoch); msg.time = time.toInt(); MsgHandler.insertMsgToDB(msg); MsgHandler.sendChatMsg(msg); - await Future.delayed(Duration(milliseconds: 300),(){}); + await Future.delayed(Duration(milliseconds: 300), () {}); count++; } - count=0; + count = 0; print('攻击完毕'); showToast('攻击完毕'); } @@ -512,6 +502,7 @@ class _GroupChatPageState extends State { padding: EdgeInsets.fromLTRB(15, 15, 15, 13), child: Text( I18n.of(context).quit_group_tips, + textScaleFactor: 1.0, style: TextStyle(fontSize: 12, color: Color(0xff777777)), ), ), @@ -524,6 +515,7 @@ class _GroupChatPageState extends State { height: 60, alignment: Alignment.center, child: Text(I18n.of(context).determine, + textScaleFactor: 1.0, style: TextStyle( fontSize: 18, color: Constants.ConfrimButtonColor)), ), @@ -540,6 +532,7 @@ class _GroupChatPageState extends State { height: 60, alignment: Alignment.center, child: Text(I18n.of(context).cancel, + textScaleFactor: 1.0, style: TextStyle(fontSize: 18, color: Color(0xff4B4B4B))), ), ) diff --git a/lib/generated/i18n.dart b/lib/generated/i18n.dart index 7a526e5..4a1acbf 100644 --- a/lib/generated/i18n.dart +++ b/lib/generated/i18n.dart @@ -2471,6 +2471,10 @@ class I18n implements WidgetsLocalizations { String get translation_input_limit => "还可以输入/s1字"; /// "更多描述" String get translation_more_desc => "更多描述"; + /// "反馈小助手" + String get feedback_assistant => "反馈小助手"; + /// "有什么问题都可以反馈给我哦" + String get feedback_tips => "有什么问题都可以反馈给我哦"; } class _I18n_en_US extends I18n { @@ -6140,6 +6144,12 @@ class _I18n_vi_VN extends I18n { /// "更多描述" @override String get translation_more_desc => "更多描述"; + /// "反馈小助手" + @override + String get feedback_assistant => "反馈小助手"; + /// "有什么问题都可以反馈给我哦" + @override + String get feedback_tips => "有什么问题都可以反馈给我哦"; @override TextDirection get textDirection => TextDirection.ltr; @@ -9805,6 +9815,12 @@ class _I18n_zh_HK extends I18n { /// "更多描述" @override String get translation_more_desc => "更多描述"; + /// "反饋小助手" + @override + String get feedback_assistant => "反饋小助手"; + /// "有什麼問題都可以反饋給我哦" + @override + String get feedback_tips => "有什麼問題都可以反饋給我哦"; @override TextDirection get textDirection => TextDirection.ltr; @@ -13470,6 +13486,12 @@ class _I18n_zh_CN extends _I18n_zh_HK { /// "更多描述" @override String get translation_more_desc => "更多描述"; + /// "反馈小助手" + @override + String get feedback_assistant => "反馈小助手"; + /// "有什么问题都可以反馈给我哦" + @override + String get feedback_tips => "有什么问题都可以反馈给我哦"; @override TextDirection get textDirection => TextDirection.ltr; @@ -17132,6 +17154,12 @@ class _I18n_ko_KR extends I18n { /// "更多描述" @override String get translation_more_desc => "更多描述"; + /// "反馈小助手" + @override + String get feedback_assistant => "反馈小助手"; + /// "有什么问题都可以反馈给我哦" + @override + String get feedback_tips => "有什么问题都可以反馈给我哦"; @override TextDirection get textDirection => TextDirection.ltr; @@ -20797,6 +20825,12 @@ class _I18n_ja_JP extends I18n { /// "更多描述" @override String get translation_more_desc => "更多描述"; + /// "反馈小助手" + @override + String get feedback_assistant => "反馈小助手"; + /// "有什么问题都可以反馈给我哦" + @override + String get feedback_tips => "有什么问题都可以反馈给我哦"; @override TextDirection get textDirection => TextDirection.ltr; diff --git a/lib/home/ConversActionPage.dart b/lib/home/ConversActionPage.dart index 21ed261..5ed44d7 100644 --- a/lib/home/ConversActionPage.dart +++ b/lib/home/ConversActionPage.dart @@ -636,11 +636,11 @@ import 'package:flutter/material.dart'; import 'package:shared_preferences/shared_preferences.dart'; import '../data/constants.dart' show - AppColors, - AppStyles, - Constants, - GlobalSearchPageType, - GroupOperatingPageType; + AppColors, + AppStyles, + Constants, + GlobalSearchPageType, + GroupOperatingPageType; import 'package:cached_network_image/cached_network_image.dart'; import 'create_group_view.dart'; @@ -650,11 +650,11 @@ import 'group_item_widget.dart'; class _ConversationItem extends StatelessWidget { const _ConversationItem( {Key key, - this.conversation, - this.callback, - this.icon, - this.bgColor, - this.iconSize = 20}) + this.conversation, + this.callback, + this.icon, + this.bgColor, + this.iconSize = 20}) : assert(conversation != null), super(key: key); final icon; @@ -714,7 +714,7 @@ class _ConversationItem extends StatelessWidget { alignment: Alignment.center, decoration: BoxDecoration( borderRadius: - BorderRadius.circular(Constants.UnReadMsgNotifyDotSize / 2.0), + BorderRadius.circular(Constants.UnReadMsgNotifyDotSize / 2.0), color: Color(0xFFFF5454), ), child: Text(countStr, @@ -722,9 +722,9 @@ class _ConversationItem extends StatelessWidget { ); _rightArea.add(Expanded( child: Align( - alignment: Alignment.bottomCenter, - child: unreadMsgCountText, - ))); + alignment: Alignment.bottomCenter, + child: unreadMsgCountText, + ))); } return InkWell( @@ -935,9 +935,9 @@ class _ConversActionPageState extends State child: Container( padding: EdgeInsets.only(left: 2), decoration: BoxDecoration( - //color: Constants.LightGreyBackgroundColor, + //color: Constants.LightGreyBackgroundColor, border: - Border(bottom: BorderSide(color: Color(0xffeaeaea)))), + Border(bottom: BorderSide(color: Color(0xffeaeaea)))), alignment: Alignment.centerLeft, child: TabBar( isScrollable: true, @@ -970,8 +970,8 @@ class _ConversActionPageState extends State ), body: SafeArea( child: TabBarView( - children: [ - LastChatPage(), + children: [ + LastChatPage(), // ListView.builder( //// controller: _scrollController, // itemBuilder: (BuildContext context, int index) { @@ -984,155 +984,155 @@ class _ConversActionPageState extends State // }, // itemCount: groupList.length + 1, // ), - ListView( - children: [ - SizedBox(height: 8.5), - _ConversationItem( - icon: 'assets/images/chat/icon1.png', - bgColor: Constants.RadioGradient, - conversation: Conversation( - avatar: 'assets/images/ic_tx_news.png', - title: I18n.of(context).radio_message, - desc: RichTitle.normalTitle( - systemInfo['castList'], context, InfoType.Radio), - updateAt: systemInfo['castList'] == null - ? "" - : WebData().getLoginTime( + ListView( + children: [ + SizedBox(height: 8.5), + _ConversationItem( + icon: 'assets/images/chat/icon1.png', + bgColor: Constants.RadioGradient, + conversation: Conversation( + avatar: 'assets/images/ic_tx_news.png', + title: I18n.of(context).radio_message, + desc: RichTitle.normalTitle( + systemInfo['castList'], context, InfoType.Radio), + updateAt: systemInfo['castList'] == null + ? "" + : WebData().getLoginTime( context, systemInfo['castList']['CreateTime']), - unreadMsgCount: systemInfo['castCount'], + unreadMsgCount: systemInfo['castCount'], + ), + callback: () { + setResNum(Constants.CastCount); + Navigator.of(context).push( + new MaterialPageRoute( + builder: (context) { + return InfoListPage( + title: I18n.of(context).radio_message, + type: InfoType.Radio, + ); + }, ), - callback: () { - setResNum(Constants.CastCount); - Navigator.of(context).push( - new MaterialPageRoute( - builder: (context) { - return InfoListPage( - title: I18n.of(context).radio_message, - type: InfoType.Radio, - ); - }, - ), - ); - }, - ), - _ConversationItem( - icon: 'assets/images/chat/icon4.png', - bgColor: Constants.MoneyGradient, - conversation: Conversation( - avatar: 'assets/images/ic_tx_news.png', - title: I18n.of(context).wallet_reminder, - desc: RichTitle.normalTitle( - systemInfo['walletList'], context, InfoType.IncomeMoney), - updateAt: systemInfo['walletList'] == null - ? "" - : WebData().getLoginTime( + ); + }, + ), + _ConversationItem( + icon: 'assets/images/chat/icon4.png', + bgColor: Constants.MoneyGradient, + conversation: Conversation( + avatar: 'assets/images/ic_tx_news.png', + title: I18n.of(context).wallet_reminder, + desc: RichTitle.normalTitle(systemInfo['walletList'], + context, InfoType.IncomeMoney), + updateAt: systemInfo['walletList'] == null + ? "" + : WebData().getLoginTime( context, systemInfo['walletList']['CreateTime']), - unreadMsgCount: systemInfo['walletCount'], + unreadMsgCount: systemInfo['walletCount'], + ), + callback: () { + setResNum(Constants.WalletCount); + Navigator.of(context).push( + new MaterialPageRoute( + builder: (context) { + return InfoListPage( + title: I18n.of(context).wallet_reminder, + type: InfoType.IncomeMoney, + ); + }, ), - callback: () { - setResNum(Constants.WalletCount); - Navigator.of(context).push( - new MaterialPageRoute( - builder: (context) { - return InfoListPage( - title: I18n.of(context).wallet_reminder, - type: InfoType.IncomeMoney, - ); - }, - ), - ); - }, - ), - _ConversationItem( - icon: 'assets/images/chat/icon3.png', - iconSize: 27, - bgColor: Constants.ApplyGradient, - conversation: Conversation( - avatar: 'assets/images/ic_tx_news.png', - title: I18n.of(context).application_notice, - desc: RichTitle.normalTitle( - systemInfo['applyList'], context, InfoType.Apply), - updateAt: systemInfo['applyList'] == null - ? "" - : WebData().getLoginTime( + ); + }, + ), + _ConversationItem( + icon: 'assets/images/chat/icon3.png', + iconSize: 27, + bgColor: Constants.ApplyGradient, + conversation: Conversation( + avatar: 'assets/images/ic_tx_news.png', + title: I18n.of(context).application_notice, + desc: RichTitle.normalTitle( + systemInfo['applyList'], context, InfoType.Apply), + updateAt: systemInfo['applyList'] == null + ? "" + : WebData().getLoginTime( context, systemInfo['applyList']['CreatTime']), - unreadMsgCount: systemInfo['applyCount'], + unreadMsgCount: systemInfo['applyCount'], + ), + callback: () { + setResNum(Constants.ApplyCount); + Navigator.of(context).push( + new MaterialPageRoute( + builder: (context) { + return InfoListPage( + title: I18n.of(context).application_notice, + type: InfoType.Apply, + ); + }, ), - callback: () { - setResNum(Constants.ApplyCount); - Navigator.of(context).push( - new MaterialPageRoute( - builder: (context) { - return InfoListPage( - title: I18n.of(context).application_notice, - type: InfoType.Apply, - ); - }, - ), - ); - }, - ), - _ConversationItem( - icon: 'assets/images/chat/icon6.png', - bgColor: Constants.EvaGradient, - conversation: Conversation( - avatar: 'assets/images/ic_tx_news.png', - title: I18n.of(context).evaluation_notice, - desc: RichTitle.normalTitle(systemInfo['evaluateList'], - context, InfoType.Evaluation), - updateAt: systemInfo['evaluateList'] == null - ? '' - : WebData().getLoginTime( + ); + }, + ), + _ConversationItem( + icon: 'assets/images/chat/icon6.png', + bgColor: Constants.EvaGradient, + conversation: Conversation( + avatar: 'assets/images/ic_tx_news.png', + title: I18n.of(context).evaluation_notice, + desc: RichTitle.normalTitle(systemInfo['evaluateList'], + context, InfoType.Evaluation), + updateAt: systemInfo['evaluateList'] == null + ? '' + : WebData().getLoginTime( context, systemInfo['evaluateList']['CreateTime']), - unreadMsgCount: systemInfo['evaluateCount'], + unreadMsgCount: systemInfo['evaluateCount'], + ), + callback: () { + setResNum(Constants.EvaluateCount); + Navigator.of(context).push( + new MaterialPageRoute( + builder: (context) { + return InfoListPage( + title: I18n.of(context).evaluation_notice, + type: 2, + ); + }, ), - callback: () { - setResNum(Constants.EvaluateCount); - Navigator.of(context).push( - new MaterialPageRoute( - builder: (context) { - return InfoListPage( - title: I18n.of(context).evaluation_notice, - type: 2, - ); - }, - ), - ); - }, - ), - _ConversationItem( - icon: 'assets/images/chat/icon5.png', - bgColor: Constants.ParkGradient, - conversation: Conversation( - avatar: 'assets/images/ic_tx_news.png', - title: I18n.of(context).appName, - desc: RichTitle.normalTitle( - systemInfo['parkList'], context, InfoType.System), - updateAt: systemInfo['parkList'] == null - ? "" - : WebData().getLoginTime( + ); + }, + ), + _ConversationItem( + icon: 'assets/images/chat/icon5.png', + bgColor: Constants.ParkGradient, + conversation: Conversation( + avatar: 'assets/images/ic_tx_news.png', + title: I18n.of(context).appName, + desc: RichTitle.normalTitle( + systemInfo['parkList'], context, InfoType.System), + updateAt: systemInfo['parkList'] == null + ? "" + : WebData().getLoginTime( context, systemInfo['parkList']['CreateTime']), - unreadMsgCount: systemInfo['parkCount'], + unreadMsgCount: systemInfo['parkCount'], + ), + callback: () { + setResNum(Constants.ParkCount); + Navigator.of(context).push( + new MaterialPageRoute( + builder: (context) { + return InfoListPage( + title: I18n.of(context).appName, + type: InfoType.System, + ); + }, ), - callback: () { - setResNum(Constants.ParkCount); - Navigator.of(context).push( - new MaterialPageRoute( - builder: (context) { - return InfoListPage( - title: I18n.of(context).appName, - type: InfoType.System, - ); - }, - ), - ); - }, - ) - ], + ); + }, ) ], - controller: tabCtrl, - ))); + ) + ], + controller: tabCtrl, + ))); } Widget _buildCreateButton() { @@ -1174,6 +1174,7 @@ class _ConversActionPageState extends State SizedBox(width: 14.0), Text( I18n.of(context).create_group_chat, + textScaleFactor: 1.0, style: TextStyle(fontSize: 15.5), ), ], @@ -1188,7 +1189,10 @@ class _ConversActionPageState extends State decoration: BoxDecoration( color: Colors.white, border: Border(bottom: Constants.GreyBorderSide)), - child: Text(I18n.of(context).group_chat + '(${groupList.length})'), + child: Text( + I18n.of(context).group_chat + '(${groupList.length})', + textScaleFactor: 1.0, + ), ); return Column( diff --git a/lib/home/EditData.dart b/lib/home/EditData.dart index 8fd9d0f..12869dd 100644 --- a/lib/home/EditData.dart +++ b/lib/home/EditData.dart @@ -153,11 +153,11 @@ class _EditPageState extends State { heightStr = (UserData().basicInfo.height == 0.0 || UserData().basicInfo.height == null) ? I18n.of(context).not_show - : '${UserData().basicInfo.height}M'; + : '${UserData().basicInfo.height.toInt()}CM'; weightStr = (UserData().basicInfo.weight == 0.0 || UserData().basicInfo.weight == null) ? I18n.of(context).not_show - : '${UserData().basicInfo.weight}KG'; + : '${UserData().basicInfo.weight.toInt()}KG'; loadSuccess = true; setState(() {}); } diff --git a/lib/home/IndexPage.dart b/lib/home/IndexPage.dart index 5d0f3d3..8241a49 100644 --- a/lib/home/IndexPage.dart +++ b/lib/home/IndexPage.dart @@ -189,6 +189,7 @@ class _IndexPageState extends State { Container( child: Text( I18n.of(context).net_error, + textScaleFactor: 1.0, style: TextStyle(color: Color(0xFF8F8E8E), fontSize: 21.5), ), ), @@ -207,6 +208,7 @@ class _IndexPageState extends State { borderRadius: BorderRadius.circular(8)), child: Text( I18n.of(context).re_connect, + textScaleFactor: 1.0, style: TextStyle(color: Color(0xFF3875E9), fontSize: 20.22), ), diff --git a/lib/home/InfoList.dart b/lib/home/InfoList.dart index e27145e..1f29beb 100644 --- a/lib/home/InfoList.dart +++ b/lib/home/InfoList.dart @@ -614,6 +614,7 @@ class _InfoListPageState extends State rightButton: userInfo['Status'] == 0 || userInfo['Status'] == 3 ? botton : Text(userInfo['Status'] == 1 ? I18n.of(context).appealed : "", + textScaleFactor: 1.0, style: TextStyle(fontSize: 11, color: Constants.LightGreyTextColor)), title: @@ -684,7 +685,7 @@ class _InfoListPageState extends State applyInfo: data['Type'] == 6 ? applyInfo : null, // applyInfo, bgColor: Constants.ParkGradient, title: data['Type'] == 6 - ? Text(data['Theme']) + ? Text(data['Theme'], textScaleFactor: 1.0) : RichTitle.getRichTitleWidget(data, context, InfoType.System), callback: () { if (data['Type'] == 4 && data['Status'] == 1) { @@ -783,6 +784,7 @@ class _InfoListPageState extends State backgroundColor: AppColors.NewAppbarBgColor, title: Text( widget.title, + textScaleFactor: 1.0, style: TextStyle(color: AppColors.NewAppbarTextColor), ), leading: CustomUI.buildCustomLeading(context), diff --git a/lib/home/MoneyPage.dart b/lib/home/MoneyPage.dart index 9e77f1a..3d8500c 100644 --- a/lib/home/MoneyPage.dart +++ b/lib/home/MoneyPage.dart @@ -183,6 +183,7 @@ class MoneyPageState extends State margin: EdgeInsets.only(top: 20), child: Text( I18n.of(context).withdrawal_application, + textScaleFactor: 1.0, style: TextStyle(color: Constants.BlackTextColor, fontSize: 16), ), ), @@ -276,6 +277,7 @@ class MoneyPageState extends State margin: EdgeInsets.only(top: 20), child: Text( I18n.of(context).charge_h, + textScaleFactor: 1.0, style: TextStyle(color: Constants.BlackTextColor, fontSize: 16), ), ), @@ -438,6 +440,7 @@ class MoneyPageState extends State width: 120, child: Text( I18n.of(context).recharge, + textScaleFactor: 1.0, style: TextStyle(color: const Color(0xFFFF717D), fontSize: 14.8), ), )); @@ -461,6 +464,7 @@ class MoneyPageState extends State width: 120, child: Text( I18n.of(context).joinvip, + textScaleFactor: 1.0, style: TextStyle(color: Colors.white, fontSize: 14.8), ), )); @@ -503,6 +507,7 @@ class MoneyPageState extends State Container( child: Text( I18n.of(context).my_money_info, + textScaleFactor: 1.0, style: TextStyle(color: Colors.white, fontSize: 12), ), @@ -519,6 +524,7 @@ class MoneyPageState extends State alignment: Alignment.center, child: Text( I18n.of(context).my_left_money, + textScaleFactor: 1.0, style: TextStyle(color: Colors.white, fontSize: 15), ), ), @@ -528,6 +534,7 @@ class MoneyPageState extends State child: Text( '${Provider.of(context).money}' + I18n.of(context).mask_coin, + textScaleFactor: 1.0, style: TextStyle(color: Colors.white, fontSize: 31.29), ), ), @@ -545,6 +552,7 @@ class MoneyPageState extends State alignment: Alignment.centerLeft, child: Text( I18n.of(context).money_tips, + textScaleFactor: 1.0, style: TextStyle(color: Colors.white, fontSize: 11), ), ), @@ -595,6 +603,7 @@ class MoneyPageState extends State Container( child: Text( I18n.of(context).get_money_detail, + textScaleFactor: 1.0, style: TextStyle(color: Colors.white, fontSize: 12), ), @@ -604,13 +613,14 @@ class MoneyPageState extends State size: 16.0, color: Colors.white, ), - SizedBox(width: 5) + SizedBox(width: 5) ], )), Container( alignment: Alignment.center, child: Text( I18n.of(context).hibok_money, + textScaleFactor: 1.0, style: TextStyle(color: Colors.white, fontSize: 15), ), ), @@ -624,11 +634,13 @@ class MoneyPageState extends State (UserData().incomeMoney + UserData().frozenMoney) .toString() + 'K', + textScaleFactor: 1.0, style: TextStyle(color: Colors.white, fontSize: 31.29), ), Text( "(${I18n.of(context).can_withdraw}${UserData().incomeMoney}K)", + textScaleFactor: 1.0, style: TextStyle(color: Colors.white, fontSize: 18), ), ], @@ -647,6 +659,7 @@ class MoneyPageState extends State width: 120, child: Text( I18n.of(context).exchange_cash, + textScaleFactor: 1.0, style: TextStyle( color: const Color(0xFF4F8BFF), fontSize: 14.8), @@ -663,6 +676,7 @@ class MoneyPageState extends State width: 120, child: Text( I18n.of(context).charge_h, + textScaleFactor: 1.0, style: TextStyle( color: Colors.white, fontSize: 14.8), ), @@ -679,6 +693,7 @@ class MoneyPageState extends State alignment: Alignment.centerLeft, child: Text( I18n.of(context).charge_tips, + textScaleFactor: 1.0, style: TextStyle(color: Colors.white, fontSize: 11), ), ), diff --git a/lib/home/MoneyPageOld.dart b/lib/home/MoneyPageOld.dart index 9fd1334..8d50c30 100644 --- a/lib/home/MoneyPageOld.dart +++ b/lib/home/MoneyPageOld.dart @@ -134,6 +134,7 @@ class _ConversationItem extends StatelessWidget { children: [ Text( '${money > 0 ? '+' : ''}$money${I18n.of(context).mask_coin}', + textScaleFactor: 1.0, style: TextStyle( fontSize: 14, fontWeight: FontWeight.w500, @@ -145,6 +146,7 @@ class _ConversationItem extends StatelessWidget { padding: EdgeInsets.only(top: 3), child: Text( I18n.of(context).alreay_back, + textScaleFactor: 1.0, style: TextStyle( fontSize: 12, fontWeight: FontWeight.normal, @@ -303,6 +305,7 @@ class MoneyPageOldState extends State margin: EdgeInsets.only(top: 20), child: Text( I18n.of(context).withdrawal_application, + textScaleFactor: 1.0, style: TextStyle(color: Constants.BlackTextColor, fontSize: 16), ), ), diff --git a/lib/home/SelectPage.dart b/lib/home/SelectPage.dart index a724fae..627f658 100644 --- a/lib/home/SelectPage.dart +++ b/lib/home/SelectPage.dart @@ -107,6 +107,7 @@ class _SelectPageState extends State { child: new Text( value, textScaleFactor: 1.0, + textAlign: TextAlign.center, style: isLeft ? TextStyle( color: leftSelection == key diff --git a/lib/home/UserAgreement.dart b/lib/home/UserAgreement.dart index eb3560d..1d98b0a 100644 --- a/lib/home/UserAgreement.dart +++ b/lib/home/UserAgreement.dart @@ -18,6 +18,7 @@ class _UserAgreementState extends State { width: Screen.width, child: Text( str, + textScaleFactor: 1.0, style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600), ), ); @@ -30,6 +31,7 @@ class _UserAgreementState extends State { width: Screen.width, child: Text( str, + textScaleFactor: 1.0, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600), ), ); @@ -42,6 +44,7 @@ class _UserAgreementState extends State { width: Screen.width, child: Text( str, + textScaleFactor: 1.0, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600), ), ); @@ -53,6 +56,7 @@ class _UserAgreementState extends State { width: Screen.width, child: Text( ' ' + str, + textScaleFactor: 1.0, style: TextStyle(fontSize: 14, height: 1.35), ), ); diff --git a/lib/home/WhiteAndBlackList.dart b/lib/home/WhiteAndBlackList.dart index 157afc0..b6a732f 100644 --- a/lib/home/WhiteAndBlackList.dart +++ b/lib/home/WhiteAndBlackList.dart @@ -156,7 +156,9 @@ class _WhiteAndBlackPageState extends State { Padding( padding: EdgeInsets.only(left: 10), child: Text( - WebData().subUserName(userInfo['NickName']), + WebData().subUserName(Provider.of(context) + .getRefName( + userInfo['FollowUserId'], userInfo['NickName'])), textScaleFactor: 1.0, style: TextStyle(fontSize: 15, color: Constants.BlackTextColor), @@ -169,6 +171,9 @@ class _WhiteAndBlackPageState extends State { if (list[i]['FollowUserId'] == userInfo['FollowUserId']) { setState(() { list.removeAt(i); + if (list.length == 0) { + _refreshController.refreshCompleted(); + } }); break; } diff --git a/lib/home/address_book.dart b/lib/home/address_book.dart index f018fe4..8632d56 100644 --- a/lib/home/address_book.dart +++ b/lib/home/address_book.dart @@ -70,7 +70,7 @@ class _ContactItem extends StatelessWidget { children: [ _avatarIcon, SizedBox(width: 10.0), - Expanded(child: Text(title)), + Expanded(child: Text(title, textScaleFactor: 1.0)), state == 1 ? InkWell( child: Container( diff --git a/lib/home/alter_select_view.dart b/lib/home/alter_select_view.dart index 85f94c0..72c96ae 100644 --- a/lib/home/alter_select_view.dart +++ b/lib/home/alter_select_view.dart @@ -71,7 +71,7 @@ class _MemberItem extends StatelessWidget { children: [ _avatarIcon, SizedBox(width: 10.0), - Text(title), + Text(title, textScaleFactor: 1.0,), ], ), ); @@ -87,7 +87,7 @@ class _MemberItem extends StatelessWidget { color: const Color(AppColors.ContactGroupTitleBgColor), alignment: Alignment.centerLeft, child: - Text(this.groupTitle, style: AppStyles.GroupTitleItemTextStyle), + Text(this.groupTitle, textScaleFactor: 1.0,style: AppStyles.GroupTitleItemTextStyle), ), _button, ], @@ -219,8 +219,10 @@ class _AlterSelectPageState extends State { width: 20, child: Text( word, + textScaleFactor: 1.0, style: TextStyle( fontSize: 10, + color: _currentLetter == word ? Colors.white : Colors.black), ))); @@ -340,7 +342,7 @@ class _AlterSelectPageState extends State { ), child: Center( child: - Text(_currentLetter, style: AppStyles.IndexLetterBoxTextStyle), + Text(_currentLetter, textScaleFactor: 1.0, style: AppStyles.IndexLetterBoxTextStyle), ), ), )); diff --git a/lib/home/audio_chat_view.dart b/lib/home/audio_chat_view.dart index a56489a..651226e 100644 --- a/lib/home/audio_chat_view.dart +++ b/lib/home/audio_chat_view.dart @@ -368,6 +368,7 @@ class _AudioChatPageState extends State { _bottomToolBar() { List showWidgets = [ Text(I18n.of(context).voicing, + textScaleFactor: 1.0, style: TextStyle(fontSize: 11, color: Colors.white24), textAlign: TextAlign.center), SizedBox(height: 10), @@ -529,7 +530,7 @@ class _AudioChatPageState extends State { color: Colors.white, ), child: giftList == null - ? Center(child: Text(I18n.of(context).no_gift)) + ? Center(child: Text(I18n.of(context).no_gift, textScaleFactor: 1.0,)) : Column( children: [ Container( diff --git a/lib/home/create_group_view.dart b/lib/home/create_group_view.dart index eb688f0..532e8f9 100644 --- a/lib/home/create_group_view.dart +++ b/lib/home/create_group_view.dart @@ -104,6 +104,7 @@ class _FriendSelectItemState extends State { child: Container( child: Text( widget.friendModel.getTitle(), + textScaleFactor: 1.0, overflow: TextOverflow.ellipsis, )), ) @@ -122,7 +123,7 @@ class _FriendSelectItemState extends State { color: const Color(AppColors.ContactGroupTitleBgColor), alignment: Alignment.centerLeft, child: Text(widget.groupTitle, - style: AppStyles.GroupTitleItemTextStyle), + textScaleFactor: 1.0, style: AppStyles.GroupTitleItemTextStyle), ), _button, ], @@ -482,8 +483,11 @@ class _CreateGroupPageState extends State { Radius.circular(Constants.IndexLetterBoxRadius)), ), child: Center( - child: - Text(_currentLetter, style: AppStyles.IndexLetterBoxTextStyle), + child: Text( + _currentLetter, + style: AppStyles.IndexLetterBoxTextStyle, + textScaleFactor: 1.0, + ), ), ), )); diff --git a/lib/home/daily_bonus_page.dart b/lib/home/daily_bonus_page.dart index d9c875d..01080db 100644 --- a/lib/home/daily_bonus_page.dart +++ b/lib/home/daily_bonus_page.dart @@ -430,6 +430,7 @@ class DailyBouusState extends State with SingleTickerProviderStateMixin { padding: EdgeInsets.fromLTRB(18, 0, 18, 18), child: Text( rules, + textScaleFactor: 1.0, style: TextStyle( color: Color(0xffFF0000), fontSize: 12), ), diff --git a/lib/home/find_page.dart b/lib/home/find_page.dart index 9891e65..8bd70a9 100644 --- a/lib/home/find_page.dart +++ b/lib/home/find_page.dart @@ -80,6 +80,7 @@ class _FindPageState extends State { margin: EdgeInsets.only(left: 15), child: Text( text, + textScaleFactor: 1.0, style: TextStyle(fontSize: 16), ), ), diff --git a/lib/home/friend_page.dart b/lib/home/friend_page.dart index 082c3fc..c37ea82 100644 --- a/lib/home/friend_page.dart +++ b/lib/home/friend_page.dart @@ -146,11 +146,13 @@ class _FriendPageState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(list[0]['ApplyName'], style: TextStyle(fontSize: 12.66)), + Text(list[0]['ApplyName'], + textScaleFactor: 1.0, style: TextStyle(fontSize: 12.66)), SizedBox( height: 5, ), Text(I18n.of(context).apply_fro_friends, + textScaleFactor: 1.0, style: TextStyle(fontSize: 10, color: const Color(0xFF6A6A6A))), ], @@ -401,6 +403,7 @@ class _FriendPageState extends State { width: 20, child: Text( word, + textScaleFactor: 1.0, style: TextStyle( fontSize: 10, color: @@ -509,7 +512,7 @@ class _FriendPageState extends State { ), child: Center( child: - Text(_currentLetter, style: AppStyles.IndexLetterBoxTextStyle), + Text(_currentLetter, textScaleFactor: 1.0,style: AppStyles.IndexLetterBoxTextStyle), ), ), )); diff --git a/lib/home/goddess_hot.dart b/lib/home/goddess_hot.dart index 0edd5d5..48b6913 100644 --- a/lib/home/goddess_hot.dart +++ b/lib/home/goddess_hot.dart @@ -84,6 +84,7 @@ class GoddessHotPageState extends State { )), Text( name, + textScaleFactor: 1.0, style: TextStyle( fontSize: 10, color: const Color(0xFF777777)), ), @@ -106,6 +107,7 @@ class GoddessHotPageState extends State { SizedBox(height: 9), Text( nums.toString() + I18n.of(context).one, + textScaleFactor: 1.0, style: TextStyle(fontSize: 12.5, color: const Color(0xFF515151)), ), ], diff --git a/lib/home/group_all_member.dart b/lib/home/group_all_member.dart index c698c83..c681a30 100644 --- a/lib/home/group_all_member.dart +++ b/lib/home/group_all_member.dart @@ -151,10 +151,12 @@ class GroupAllMemberState extends State { SizedBox( height: 5, ), - SizedBox( + Container( width: size - 30, + alignment: Alignment.center, child: Text( refName, + textScaleFactor: 1.0, style: TextStyle(fontSize: 11, color: Color(0xff818181)), maxLines: 1, overflow: TextOverflow.ellipsis, diff --git a/lib/home/group_announcement.dart b/lib/home/group_announcement.dart index f4a353e..6e9cf3a 100644 --- a/lib/home/group_announcement.dart +++ b/lib/home/group_announcement.dart @@ -68,6 +68,7 @@ class _GroupAnnouncementPageState extends State { borderRadius: BorderRadius.circular(4.5)), child: Text( I18n.of(context).determine, + textScaleFactor: 1.0, overflow: TextOverflow.ellipsis, style: TextStyle( color: Constants.ConfrimButtonColor, fontSize: 12.6), @@ -129,6 +130,7 @@ class _GroupAnnouncementPageState extends State { ), Text( I18n.of(context).only_host, + textScaleFactor: 1.0, style: TextStyle(color: Colors.grey[350]), ), Expanded( @@ -167,6 +169,7 @@ class _GroupAnnouncementPageState extends State { children: [ Text( refName, + textScaleFactor: 1.0, style: TextStyle(fontSize: 16), ), SizedBox(height: 6.5), @@ -203,7 +206,10 @@ class _GroupAnnouncementPageState extends State { : Container( //color: Colors.white, padding: EdgeInsets.only(right: 20, left: 20, top: 10, bottom: 10), - child: Text(widget.groupInfoModel.describe), + child: Text( + widget.groupInfoModel.describe, + textScaleFactor: 1.0, + ), ); } diff --git a/lib/home/group_chat_page.dart b/lib/home/group_chat_page.dart index 5f90eda..af5e14d 100644 --- a/lib/home/group_chat_page.dart +++ b/lib/home/group_chat_page.dart @@ -91,6 +91,7 @@ class _GroupChatListPageState extends State { SizedBox(width: 14.0), Text( I18n.of(context).create_group_chat, + textScaleFactor: 1.0, style: TextStyle(fontSize: 15.5), ), ], @@ -105,7 +106,7 @@ class _GroupChatListPageState extends State { decoration: BoxDecoration( color: Colors.white, border: Border(bottom: Constants.GreyBorderSide)), - child: Text(I18n.of(context).group_chat + '(${groupList.length})'), + child: Text(I18n.of(context).group_chat + '(${groupList.length})', textScaleFactor: 1.0,), ); return Column( diff --git a/lib/home/group_item_widget.dart b/lib/home/group_item_widget.dart index 604fe5a..fb2b381 100644 --- a/lib/home/group_item_widget.dart +++ b/lib/home/group_item_widget.dart @@ -21,19 +21,18 @@ const double LeftPadding = 15; const double ItemHeight = 83.5; class GroupItem extends StatefulWidget { - GroupItem( - Key key, { - @required this.groupInfoModel, - this.onPressed, - this.isShowDivder: true, - this.enterType=0,this.enterContent - - }) : super(key: key); + GroupItem(Key key, + {@required this.groupInfoModel, + this.onPressed, + this.isShowDivder: true, + this.enterType = 0, + this.enterContent}) + : super(key: key); final GroupInfoModel groupInfoModel; final VoidCallback onPressed; final bool isShowDivder; - final int enterType; // 0默认 1图片 + final int enterType; // 0默认 1图片 final dynamic enterContent; @override _GroupItemState createState() => _GroupItemState(); @@ -86,7 +85,7 @@ class _GroupItemState extends State { )) ]; - Map refMap = Provider.of(context).refMap; + Map refMap = Provider.of(context).refMap; return InkWell( child: Container( padding: const EdgeInsets.only( @@ -160,6 +159,7 @@ class _GroupItemState extends State { 0 ? '[${ChatDataMgr().groupUnreadProvider.getUnreadCount(widget.groupInfoModel.lastMsg.sessionId)}${I18n.of(context).article}] ' : "", + textScaleFactor: 1.0, style: AppStyles.DescStyle), Container( constraints: BoxConstraints( @@ -189,7 +189,8 @@ class _GroupItemState extends State { ), ), onTap: () { - AppNavigator.pushGroupChatPage(context, widget.groupInfoModel,enterType: widget.enterType,enterContent: widget.enterContent); + AppNavigator.pushGroupChatPage(context, widget.groupInfoModel, + enterType: widget.enterType, enterContent: widget.enterContent); }, ); } diff --git a/lib/home/group_manage_page.dart b/lib/home/group_manage_page.dart index 0083179..6e6b15f 100644 --- a/lib/home/group_manage_page.dart +++ b/lib/home/group_manage_page.dart @@ -124,6 +124,7 @@ class _GroupManagePageState extends State { margin: EdgeInsets.only(top: 10, bottom: 10, left: 15, right: 15), child: Text( I18n.of(context).group_setting_tips, + textScaleFactor: 1.0, style: TextStyle(fontSize: 10.5, color: Constants.GreyTextColor), ), ); diff --git a/lib/home/group_qr_view.dart b/lib/home/group_qr_view.dart index a119743..334ac9f 100644 --- a/lib/home/group_qr_view.dart +++ b/lib/home/group_qr_view.dart @@ -52,6 +52,7 @@ class GroupQrPage extends StatelessWidget { padding: EdgeInsets.all(20), child: Text( dayTips, + textScaleFactor: 1.0, style: TextStyle(fontSize: 9), ), ) @@ -88,6 +89,7 @@ class GroupQrPage extends StatelessWidget { color: Color(0xf7FFFFFF), child: Text( I18n.of(context).group_open_verification, + textScaleFactor: 1.0, style: TextStyle(color: Color(0xff696969), fontSize: 20), ), )) diff --git a/lib/home/group_setting.dart b/lib/home/group_setting.dart index 7fe56ce..53fb9af 100644 --- a/lib/home/group_setting.dart +++ b/lib/home/group_setting.dart @@ -372,6 +372,7 @@ class GroupSettingState extends State { padding: EdgeInsets.fromLTRB(15, 15, 15, 13), child: Text( dialogTips, + textScaleFactor: 1.0, style: TextStyle(fontSize: 12, color: Color(0xff777777)), ), @@ -385,6 +386,7 @@ class GroupSettingState extends State { height: 60, alignment: Alignment.center, child: Text(I18n.of(context).determine, + textScaleFactor: 1.0, style: TextStyle( fontSize: 18, color: Constants.ConfrimButtonColor)), @@ -402,6 +404,7 @@ class GroupSettingState extends State { height: 60, alignment: Alignment.center, child: Text(I18n.of(context).cancel, + textScaleFactor: 1.0, style: TextStyle( fontSize: 18, color: Color(0xff4B4B4B))), ), @@ -418,6 +421,7 @@ class GroupSettingState extends State { alignment: Alignment.center, child: Text( title, + textScaleFactor: 1.0, style: TextStyle(color: Constants.ConfrimButtonColor, fontSize: 15), ), @@ -460,6 +464,7 @@ class GroupSettingState extends State { padding: EdgeInsets.only(top: 0, left: 4), child: Text( I18n.of(context).group_announcement, + textScaleFactor: 1.0, style: TextStyle( color: Colors.black, fontSize: 14), ), @@ -472,6 +477,7 @@ class GroupSettingState extends State { padding: EdgeInsets.only(top: 3, left: 4), child: Text( widget.groupInfoModel.describe, + textScaleFactor: 1.0, maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -558,6 +564,7 @@ class GroupSettingState extends State { alignment: Alignment.center, child: Text( refName, + textScaleFactor: 1.0, style: TextStyle(fontSize: 11, color: Color(0xff818181)), maxLines: 1, overflow: TextOverflow.ellipsis, diff --git a/lib/home/homeMain.dart b/lib/home/homeMain.dart index a46312c..046d8af 100644 --- a/lib/home/homeMain.dart +++ b/lib/home/homeMain.dart @@ -415,6 +415,7 @@ class _HomeMainState extends State { NavigationIconView( title: _titles[3], + isShowdot: true, icon: IconData( 0xe66e, fontFamily: 'iconfont', diff --git a/lib/home/invite_detail_page.dart b/lib/home/invite_detail_page.dart index 647e33c..6c568fb 100644 --- a/lib/home/invite_detail_page.dart +++ b/lib/home/invite_detail_page.dart @@ -32,7 +32,7 @@ class _InviteDetailPageState extends State { I18n.of(context).invite_detail, textScaleFactor: 1.0, ), - leading: CustomUI.buildCustomLeading(context), + leading: CustomUI.buildCustomLeading(context), centerTitle: true, ); @@ -59,6 +59,7 @@ class _InviteDetailPageState extends State { width: Screen.width, child: Text( widget.opt.nickName, + textScaleFactor: 1.0, style: TextStyle(fontSize: 15), ), ); @@ -71,6 +72,7 @@ class _InviteDetailPageState extends State { I18n.of(context) .invite_members .replaceFirst('/s1', widget.originalList.length.toString()), + textScaleFactor: 1.0, style: TextStyle(fontSize: 15.5), ), ); @@ -117,6 +119,7 @@ class _InviteDetailPageState extends State { borderRadius: BorderRadius.all(Radius.circular(6))), child: Text( I18n.of(context).determine, + textScaleFactor: 1.0, style: TextStyle(color: Colors.white, fontSize: 16), ), ), @@ -160,6 +163,7 @@ class _InviteDetailPageState extends State { margin: EdgeInsets.only(top: 8.5), child: Text( username, + textScaleFactor: 1.0, style: TextStyle(fontSize: 10.3, color: Constants.GreyTextColor), ), ) diff --git a/lib/home/join_group_confirm.dart b/lib/home/join_group_confirm.dart index dc043d0..7f3cc7b 100644 --- a/lib/home/join_group_confirm.dart +++ b/lib/home/join_group_confirm.dart @@ -63,6 +63,7 @@ class _JoinGroupConfirmPageState extends State { width: Screen.width - 40, child: Text( widget.groupInfoModel.getGroupName(refMap), + textScaleFactor: 1.0, maxLines: 2, overflow: TextOverflow.ellipsis, style: TextStyle(fontSize: 15), @@ -76,6 +77,7 @@ class _JoinGroupConfirmPageState extends State { child: Text( I18n.of(context).total_members.replaceFirst( '/s1', widget.groupInfoModel.getMembersInGroup().length.toString()), + textScaleFactor: 1.0, style: TextStyle(fontSize: 15.5, color: const Color(0xFF6F6F6F)), ), ); @@ -120,6 +122,7 @@ class _JoinGroupConfirmPageState extends State { isInGroup ? I18n.of(context).joined : I18n.of(context).join_now, + textScaleFactor: 1.0, style: TextStyle(color: Colors.white, fontSize: 16), ), ), diff --git a/lib/home/last_chat_record_widget.dart b/lib/home/last_chat_record_widget.dart index b1e4e18..2a34c9e 100644 --- a/lib/home/last_chat_record_widget.dart +++ b/lib/home/last_chat_record_widget.dart @@ -173,11 +173,11 @@ class _LastChatPageState extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - fixedText('反馈助手', + fixedText(I18n.of(context).feedback_assistant, fontSize: 15, fontWeight: FontWeight.w500), SizedBox(height: 5), Text( - '你好,使用过程中遇到任何问题都可以告诉我哦!', + I18n.of(context).feedback_tips, textScaleFactor: 1.0, style: AppStyles.DescStyle, ), diff --git a/lib/home/money_detail.dart b/lib/home/money_detail.dart index 225bbe6..cf29229 100644 --- a/lib/home/money_detail.dart +++ b/lib/home/money_detail.dart @@ -82,8 +82,8 @@ class _ConversationItem extends StatelessWidget { return InkWell( child: Container( - padding: - const EdgeInsets.only(left: 21, top: 12.5, bottom: 12.5, right: 24.5), + padding: const EdgeInsets.only( + left: 21, top: 12.5, bottom: 12.5, right: 24.5), decoration: BoxDecoration( color: Color(AppColors.ConversationItemBgColor), border: Border( @@ -128,6 +128,7 @@ class _ConversationItem extends StatelessWidget { children: [ Text( '${money > 0 ? '+' : ''}${this.isInCome ? money * 1000 : (money.toString() + I18n.of(context).mask_coin)}', + textScaleFactor: 1.0, style: TextStyle( fontSize: 14, fontWeight: FontWeight.w500, @@ -139,6 +140,7 @@ class _ConversationItem extends StatelessWidget { padding: EdgeInsets.only(top: 3), child: Text( I18n.of(context).alreay_back, + textScaleFactor: 1.0, style: TextStyle( fontSize: 12, fontWeight: FontWeight.normal, diff --git a/lib/home/my_qr.dart b/lib/home/my_qr.dart index 03a4076..2d97a59 100644 --- a/lib/home/my_qr.dart +++ b/lib/home/my_qr.dart @@ -31,6 +31,7 @@ class MyQr extends StatelessWidget { padding: EdgeInsets.all(20), child: Text( I18n.of(context).scan_and_add, + textScaleFactor: 1.0, style: TextStyle(fontSize: 12.5), ), ) @@ -89,7 +90,7 @@ class MyQr extends StatelessWidget { children: [ Row( children: [ - Container( + Container( constraints: BoxConstraints(maxWidth: 170), child: Text(name, textScaleFactor: 1.0, diff --git a/lib/home/new_friends.dart b/lib/home/new_friends.dart index 9cb3f31..53faa8c 100644 --- a/lib/home/new_friends.dart +++ b/lib/home/new_friends.dart @@ -77,12 +77,17 @@ class _ContactItem extends StatelessWidget { children: [ _avatarIcon, SizedBox(width: 10.0), - Expanded(child: Text(title)), + Expanded( + child: Text( + title, + textScaleFactor: 1.0, + )), state == 1 ? Container( padding: EdgeInsets.symmetric(horizontal: 21, vertical: 7), child: Text( I18n.of(context).added, + textScaleFactor: 1.0, style: TextStyle(color: const Color(0xFF8A8B8B)), ), ) @@ -92,6 +97,7 @@ class _ContactItem extends StatelessWidget { EdgeInsets.symmetric(horizontal: 21, vertical: 7), child: Text( I18n.of(context).check, + textScaleFactor: 1.0, style: TextStyle(color: Constants.BlueTextColor), ), ) @@ -100,6 +106,7 @@ class _ContactItem extends StatelessWidget { EdgeInsets.symmetric(horizontal: 21, vertical: 7), child: Text( I18n.of(context).rejected, + textScaleFactor: 1.0, style: TextStyle(color: const Color(0xFF8A8B8B)), ), )), @@ -117,8 +124,11 @@ class _ContactItem extends StatelessWidget { padding: EdgeInsets.only(left: 16.0, right: 16.0), color: const Color(AppColors.ContactGroupTitleBgColor), alignment: Alignment.centerLeft, - child: - Text(this.groupTitle, style: AppStyles.GroupTitleItemTextStyle), + child: Text( + this.groupTitle, + style: AppStyles.GroupTitleItemTextStyle, + textScaleFactor: 1.0, + ), ), _button, ], @@ -292,8 +302,11 @@ class _NewFriendsPageState extends State { Radius.circular(Constants.IndexLetterBoxRadius)), ), child: Center( - child: - Text(_currentLetter, style: AppStyles.IndexLetterBoxTextStyle), + child: Text( + _currentLetter, + style: AppStyles.IndexLetterBoxTextStyle, + textScaleFactor: 1.0, + ), ), ), )); @@ -335,6 +348,14 @@ class _NewFriendsPageState extends State { decoration: InputDecoration( hintText: I18n.of(context).search, hintStyle: TextStyle(fontSize: 14.5), + contentPadding: EdgeInsets.only( + left: 20, + top: (UserData().language == LanguageType.English || + UserData().language == + LanguageType.Vietnamese) + ? 3 + : 10.5, + bottom: 10.5), prefixIcon: Icon( IconData( 0xe664, diff --git a/lib/home/qr_scanner_view.dart b/lib/home/qr_scanner_view.dart index 6bc8146..db61cc8 100644 --- a/lib/home/qr_scanner_view.dart +++ b/lib/home/qr_scanner_view.dart @@ -83,8 +83,8 @@ class _QrScannerPageState extends State }, ), backgroundColor: Colors.black, - title: - Text(I18n.of(context).scan, style: TextStyle(color: Colors.white)), + title: Text(I18n.of(context).scan, + textScaleFactor: 1.0, style: TextStyle(color: Colors.white)), centerTitle: true, ), backgroundColor: Colors.black.withOpacity(_animation.value), @@ -254,6 +254,7 @@ class _QrScannerPageState extends State SizedBox(height: 5), Text( iconName, + textScaleFactor: 1.0, style: TextStyle(color: Colors.white), ) ]))); diff --git a/lib/home/splash_page.dart b/lib/home/splash_page.dart index d0cbd85..e645a66 100644 --- a/lib/home/splash_page.dart +++ b/lib/home/splash_page.dart @@ -33,17 +33,25 @@ class SplashPageState extends State { void initState() { super.initState(); - list.add(SplashBean('assets/images/img_splash_1.png',I18n.of( Constants.getCurrentContext()).splash_tips1 , I18n.of( Constants.getCurrentContext()).splash_tips_content1, + list.add(SplashBean( + 'assets/images/img_splash_1.png', + I18n.of(Constants.getCurrentContext()).splash_tips1, + I18n.of(Constants.getCurrentContext()).splash_tips_content1, Color(0xffEC527D))); - list.add(SplashBean('assets/images/img_splash_2.png', I18n.of( Constants.getCurrentContext()).splash_tips2, I18n.of( Constants.getCurrentContext()).splash_tips_content2, + list.add(SplashBean( + 'assets/images/img_splash_2.png', + I18n.of(Constants.getCurrentContext()).splash_tips2, + I18n.of(Constants.getCurrentContext()).splash_tips_content2, Color(0xffB439EB))); - list.add(SplashBean('assets/images/img_splash_3.png', I18n.of( Constants.getCurrentContext()).splash_tips3, I18n.of( Constants.getCurrentContext()).splash_tips_content3, + list.add(SplashBean( + 'assets/images/img_splash_3.png', + I18n.of(Constants.getCurrentContext()).splash_tips3, + I18n.of(Constants.getCurrentContext()).splash_tips_content3, Color(0xff2B79F7))); pageController = PageController( initialPage: 0, ); - } @override @@ -72,24 +80,34 @@ class SplashPageState extends State { Expanded(child: Container()), currentIndex != 2 ? getIndicator() : Container(), currentIndex == 2 - ? InkWell(onTap: ()async{ - await SPUtils.saveBool(Constants.Splash_OPENED, true); - Navigator.of(context).push( - MaterialPageRoute( - builder: (_) => IndexPage(), - ), - ); - - },child: Padding( - padding: EdgeInsets.only(bottom: 40), - child: Container( - padding: EdgeInsets.only(left: 16,right: 16,top: 5,bottom: 5), - decoration: BoxDecoration( - border: Border.all( - color: Color(0xff2B79F7), width: 1),borderRadius: BorderRadius.circular(16)), - child: Text(I18n.of(context).splash_go,style: TextStyle(fontSize: 18,color: Color(0xff2B79F7)),), - ), - ),) + ? InkWell( + onTap: () async { + await SPUtils.saveBool( + Constants.Splash_OPENED, true); + Navigator.of(context).push( + MaterialPageRoute( + builder: (_) => IndexPage(), + ), + ); + }, + child: Padding( + padding: EdgeInsets.only(bottom: 40), + child: Container( + padding: EdgeInsets.only( + left: 16, right: 16, top: 5, bottom: 5), + decoration: BoxDecoration( + border: Border.all( + color: Color(0xff2B79F7), width: 1), + borderRadius: BorderRadius.circular(16)), + child: Text( + I18n.of(context).splash_go, + textScaleFactor: 1.0, + style: TextStyle( + fontSize: 18, color: Color(0xff2B79F7)), + ), + ), + ), + ) : Container(), ], ), @@ -142,10 +160,14 @@ class SplashPageState extends State { ), Text( data.title, + textScaleFactor: 1.0, style: TextStyle(color: data.titleColor, fontSize: 30), ), - SizedBox(height: 6,), + SizedBox( + height: 6, + ), Text(data.content, + textScaleFactor: 1.0, style: TextStyle(color: Color(0xff999999), fontSize: 15)), ], ), diff --git a/lib/main.dart b/lib/main.dart index 5733e1a..a2d1973 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -115,6 +115,7 @@ void setCustomErrorPage(BuildContext context) { margin: EdgeInsets.only(top: ScreenUtil().setHeight(50)), child: Text( I18n.of(Constants.getCurrentContext()).server_error_tips, + textScaleFactor: 1.0, style: TextStyle(color: Color(0xFF8F8E8E), fontSize: 18), ), ), diff --git a/lib/map/google_map_location_picker.dart b/lib/map/google_map_location_picker.dart index 4d93602..4c9da1e 100644 --- a/lib/map/google_map_location_picker.dart +++ b/lib/map/google_map_location_picker.dart @@ -139,6 +139,7 @@ class LocationPickerState extends State { Expanded( child: Text( "${I18n.of(context).finding_place}...", + textScaleFactor: 1.0, style: TextStyle( fontSize: 16, ), diff --git a/lib/map/map.dart b/lib/map/map.dart index 7e391ac..195c815 100644 --- a/lib/map/map.dart +++ b/lib/map/map.dart @@ -168,6 +168,7 @@ class MapPickerState extends State { children: [ Text( address ?? 'Unnamed place', + textScaleFactor: 1.0, style: TextStyle( fontSize: 18, ), diff --git a/lib/map/map_view.dart b/lib/map/map_view.dart index 2b5e881..a398871 100644 --- a/lib/map/map_view.dart +++ b/lib/map/map_view.dart @@ -98,7 +98,6 @@ class MapViewState extends State { } Future reverseGeocodeLatLng(LatLng latLng) async { - /* var placeMarks = await Geolocator() .placemarkFromCoordinates(latLng.latitude, latLng.longitude); @@ -114,7 +113,6 @@ class MapViewState extends State { }); */ - var response = await http.get( "https://maps.googleapis.com/maps/api/geocode/json?latlng=${latLng.latitude},${latLng.longitude}" "&key=$googleMapApiKey"); @@ -123,10 +121,9 @@ class MapViewState extends State { Map responseJson = jsonDecode(response.body); setState(() { - address = responseJson['results'][0]['formatted_address']; + address = responseJson['results'][0]['formatted_address']; }); } - } Set _createMarker() { @@ -175,6 +172,7 @@ class MapViewState extends State { children: [ Text( address ?? '', + textScaleFactor: 1.0, style: TextStyle( fontSize: 18, ), @@ -237,7 +235,7 @@ class MapViewState extends State { width: double.infinity, color: Colors.white, child: FlatButton( - child: Text(getMapName(mapList[i])), + child: Text(getMapName(mapList[i]), textScaleFactor: 1.0,), onPressed: () { print('跳转到其他地图'); ScreenShot.openMapForOth( diff --git a/lib/models/friends_info.dart b/lib/models/friends_info.dart index 2a4d0be..0c8c03f 100644 --- a/lib/models/friends_info.dart +++ b/lib/models/friends_info.dart @@ -85,6 +85,7 @@ class FriendsInfo extends StatelessWidget { child: Container( child: Text( title, + textScaleFactor: 1.0, overflow: TextOverflow.ellipsis, ))) ], @@ -166,8 +167,8 @@ class FriendsInfo extends StatelessWidget { padding: EdgeInsets.only(left: 16.0, right: 16.0), color: const Color(AppColors.ContactGroupTitleBgColor), alignment: Alignment.centerLeft, - child: - Text(this.groupTitle, style: AppStyles.GroupTitleItemTextStyle), + child: Text(this.groupTitle, + textScaleFactor: 1.0, style: AppStyles.GroupTitleItemTextStyle), ), _button, ], diff --git a/lib/utils/CustomUI.dart b/lib/utils/CustomUI.dart index b67942c..9d08836 100644 --- a/lib/utils/CustomUI.dart +++ b/lib/utils/CustomUI.dart @@ -256,7 +256,7 @@ class CustomUI { style: TextStyle( fontSize: 14, color: Constants.BlackTextColor, height: 1.30), - //textAlign: TextAlign.center, + textAlign: TextAlign.center, )); }