diff --git a/lib/address/city_picker_page.dart b/lib/address/city_picker_page.dart index 77dba9b1..de7efdbe 100644 --- a/lib/address/city_picker_page.dart +++ b/lib/address/city_picker_page.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -56,7 +57,7 @@ class _CityPickerPage extends State { style: TextStyle( fontSize: 12.sp, color: Colors.black, - fontWeight: FontWeight.w400), + fontWeight: MyFontWeight.regular), ), ), ), diff --git a/lib/home/founder_story_page.dart b/lib/home/founder_story_page.dart index cc097ab5..4bf81f59 100644 --- a/lib/home/founder_story_page.dart +++ b/lib/home/founder_story_page.dart @@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/MyPainter.dart'; +import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/separator.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -74,7 +75,7 @@ class _FounderStoryPage extends State { style: TextStyle( color: Color(0xFF1A1A1A), fontSize: 12.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, height: 1.5), )), Padding( @@ -102,7 +103,7 @@ class _FounderStoryPage extends State { style: TextStyle( color: Color(0xFF1A1A1A), fontSize: 12.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, height: 1.5.h), )), Image.asset( @@ -131,7 +132,7 @@ class _FounderStoryPage extends State { Text("回乡之路", style: TextStyle( fontSize: 24.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Color(0xff565656))), SizedBox( height: 20, @@ -148,7 +149,7 @@ class _FounderStoryPage extends State { child: Text("…", style: TextStyle( fontSize: 16.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Color(0xff565656))), ), _textWidget("2019年,在武汉成立湖北海峡姐妹餐饮有限公司。" @@ -168,7 +169,7 @@ class _FounderStoryPage extends State { Text("早期团队", style: TextStyle( fontSize: 24.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Color(0xff565656))), SizedBox( height: 26.h, @@ -216,7 +217,7 @@ class _FounderStoryPage extends State { style: TextStyle( color: Colors.white, fontSize: 12.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, height: 1.5.h), )), ), @@ -236,7 +237,7 @@ class _FounderStoryPage extends State { Text("传递理念", style: TextStyle( fontSize: 24.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Color(0xff565656))), SizedBox( height: 20.h, @@ -391,7 +392,7 @@ class _FounderStoryPage extends State { child: Text(text, style: TextStyle( fontSize: 12.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Colors.black))), ], ), @@ -420,7 +421,7 @@ class _FounderStoryPage extends State { text, style: TextStyle( fontSize: 18.sp, - fontWeight: FontWeight.w300, + fontWeight: MyFontWeight.light, color: Colors.white), ) ], diff --git a/lib/home/guide_page.dart b/lib/home/guide_page.dart index 7cdb1524..b3bd3870 100644 --- a/lib/home/guide_page.dart +++ b/lib/home/guide_page.dart @@ -1,6 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -74,7 +75,7 @@ class _GuidePage extends State { style: TextStyle( fontSize: 16.sp, height: 1.5.h, - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, color: Color(0XFF727272), ), ), @@ -162,7 +163,7 @@ class _GuidePage extends State { style: TextStyle( fontSize: 16.sp, height: 1.5.h, - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, color: Color(0XFF727272)), ), ), @@ -249,7 +250,7 @@ class _GuidePage extends State { style: TextStyle( fontSize: 16.sp, height: 1.5.h, - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, color: Color(0XFF727272)), ), ), @@ -332,7 +333,7 @@ class _GuidePage extends State { style: TextStyle( fontSize: 16.sp, height: 1.5.h, - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, color: Color(0XFF727272)), ), ), @@ -353,7 +354,7 @@ class _GuidePage extends State { padding: EdgeInsets.all(5), text: S.of(context).lijitiyan, fontSize: 20.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, textColor: Color(0xFF32A060), borderColor: Color(0xFF32A060), borderWidth: 1.w, diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index f82adf5f..24031271 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -16,6 +16,7 @@ import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/flutter_utils.dart'; +import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/custom_image.dart'; @@ -81,8 +82,8 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { EasyLoading.show(status: S.of(context).zhengzaijiazai); final SharedPreferences value = await SharedPreferences.getInstance(); - apiService = ApiService(Dio(), context: context, - token: value.getString('token'), showLoading: false); + apiService = ApiService(Dio(), + context: context, token: value.getString('token'), showLoading: false); BaseData> baseData = await apiService.queryBanner({ "model": {"type": "HOME_PAGE"}, @@ -180,7 +181,8 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { value.getString('token') == "") { loginTips(); } else { - Navigator.of(context).pushNamed('/router/integral_page'); + Navigator.of(context) + .pushNamed('/router/integral_page'); } }); }, @@ -192,7 +194,8 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { value.getString('token') == "") { loginTips(); } else { - Navigator.of(context).pushNamed('/router/integral_page'); + Navigator.of(context) + .pushNamed('/router/integral_page'); } }); }, @@ -206,7 +209,8 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { imgPath: "assets/image/icon_today_video.png", moreText: S.of(context).chakangengduo, onTap: () { - Navigator.of(context).pushNamed('/router/hot_article_page'); + Navigator.of(context) + .pushNamed('/router/hot_article_page'); }, ), hotList(), @@ -216,7 +220,8 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { ), GestureDetector( onTap: () { - Navigator.of(context).pushNamed('/router/founder_story_page'); + Navigator.of(context) + .pushNamed('/router/founder_story_page'); }, child: founderStore(), ), @@ -407,7 +412,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { S.of(context).chakanxiangqing, style: TextStyle( fontSize: 10.sp, - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, color: Colors.white, ), ), @@ -501,7 +506,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { overflow: TextOverflow.ellipsis, style: TextStyle( color: Color(0xff353535), - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, fontSize: 14.sp, ), ), @@ -527,7 +532,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { style: TextStyle( color: Color(0xFF727272), fontSize: 12.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, ), ), ], @@ -576,7 +581,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { style: TextStyle( color: Colors.black, fontSize: 14.sp, - fontWeight: FontWeight.w400), + fontWeight: MyFontWeight.regular), ), ], ), @@ -585,7 +590,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { style: TextStyle( color: Color(0xFF727272), fontSize: 12.sp, - fontWeight: FontWeight.w400), + fontWeight: MyFontWeight.regular), ), ], ), diff --git a/lib/home/huixiang_brand_page.dart b/lib/home/huixiang_brand_page.dart index 7b5877bc..cf2aa446 100644 --- a/lib/home/huixiang_brand_page.dart +++ b/lib/home/huixiang_brand_page.dart @@ -17,6 +17,7 @@ import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/MyPainter.dart'; import 'package:huixiang/utils/event_type.dart'; +import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -445,7 +446,7 @@ class _BrandPage extends State text, style: TextStyle( fontSize: 18, - fontWeight: FontWeight.w300, + fontWeight: MyFontWeight.light, color: Colors.white), ) ], @@ -558,7 +559,7 @@ class _BrandPage extends State key, style: TextStyle( fontSize: 16.sp, - fontWeight: FontWeight.w300, + fontWeight: MyFontWeight.light, color: Colors.white, ), ), diff --git a/lib/home/points_mall_page.dart b/lib/home/points_mall_page.dart index f0472dbd..1990fb52 100644 --- a/lib/home/points_mall_page.dart +++ b/lib/home/points_mall_page.dart @@ -17,6 +17,7 @@ import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/flutter_utils.dart'; +import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/item_title.dart'; @@ -208,7 +209,7 @@ class _PointsMallPage extends State e, style: TextStyle( fontSize: 12.sp, - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, color: Color(0xff353535)), ), ), @@ -231,7 +232,7 @@ class _PointsMallPage extends State fontSize: 14.sp, fontWeight: FontWeight.bold), unselectedLabelStyle: TextStyle( fontSize: 14.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, ), // controller: tabController, //未选中文字颜色 @@ -371,7 +372,7 @@ class _PointsMallPage extends State overflow: TextOverflow.ellipsis, style: TextStyle( color: Color(0xff353535), - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, fontSize: 16.sp, ), ), @@ -386,7 +387,7 @@ class _PointsMallPage extends State overflow: TextOverflow.ellipsis, style: TextStyle( color: Color(0xFF727272), - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, fontSize: 12.sp, ), ), @@ -405,7 +406,7 @@ class _PointsMallPage extends State color: Color(0xFF585858), decoration: TextDecoration.lineThrough, decorationColor: Color(0xFF585858), - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, fontSize: 12.sp, ), ), @@ -485,7 +486,7 @@ class _PointsMallPage extends State S.of(context).denglu, style: TextStyle( fontSize: 16.sp, - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, color: Color(0xFF353535)), ) : Row( @@ -494,7 +495,7 @@ class _PointsMallPage extends State userinfo.nickname, style: TextStyle( fontSize: 16.sp, - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, color: Color(0xFF353535)), ), SizedBox( @@ -515,7 +516,7 @@ class _PointsMallPage extends State S.of(context).weidengluxinxi, style: TextStyle( fontSize: 12.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Color(0xFF2F2F2F), ), ) @@ -523,7 +524,7 @@ class _PointsMallPage extends State userinfo == null ? "" : "NO.${userinfo.vipNo}", style: TextStyle( fontSize: 12.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Color(0xFF2F2F2F), ), ), @@ -549,7 +550,7 @@ class _PointsMallPage extends State S.of(context).yiyoujifen, style: TextStyle( fontSize: 12.sp, - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, color: Color(0xFF4C4C4C), ), ), diff --git a/lib/integral/integral_detailed_page.dart b/lib/integral/integral_detailed_page.dart index 2fdaeeeb..2e1045b2 100644 --- a/lib/integral/integral_detailed_page.dart +++ b/lib/integral/integral_detailed_page.dart @@ -8,6 +8,7 @@ import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/data/user_bill.dart'; import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/my_tab.dart'; @@ -163,7 +164,7 @@ class _IntegralDetailedPage extends State userInfo != null ? userInfo.points : "0", style: TextStyle( color: Colors.white, - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, fontSize: 48.sp), ), Text( @@ -171,7 +172,7 @@ class _IntegralDetailedPage extends State style: TextStyle( color: Color(0xFFF2F2F2), fontSize: 12.sp, - fontWeight: FontWeight.w400), + fontWeight: MyFontWeight.regular), ), ], ), @@ -187,9 +188,9 @@ class _IntegralDetailedPage extends State indicatorSize: TabBarIndicatorSize.label, labelColor: Colors.white, labelStyle: - TextStyle(fontSize: 16.sp, fontWeight: FontWeight.w500), + TextStyle(fontSize: 16.sp, fontWeight: MyFontWeight.medium), unselectedLabelStyle: - TextStyle(fontSize: 16.sp, fontWeight: FontWeight.w500), + TextStyle(fontSize: 16.sp,fontWeight: MyFontWeight.medium), indicatorColor: Colors.white, unselectedLabelColor: Color(0xFFE6E6E6), ), @@ -262,7 +263,7 @@ class _IntegralDetailedPage extends State style: TextStyle( color: Color(0xFF727272), fontSize: 10.sp, - fontWeight: FontWeight.w400), + fontWeight: MyFontWeight.regular), ) ], ), @@ -274,7 +275,7 @@ class _IntegralDetailedPage extends State style: TextStyle( color: Color(0xFF727272), fontSize: 12.sp, - fontWeight: FontWeight.w400), + fontWeight: MyFontWeight.regular), ), ) ], diff --git a/lib/integral/integral_page.dart b/lib/integral/integral_page.dart index 5efc1967..52e84226 100644 --- a/lib/integral/integral_page.dart +++ b/lib/integral/integral_page.dart @@ -12,6 +12,7 @@ import 'package:huixiang/retrofit/data/sign_info.dart'; import 'package:huixiang/retrofit/data/task.dart'; import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; @@ -156,7 +157,7 @@ class _IntegralPage extends State { S.of(context).zuorenwudejifen, style: TextStyle( color: Color(0xFF353535), - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, fontSize: 16.sp, ), ), @@ -250,7 +251,7 @@ class _IntegralPage extends State { task.name, style: TextStyle( fontSize: 14.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Color(0xFF353535), ), ), @@ -263,7 +264,7 @@ class _IntegralPage extends State { "+${double.tryParse(task.rewardValue).toInt()}", style: TextStyle( fontSize: 12.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Color(0xFF727272), ), ), @@ -275,7 +276,7 @@ class _IntegralPage extends State { "${task.complateNum ?? task.conplateNum}/${task.limitDay}"), style: TextStyle( fontSize: 12.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Color(0xFF727272), ), ), @@ -324,7 +325,7 @@ class _IntegralPage extends State { style: TextStyle( color: Color(0xFF353535), fontSize: 14.sp, - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, ), ), SizedBox( @@ -380,7 +381,7 @@ class _IntegralPage extends State { ? Colors.white : Color(0xFF353535), fontSize: 14.sp, - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, ), ), Container( @@ -409,7 +410,7 @@ class _IntegralPage extends State { ? Colors.white : Color(0xFF727272), fontSize: 12.sp, - fontWeight: FontWeight.w400), + fontWeight: MyFontWeight.regular), ), ), ], @@ -443,7 +444,7 @@ class _IntegralPage extends State { Text( S.of(context).qiandaolingjifen, style: TextStyle( - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, fontSize: 16.sp, color: Color(0xFF353535), ), @@ -454,7 +455,7 @@ class _IntegralPage extends State { Text( S.of(context).lianxuqiandaolingqushuangbeijifen, style: TextStyle( - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, fontSize: 11.sp, color: Color(0xFF727272), ), @@ -492,7 +493,7 @@ class _IntegralPage extends State { ? Colors.grey : Color(0xFF32A060), fontSize: 16.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, padding: EdgeInsets.fromLTRB(16.w, 6.h, 16.w, 6.h), radius: 4, ), @@ -537,7 +538,7 @@ class _IntegralPage extends State { Text( signInfo != null ? "${signInfo.point}" : "0", style: TextStyle( - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, fontSize: 21.sp, color: Colors.white, ), @@ -549,7 +550,7 @@ class _IntegralPage extends State { S.of(context).wodejifenzhi, style: TextStyle( fontSize: 12.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Color(0xFFF2F2F2), ), ) @@ -589,7 +590,7 @@ class _IntegralPage extends State { ? "${signInfo.rank.rankName.replaceAll("会员", "")}" : "", style: TextStyle( - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, fontSize: 21.sp, color: Colors.white, ), @@ -605,7 +606,7 @@ class _IntegralPage extends State { S.of(context).wodehuiyuandengji, style: TextStyle( fontSize: 12.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Color(0xFFF2F2F2), ), ), diff --git a/lib/integral_store/integral_store_details_page.dart b/lib/integral_store/integral_store_details_page.dart index 2796c722..349101ae 100644 --- a/lib/integral_store/integral_store_details_page.dart +++ b/lib/integral_store/integral_store_details_page.dart @@ -10,6 +10,7 @@ import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/goods.dart'; import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -50,7 +51,8 @@ class _IntegralStoreDetailsPage extends State { Goods goods; queryGoodsById() async { - BaseData baseData = await apiService.creditGoodsById(arguments["goodsId"]); + BaseData baseData = + await apiService.creditGoodsById(arguments["goodsId"]); if (baseData != null && baseData.isSuccess) { setState(() { goods = baseData.data; @@ -224,7 +226,7 @@ class _IntegralStoreDetailsPage extends State { : S.of(context).yiduihuanjian("${goods.sales}"), style: TextStyle( fontSize: 10.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Color(0xFFA29E9E), ), ), @@ -242,7 +244,7 @@ class _IntegralStoreDetailsPage extends State { goods == null ? "" : goods.description, style: TextStyle( fontSize: 12.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Color(0xFF727272), ), ),