Browse Source

UI修改

dart3_last
fff 2 weeks ago
parent
commit
e661c02314
  1. 2
      lib/community/community_course.dart
  2. 3
      lib/community/order_page.dart
  3. 29
      lib/home/help_farmers/help_farmers_page.dart
  4. 26
      lib/home/points_mall_page.dart
  5. 74
      lib/home/welfare_exchange.dart
  6. 73
      lib/home/welfare_page.dart
  7. 23
      lib/im/chat_friend_group.dart
  8. 3
      lib/im/contact_share.dart
  9. 45
      lib/im/im_view/friend_groip_list.dart
  10. 19
      lib/mine/mine_page.dart
  11. 20
      lib/mine/mine_view/calendar_page.dart
  12. 6
      lib/mine/mine_view/community_follow.dart
  13. 33
      lib/mine/mine_view/mine_calendar.dart
  14. 6
      lib/mine/mine_view/mine_item.dart
  15. 52
      lib/mine/mine_view/mine_navbar.dart
  16. 10
      lib/mine/mine_view/mine_order.dart
  17. 2
      lib/mine/mine_wallet_page.dart
  18. 50
      lib/order/order_history_page.dart
  19. 425
      lib/qr/invite_friends.dart

2
lib/community/community_course.dart

@ -221,7 +221,7 @@ class _CommunityCourse extends State<CommunityCourse>
bannerData, bannerData,
), ),
SizedBox(height: 28.h), SizedBox(height: 18.h),
/// ///
HomeClass( HomeClass(

3
lib/community/order_page.dart

@ -12,8 +12,7 @@ class OrderPage extends StatefulWidget {
} }
} }
class _OrderPage extends State<OrderPage> class _OrderPage extends State<OrderPage> with SingleTickerProviderStateMixin,AutomaticKeepAliveClientMixin {
with SingleTickerProviderStateMixin,AutomaticKeepAliveClientMixin {
TabController? tabcontroller; TabController? tabcontroller;
List<String> lables = [ List<String> lables = [

29
lib/home/help_farmers/help_farmers_page.dart

@ -52,8 +52,6 @@ class _HelpFarmersPage extends State<HelpFarmersPage> {
try { try {
BaseListData<Farmers>? baseData = BaseListData<Farmers>? baseData =
await apiService?.getConfig().catchError((error) { await apiService?.getConfig().catchError((error) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);
networkStatus = -1; networkStatus = -1;
refreshController.refreshFailed(); refreshController.refreshFailed();
return BaseListData<Farmers>()..isSuccess = false; return BaseListData<Farmers>()..isSuccess = false;
@ -79,6 +77,30 @@ class _HelpFarmersPage extends State<HelpFarmersPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: networkStatus == 2
? AppBar(
backgroundColor: Color(0xFF32A060),
leading: InkWell(
child: Icon(
Icons.arrow_back,
color: Colors.white,
),
onTap: () {
Navigator.of(context).pop();
},
),
title: Text(
S.of(context).zhunongzhuanqu,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 17.sp,
color: Colors.white,
),
),
centerTitle: true,
elevation: 0,
)
: null,
body: networkStatus == 0 body: networkStatus == 0
? recommendSm() ? recommendSm()
: (networkStatus == 2 : (networkStatus == 2
@ -91,7 +113,8 @@ class _HelpFarmersPage extends State<HelpFarmersPage> {
fontSize: 16.sp, fontSize: 16.sp,
margin: margin:
EdgeInsets.only(top: 120.h, left: 60.w, right: 60.w), EdgeInsets.only(top: 120.h, left: 60.w, right: 60.w),
)) ),
)
: NestedScrollView( : NestedScrollView(
headerSliverBuilder: (context, inner) { headerSliverBuilder: (context, inner) {
return [ return [

26
lib/home/points_mall_page.dart

@ -71,18 +71,16 @@ class _PointsMallPage extends State<PointsMallPage>
BaseData<PageInfo<BannerData>>? banner = await client?.queryBanner({ BaseData<PageInfo<BannerData>>? banner = await client?.queryBanner({
"model": {"type": "CREDIT_INDEX"}, "model": {"type": "CREDIT_INDEX"},
}).catchError((onError) { }).catchError((onError) {
return Future.value(null); return BaseData<PageInfo<BannerData>>()..isSuccess = false;
}); });
if ((banner?.isSuccess ?? false) && if ((banner?.isSuccess ?? false) && (banner?.data?.records?.isNotEmpty ?? false)) {
(banner?.data?.records?.isNotEmpty ?? false)) {
bannerData.clear(); bannerData.clear();
bannerData.addAll(banner?.data?.records ?? []); bannerData.addAll(banner?.data?.records ?? []);
} }
BaseData<UserInfo>? baseData = BaseData<UserInfo>? baseData = await client?.queryInfo().catchError((onError) {
await client?.queryInfo().catchError((onError) { return BaseData<UserInfo>()..isSuccess = false;
return Future.value(null);
}); });
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
userInfo = baseData!.data; userInfo = baseData!.data;
@ -98,13 +96,11 @@ class _PointsMallPage extends State<PointsMallPage>
); );
final SharedPreferences value = await SharedPreferences.getInstance(); final SharedPreferences value = await SharedPreferences.getInstance();
client = ApiService(Dio(), client = ApiService(Dio(), context: context, token: value.getString('token'), showLoading: false);
context: context, token: value.getString('token'), showLoading: false);
await queryUser(); await queryUser();
BaseData<PageInfo<GoodsCategory>>? dataCategory = BaseData<PageInfo<GoodsCategory>>? dataCategory = await client?.goodsCategory({
await client?.goodsCategory({
"current": 1, "current": 1,
"map": {}, "map": {},
"model": {"pageNum": 1, "pageSize": 20, "searchKey": ""}, "model": {"pageNum": 1, "pageSize": 20, "searchKey": ""},
@ -114,11 +110,10 @@ class _PointsMallPage extends State<PointsMallPage>
}).catchError((onError) { }).catchError((onError) {
_refreshController.loadFailed(); _refreshController.loadFailed();
_refreshController.refreshFailed(); _refreshController.refreshFailed();
return Future.value(null); return BaseData<PageInfo<GoodsCategory>>()..isSuccess = false;
}); });
if ((dataCategory?.isSuccess ?? false) && if ((dataCategory?.isSuccess ?? false) && (dataCategory?.data?.records?.isNotEmpty ?? false)) {
(dataCategory?.data?.records?.isNotEmpty ?? false)) {
gooodsCategorys.clear(); gooodsCategorys.clear();
gooodsCategorys.add(GoodsCategory()..name = S.of(context).quanbu); gooodsCategorys.add(GoodsCategory()..name = S.of(context).quanbu);
gooodsCategorys.addAll(dataCategory?.data?.records ?? []); gooodsCategorys.addAll(dataCategory?.data?.records ?? []);
@ -132,11 +127,10 @@ class _PointsMallPage extends State<PointsMallPage>
"pageSize": 10, "pageSize": 10,
"state": 1 "state": 1
}; };
BaseData<PageInfo<Goods>>? baseData = BaseData<PageInfo<Goods>>? baseData = await client?.creditGoods(param).catchError((onError) {
await client?.creditGoods(param).catchError((onError) {
_refreshController.loadFailed(); _refreshController.loadFailed();
_refreshController.refreshFailed(); _refreshController.refreshFailed();
return Future.value(null); return BaseData<PageInfo<Goods>>()..isSuccess = false;
}); });
SmartDialog.dismiss(); SmartDialog.dismiss();
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {

74
lib/home/welfare_exchange.dart

@ -66,7 +66,7 @@ class _WelfareExchange extends State<WelfareExchange>
queryUser() async { queryUser() async {
BaseData<UserInfo>? baseData = BaseData<UserInfo>? baseData =
await apiService?.queryInfo().catchError((onError) { await apiService?.queryInfo().catchError((onError) {
return Future.value(null); return BaseData<UserInfo>()..isSuccess = false;
}); });
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
userInfo = baseData!.data; userInfo = baseData!.data;
@ -99,7 +99,7 @@ class _WelfareExchange extends State<WelfareExchange>
"state": 1 "state": 1
}).catchError((onError) { }).catchError((onError) {
refreshController.refreshFailed(); refreshController.refreshFailed();
return Future.value(null); return BaseData<PageInfo<Goods>>()..isSuccess = false;
}); });
if (goodsData?.isSuccess ?? false) { if (goodsData?.isSuccess ?? false) {
gooods.clear(); gooods.clear();
@ -117,7 +117,7 @@ class _WelfareExchange extends State<WelfareExchange>
}).catchError((onError) { }).catchError((onError) {
refreshController.loadFailed(); refreshController.loadFailed();
refreshController.refreshFailed(); refreshController.refreshFailed();
return Future.value(null); return BaseData<PageInfo<GoodsCategory>>()..isSuccess = false;
}); });
if ((dataCategory?.isSuccess ?? false) && if ((dataCategory?.isSuccess ?? false) &&
@ -139,7 +139,7 @@ class _WelfareExchange extends State<WelfareExchange>
await apiService?.creditGoods(param).catchError((onError) { await apiService?.creditGoods(param).catchError((onError) {
refreshController.loadFailed(); refreshController.loadFailed();
refreshController.refreshFailed(); refreshController.refreshFailed();
return Future.value(null); return BaseData<PageInfo<Goods>>()..isSuccess = false;
}); });
if (pageGoods?.isSuccess ?? false) { if (pageGoods?.isSuccess ?? false) {
if (pageNum == 1) { if (pageNum == 1) {
@ -169,6 +169,7 @@ class _WelfareExchange extends State<WelfareExchange>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context);
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
body: NestedScrollView( body: NestedScrollView(
@ -176,12 +177,14 @@ class _WelfareExchange extends State<WelfareExchange>
return [ return [
SliverAppBar( SliverAppBar(
pinned: true, pinned: true,
backgroundColor: Colors.white, backgroundColor: Color(0xFF277D4B),
elevation: 0, elevation: 0,
title: Text( title: Text(
S.of(context).fuliduihuan, S.of(context).fuliduihuan,
style: style: TextStyle(
TextStyle(fontWeight: FontWeight.w500, color: Colors.white), fontWeight: FontWeight.w500,
color: Colors.white,
),
), ),
centerTitle: true, centerTitle: true,
leading: GestureDetector( leading: GestureDetector(
@ -199,14 +202,22 @@ class _WelfareExchange extends State<WelfareExchange>
), ),
), ),
), ),
toolbarHeight: kToolbarHeight,
collapsedHeight: kToolbarHeight + MediaQuery.of(context).padding.top,
flexibleSpace: FlexibleSpaceBar( flexibleSpace: FlexibleSpaceBar(
background: Stack( background: Stack(
children: [ children: [
Container( Positioned.fill(
top: kToolbarHeight + MediaQuery.of(context).padding.top,
child: Container(
// padding: EdgeInsets.only(top: 40.h), // padding: EdgeInsets.only(top: 40.h),
height: 172.h, height: 172.h - (kToolbarHeight + MediaQuery.of(context).padding.top),
decoration: BoxDecoration(
color: Colors.white,
),
padding: EdgeInsets.only(bottom: 75.h),
child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
// border: Border.all(color: Colors.white,width: 0.5),
color: Color(0xFF277D4B), color: Color(0xFF277D4B),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@ -215,19 +226,21 @@ class _WelfareExchange extends State<WelfareExchange>
), ),
), ),
), ),
),
),
Container( Container(
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
margin: EdgeInsets.only(top: 110.h), margin: EdgeInsets.only(top: 110.h),
child: pointUser(), child: pointUser(),
), ),
], ],
)), ),
expandedHeight: ),
MediaQuery.of(context).size.height >= 750 ? 245.h : 258.h, expandedHeight: MediaQuery.of(context).size.height >= 750 ? 245.h : 258.h,
bottom: PreferredSize( bottom: PreferredSize(
preferredSize: Size(double.infinity, 0), preferredSize: Size(double.infinity, 0),
child: DefaultTabController( child: DefaultTabController(
length: gooodsCategorys == null ? 0 : gooodsCategorys.length, length: gooodsCategorys.length,
child: Container( child: Container(
color: Colors.white, color: Colors.white,
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
@ -251,10 +264,7 @@ class _WelfareExchange extends State<WelfareExchange>
unselectedLabelColor: Color(0xff4D4D4D), unselectedLabelColor: Color(0xff4D4D4D),
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
// //
tabs: gooodsCategorys tabs: gooodsCategorys.map((e) => MyTab(text: "${e.name}")).toList(),
?.map((e) => MyTab(text: "${e.name}"))
.toList() ??
[],
onTap: (index) { onTap: (index) {
categoryId = gooodsCategorys[index].id; categoryId = gooodsCategorys[index].id;
pageNum = 1; pageNum = 1;
@ -281,9 +291,9 @@ class _WelfareExchange extends State<WelfareExchange>
onRefresh: _onRefresh, onRefresh: _onRefresh,
child: Container( child: Container(
color: Colors.white, color: Colors.white,
padding: EdgeInsets.only(top: 15.h),
child: pointList(), child: pointList(),
)), ),
),
), ),
); );
} }
@ -299,8 +309,9 @@ class _WelfareExchange extends State<WelfareExchange>
offset: Offset(0, 1), offset: Offset(0, 1),
blurRadius: 8, blurRadius: 8,
spreadRadius: 0, spreadRadius: 0,
) ),
]), ],
),
margin: EdgeInsets.all(16), margin: EdgeInsets.all(16),
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),
child: Row( child: Row(
@ -352,9 +363,7 @@ class _WelfareExchange extends State<WelfareExchange>
), ),
) )
: Text( : Text(
userInfo == null userInfo == null ? "" : AppUtils.phoneEncode(userInfo?.phone ?? ""),
? ""
: AppUtils.phoneEncode(userInfo?.phone ?? ""),
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
@ -469,11 +478,11 @@ class _WelfareExchange extends State<WelfareExchange>
), ),
) )
: GridView.builder( : GridView.builder(
itemCount: goods?.length ?? 0, itemCount: goods.length,
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 16.w, left: 12.w,
right: 16.w, right: 12.w,
top: 18.h, top: 16.h,
bottom: 16.h, bottom: 16.h,
), ),
shrinkWrap: true, shrinkWrap: true,
@ -482,12 +491,11 @@ class _WelfareExchange extends State<WelfareExchange>
//Widget数量 //Widget数量
crossAxisCount: 2, crossAxisCount: 2,
//Widget之间间距 //Widget之间间距
crossAxisSpacing: 11.w, crossAxisSpacing: 12.w,
//Widget之间间距 //Widget之间间距
mainAxisSpacing: 16.w, mainAxisSpacing: 12.w,
//Widget宽高比例 0.59 //Widget宽高比例 0.59
childAspectRatio: childAspectRatio: 200 / (285 / 2 + (285 / 2) * AppUtils.textScale(context)),
200 / (285 / 2 + (285 / 2) * AppUtils.textScale(context)),
), ),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return GestureDetector( return GestureDetector(

73
lib/home/welfare_page.dart

@ -4,6 +4,8 @@ import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:flutter_swiper_view/flutter_swiper_view.dart'; import 'package:flutter_swiper_view/flutter_swiper_view.dart';
import 'package:get/get.dart';
import 'package:get/utils.dart';
import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/data/base_data.dart';
import 'package:huixiang/data/coupon.dart'; import 'package:huixiang/data/coupon.dart';
import 'package:huixiang/data/goods.dart'; import 'package:huixiang/data/goods.dart';
@ -208,7 +210,6 @@ class _WelfarePage extends State<WelfarePage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
weekCoupons(), weekCoupons(),
Container( Container(
color: Colors.white, color: Colors.white,
padding: EdgeInsets.only(left: 14, right: 14), padding: EdgeInsets.only(left: 14, right: 14),
@ -219,7 +220,6 @@ class _WelfarePage extends State<WelfarePage> {
], ],
), ),
) )
// activityTask(), // activityTask(),
], ],
), ),
@ -255,7 +255,10 @@ class _WelfarePage extends State<WelfarePage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: 17.w, vertical: 16.h), padding: EdgeInsets.symmetric(
horizontal: 17.w,
vertical: 16.h,
),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -277,7 +280,8 @@ class _WelfarePage extends State<WelfarePage> {
), ),
), ),
], ],
)), ),
),
coupon.length == 0 coupon.length == 0
? NoDataView( ? NoDataView(
src: "assets/image/ka.webp", src: "assets/image/ka.webp",
@ -286,17 +290,19 @@ class _WelfarePage extends State<WelfarePage> {
fontSize: 16.sp, fontSize: 16.sp,
) )
: Container( : Container(
height: coupon[0].length >= 3 ? 350.h : 250.h, // height: coupon[0].length >= 3 ? 350.h : 250.h,
height: coupon[0].length >= 3 ? 111.h * 3 : 111.h * 2,
child: Swiper( child: Swiper(
onIndexChanged: (it) { onIndexChanged: (it) {
swiperIndex = it; swiperIndex = it;
}, },
index: couponIndex, index: couponIndex,
viewportFraction: 0.9, viewportFraction: (Get.width - 28) / Get.width,
scale: 0.7, scale: 0.7,
key: UniqueKey(), key: UniqueKey(),
pagination: SwiperPagination( pagination: SwiperPagination(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
margin: EdgeInsets.only(bottom: 15.h),
builder: DotSwiperPaginationBuilder( builder: DotSwiperPaginationBuilder(
size: 8, size: 8,
activeSize: 8, activeSize: 8,
@ -307,24 +313,18 @@ class _WelfarePage extends State<WelfarePage> {
), ),
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
itemBuilder: (context, position) { itemBuilder: (context, position) {
return Column( return weekList(coupon[position]);
children: [
Container(
child: weekList(coupon[position]),
),
],
);
}, },
itemCount: coupon.length ?? 0, itemCount: coupon.length,
), ),
) )
], ],
)); ),
);
} }
Widget weekList(List<Coupon> cops) { Widget weekList(List<Coupon> cops) {
return Expanded( return (cops.isEmpty)
child: (cops?.isEmpty ?? true)
? NoDataView( ? NoDataView(
src: "assets/image/ka.webp", src: "assets/image/ka.webp",
isShowBtn: false, isShowBtn: false,
@ -333,7 +333,7 @@ class _WelfarePage extends State<WelfarePage> {
) )
: ListView.builder( : ListView.builder(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemCount: cops.length ?? 0, itemCount: cops.length,
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
@ -343,7 +343,6 @@ class _WelfarePage extends State<WelfarePage> {
child: weekCoupon(cops[position]), child: weekCoupon(cops[position]),
); );
}, },
),
); );
} }
@ -408,7 +407,7 @@ class _WelfarePage extends State<WelfarePage> {
? Color(0xFFB3B3B3) ? Color(0xFFB3B3B3)
: Color(0xFF4D4D4D), : Color(0xFF4D4D4D),
), ),
) ),
], ],
), ),
), ),
@ -421,7 +420,7 @@ class _WelfarePage extends State<WelfarePage> {
Container( Container(
margin: EdgeInsets.only(bottom: 12), margin: EdgeInsets.only(bottom: 12),
child: weekBtn(cop), child: weekBtn(cop),
) ),
], ],
), ),
], ],
@ -625,7 +624,10 @@ class _WelfarePage extends State<WelfarePage> {
receiveCoupon(cop.id); receiveCoupon(cop.id);
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 2.h), padding: EdgeInsets.symmetric(
horizontal: 12.w,
vertical: 2.h,
),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(3), borderRadius: BorderRadius.circular(3),
color: Color(0xFF32A060), color: Color(0xFF32A060),
@ -647,18 +649,23 @@ class _WelfarePage extends State<WelfarePage> {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
if (cop.bizType == 5 || cop.bizType == 3) { if (cop.bizType == 5 || cop.bizType == 3) {
Navigator.of(context) Navigator.of(context).pushNamed(
.pushNamed('/router/write_off_page', arguments: { '/router/write_off_page',
arguments: {
"couponId": cop.id, "couponId": cop.id,
"coupon": cop, "coupon": cop,
}); },
);
} else { } else {
showStoreSelector(cop.storeList); showStoreSelector(cop.storeList);
} }
}, },
child: Container( child: Container(
// height: 19.h, // height: 19.h,
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 1.h), padding: EdgeInsets.symmetric(
horizontal: 8.w,
vertical: 1.h,
),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(3), borderRadius: BorderRadius.circular(3),
border: Border.all( border: Border.all(
@ -696,7 +703,8 @@ class _WelfarePage extends State<WelfarePage> {
builder: (ctx) => SettlementTips( builder: (ctx) => SettlementTips(
() {}, () {},
text: "${baseData?.msg}", text: "${baseData?.msg}",
)); ),
);
} }
} }
@ -723,7 +731,7 @@ class _WelfarePage extends State<WelfarePage> {
/// ///
Widget inviteFriends() { Widget inviteFriends() {
return Container( return Container(
margin: EdgeInsets.only(top: 24.h, bottom: 20.h), margin: EdgeInsets.only(top: 14.h, bottom: 20.h),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -762,7 +770,7 @@ class _WelfarePage extends State<WelfarePage> {
Widget benefitExchange() { Widget benefitExchange() {
return Container( return Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(top: 24.h, bottom: 20.h), margin: EdgeInsets.only(top: 14.h, bottom: 20.h),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -801,9 +809,6 @@ class _WelfarePage extends State<WelfarePage> {
], ],
), ),
), ),
SizedBox(
height: 12,
),
(goods.length == 0) (goods.length == 0)
? NoDataView( ? NoDataView(
src: "assets/image/xiao_fei.webp", src: "assets/image/xiao_fei.webp",
@ -815,9 +820,7 @@ class _WelfarePage extends State<WelfarePage> {
: GridView.builder( : GridView.builder(
itemCount: goods.length > 6 ? 6 : goods.length, itemCount: goods.length > 6 ? 6 : goods.length,
padding: EdgeInsets.only( padding: EdgeInsets.only(
// left: 16.w, top: 12.h,
// right: 16.w,
top: 18.h,
bottom: 16.h, bottom: 16.h,
), ),
shrinkWrap: true, shrinkWrap: true,

23
lib/im/chat_friend_group.dart

@ -35,8 +35,8 @@ class _ChatFriendGroup extends State<ChatFriendGroup>
void initState() { void initState() {
super.initState(); super.initState();
tabController = TabController(length: 3, vsync: this, initialIndex: 0); tabController = TabController(length: 3, vsync: this, initialIndex: 0);
tabController?.addListener(() { tabController.addListener(() {
if(!(tabController?.indexIsChanging ?? false)) if(!(tabController.indexIsChanging))
setState(() {}); setState(() {});
}); });
loadFinish(); loadFinish();
@ -100,6 +100,9 @@ class _ChatFriendGroup extends State<ChatFriendGroup>
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
tabAlignment: TabAlignment.start,
dividerColor: Colors.transparent,
dividerHeight: 0,
unselectedLabelStyle: TextStyle( unselectedLabelStyle: TextStyle(
fontSize: 15.sp, fontSize: 15.sp,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
@ -107,8 +110,15 @@ class _ChatFriendGroup extends State<ChatFriendGroup>
// //
unselectedLabelColor: Color(0XFFA29E9E), unselectedLabelColor: Color(0XFFA29E9E),
indicator: CustomUnderlineTabIndicator( indicator: CustomUnderlineTabIndicator(
insets: EdgeInsets.only(top: 10.w, bottom: 2.w), insets: EdgeInsets.only(
borderSide: BorderSide(width: 5.w, color: Color(0XFF32A060)),), top: 10.w,
bottom: 2.w,
),
borderSide: BorderSide(
width: 5.w,
color: Color(0XFF32A060),
),
),
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
// //
tabs: <Widget>[ tabs: <Widget>[
@ -116,7 +126,8 @@ class _ChatFriendGroup extends State<ChatFriendGroup>
MyTab(text: S.of(context).guanzhu), MyTab(text: S.of(context).guanzhu),
MyTab(text: S.of(context).fensi), MyTab(text: S.of(context).fensi),
], ],
)), ),
),
), ),
Expanded( Expanded(
child: TabBarView( child: TabBarView(
@ -127,7 +138,7 @@ class _ChatFriendGroup extends State<ChatFriendGroup>
FriendGroupList(_allKey[2],"true","粉丝"), FriendGroupList(_allKey[2],"true","粉丝"),
], ],
), ),
) ),
], ],
), ),
), ),

3
lib/im/contact_share.dart

@ -74,7 +74,8 @@ class _ContactsShare extends State<ContactsShare> {
fontSize: 17.sp, fontSize: 17.sp,
color: Color(0xFF0D0D0D), color: Color(0xFF0D0D0D),
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
)), ),
),
), ),
mineFollowList(), mineFollowList(),
], ],

45
lib/im/im_view/friend_groip_list.dart

@ -74,13 +74,13 @@ class _FriendGroupList extends State<FriendGroupList> {
/// ///
queryFollowList() async { queryFollowList() async {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
if (apiService == null) apiService ??= ApiService(
apiService = ApiService(
Dio(), Dio(),
context: context, context: context,
token: sharedPreferences.getString("token"), token: sharedPreferences.getString("token"),
showLoading: false, showLoading: false,
); );
BaseData<PageInfo<Follow>>? baseData = await apiService?.followList({ BaseData<PageInfo<Follow>>? baseData = await apiService?.followList({
"isMyFans": widget.isMyFans, "isMyFans": widget.isMyFans,
"pageNum": pageNum, "pageNum": pageNum,
@ -88,6 +88,7 @@ class _FriendGroupList extends State<FriendGroupList> {
}).catchError((error) { }).catchError((error) {
_refreshController.refreshFailed(); _refreshController.refreshFailed();
_refreshController.loadFailed(); _refreshController.loadFailed();
return BaseData<PageInfo<Follow>>()..isSuccess = false;
}); });
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
if (pageNum == 1) { if (pageNum == 1) {
@ -104,13 +105,13 @@ class _FriendGroupList extends State<FriendGroupList> {
/// ///
queryMutualFollowList() async { queryMutualFollowList() async {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
if (apiService == null) apiService ??= ApiService(
apiService = ApiService(
Dio(), Dio(),
context: context, context: context,
token: sharedPreferences.getString("token"), token: sharedPreferences.getString("token"),
showLoading: false, showLoading: false,
); );
BaseData<PageInfo<Follow>>? baseData = await apiService?.mutualFollowList({ BaseData<PageInfo<Follow>>? baseData = await apiService?.mutualFollowList({
"isMyFans": widget.isMyFans, "isMyFans": widget.isMyFans,
"pageNum": 1, "pageNum": 1,
@ -118,6 +119,7 @@ class _FriendGroupList extends State<FriendGroupList> {
}).catchError((error) { }).catchError((error) {
_refreshController.refreshFailed(); _refreshController.refreshFailed();
_refreshController.loadFailed(); _refreshController.loadFailed();
return BaseData<PageInfo<Follow>>()..isSuccess = false;
}); });
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
if (pageNum == 1) { if (pageNum == 1) {
@ -146,7 +148,11 @@ class _FriendGroupList extends State<FriendGroupList> {
? "目前暂无${widget.title}" ? "目前暂无${widget.title}"
: ("目前暂无${widget.title}${widget.title == "粉丝" ? "听说多发动态可以涨粉哦" : "可以在社群广场中关注自己喜欢的人哦"}~"), : ("目前暂无${widget.title}${widget.title == "粉丝" ? "听说多发动态可以涨粉哦" : "可以在社群广场中关注自己喜欢的人哦"}~"),
fontSize: 16.sp, fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h, left: 60.w, right: 60.w), margin: EdgeInsets.only(
top: 120.h,
left: 60.w,
right: 60.w,
),
) )
: Expanded( : Expanded(
child: ListView.builder( child: ListView.builder(
@ -184,14 +190,18 @@ class _FriendGroupList extends State<FriendGroupList> {
Widget friendGroupItem(Follow list) { Widget friendGroupItem(Follow list) {
return Container( return Container(
margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 24.h), margin: EdgeInsets.only(
left: 16.w,
right: 16.w,
bottom: 24.h,
),
child: Row(children: [ child: Row(children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100), borderRadius: BorderRadius.circular(100),
), ),
child: MImage( child: MImage(
list?.avatar ?? "", list.avatar ?? "",
isCircle: true, isCircle: true,
width: 54.h, width: 54.h,
height: 54.h, height: 54.h,
@ -203,14 +213,16 @@ class _FriendGroupList extends State<FriendGroupList> {
Padding( Padding(
padding: EdgeInsets.only(left:12.w), padding: EdgeInsets.only(left:12.w),
child: Text( child: Text(
list?.nickname ?? "", list.nickname ?? "",
style: TextStyle( style: TextStyle(
fontSize: 16.sp, fontSize: 16.sp,
color: Color(0xFF060606), color: Color(0xFF060606),
fontWeight: FontWeight.w500), fontWeight: FontWeight.w500,
),
), ),
) )
]), ],
),
); );
} }
@ -220,8 +232,10 @@ class _FriendGroupList extends State<FriendGroupList> {
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap:(){Navigator.of(context).pushNamed('/router/im_search');}, onTap:(){Navigator.of(context).pushNamed('/router/im_search');},
child: Container( child: Container(
margin: EdgeInsets.fromLTRB(16.w, 0, 16.w, 24.h), margin: EdgeInsets.fromLTRB(
padding: EdgeInsets.symmetric(vertical: 13.h), 16.w, 0, 16.w,12.h,
),
padding: EdgeInsets.symmetric(vertical: 12.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFFFDFCFC), color: Color(0xFFFDFCFC),
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4),
@ -229,7 +243,10 @@ class _FriendGroupList extends State<FriendGroupList> {
child: Row( child: Row(
children: [ children: [
Padding( Padding(
padding: EdgeInsets.only(left: 15.w, right: 5.w), padding: EdgeInsets.only(
left: 15.w,
right: 5.w,
),
child: Image.asset( child: Image.asset(
"assets/image/icon_search.webp", "assets/image/icon_search.webp",
width: 14.h, width: 14.h,
@ -246,7 +263,7 @@ class _FriendGroupList extends State<FriendGroupList> {
), ),
), ),
], ],
) ),
), ),
); );
} }

19
lib/mine/mine_page.dart

@ -43,8 +43,7 @@ class MinePage extends StatefulWidget {
} }
} }
class MinePageState extends State<MinePage> class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin, ParseErrorLogger {
with AutomaticKeepAliveClientMixin, ParseErrorLogger {
ApiService? apiService; ApiService? apiService;
UserInfo? userInfo; UserInfo? userInfo;
List<Rank> ranks = []; List<Rank> ranks = [];
@ -113,8 +112,7 @@ class MinePageState extends State<MinePage>
errorLogger: this, errorLogger: this,
); );
BaseListData<Rank>? rankData = BaseListData<Rank>? rankData = await apiService?.rankList().catchError((onError) {
await apiService?.rankList().catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type), SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center); alignment: Alignment.center);
_refreshController.refreshFailed(); _refreshController.refreshFailed();
@ -128,7 +126,7 @@ class MinePageState extends State<MinePage>
BaseData<UserInfo>? baseDate = BaseData<UserInfo>? baseDate =
await apiService?.queryInfo().catchError((onError) { await apiService?.queryInfo().catchError((onError) {
_refreshController.refreshFailed(); _refreshController.refreshFailed();
return Future.value(null); return BaseData<UserInfo>()..isSuccess = false;
}); });
if (baseDate?.isSuccess ?? false) { if (baseDate?.isSuccess ?? false) {
userInfo = baseDate?.data; userInfo = baseDate?.data;
@ -181,7 +179,7 @@ class MinePageState extends State<MinePage>
"state": 1 "state": 1
}).catchError((error) { }).catchError((error) {
_refreshController.refreshFailed(); _refreshController.refreshFailed();
return Future.value(null); return BaseData<PageInfo<Coupon>>()..isSuccess = false;
}); });
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
couponNum = baseData?.data?.total; couponNum = baseData?.data?.total;
@ -213,7 +211,7 @@ class MinePageState extends State<MinePage>
BaseData<SocialInfo>? baseData = BaseData<SocialInfo>? baseData =
await apiService?.socialInfo().catchError((onError) { await apiService?.socialInfo().catchError((onError) {
_refreshController.refreshFailed(); _refreshController.refreshFailed();
return Future.value(null); return BaseData<SocialInfo>()..isSuccess = false;
}); });
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
infoNumber = baseData?.data; infoNumber = baseData?.data;
@ -351,9 +349,8 @@ class MinePageState extends State<MinePage>
); );
}, },
child: Container( child: Container(
margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 30.h), margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 16.h),
padding: padding: EdgeInsets.only(left: 12.w, top: 12.h, right: 10.w, bottom: 17.h),
EdgeInsets.only(left: 12.w, top: 12.h, right: 10.w, bottom: 17.h),
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
@ -455,7 +452,7 @@ class MinePageState extends State<MinePage>
Widget spreadImage() { Widget spreadImage() {
return Container( return Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(bottom: 24.h), margin: EdgeInsets.only(bottom: 16.h),
height: 85.h, height: 85.h,
child: activityBannerData.isNotEmpty child: activityBannerData.isNotEmpty
? Swiper( ? Swiper(

20
lib/mine/mine_view/calendar_page.dart

@ -62,20 +62,32 @@ class _CalendarPage extends State<CalendarPage> with TickerProviderStateMixin {
return TableCalendar( return TableCalendar(
startingDayOfWeek: StartingDayOfWeek.monday, startingDayOfWeek: StartingDayOfWeek.monday,
availableGestures: AvailableGestures.none, availableGestures: AvailableGestures.none,
daysOfWeekHeight: 22,
headerStyle: HeaderStyle( headerStyle: HeaderStyle(
titleCentered: false, titleCentered: false,
headerMargin: EdgeInsets.only(
left: 12,
),
leftChevronVisible: false, leftChevronVisible: false,
rightChevronVisible: false, rightChevronVisible: false,
formatButtonVisible: false, formatButtonVisible: false,
), ),
calendarStyle: CalendarStyle( calendarStyle: CalendarStyle(
outsideDaysVisible: false, outsideDaysVisible: false,
selectedDecoration: BoxDecoration().copyWith(color: Color(0xFF32A060)), selectedDecoration: BoxDecoration().copyWith(
selectedTextStyle: TextStyle().copyWith(color: Color(0xFF333333)), color: Color(0xFF32A060),
todayTextStyle: TextStyle().copyWith(color: Color(0xFFD5EBDE)), ),
selectedTextStyle: TextStyle().copyWith(
color: Color(0xFF333333),
),
todayTextStyle: TextStyle().copyWith(
color: Color(0xFFD5EBDE),
),
), ),
daysOfWeekStyle: DaysOfWeekStyle( daysOfWeekStyle: DaysOfWeekStyle(
weekendStyle: TextStyle().copyWith(color: Color(0xFF4D4D4D)), weekendStyle: TextStyle().copyWith(
color: Color(0xFF4D4D4D),
),
), ),
onDaySelected: _onDaySelected, onDaySelected: _onDaySelected,
// onVisibleDaysChanged: _onVisibleDaysChanged, // onVisibleDaysChanged: _onVisibleDaysChanged,

6
lib/mine/mine_view/community_follow.dart

@ -73,6 +73,8 @@ class _CommunityFollow extends State<CommunityFollow>
fontSize: 17.sp, fontSize: 17.sp,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
dividerHeight: 0,
dividerColor: Colors.transparent,
unselectedLabelStyle: TextStyle( unselectedLabelStyle: TextStyle(
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
@ -86,7 +88,9 @@ class _CommunityFollow extends State<CommunityFollow>
MyTab( MyTab(
text: "关注${infoNumber?.follow ?? "0"}", text: "关注${infoNumber?.follow ?? "0"}",
), ),
MyTab(text: "粉丝${infoNumber?.fans ?? "0"}"), MyTab(
text: "粉丝${infoNumber?.fans ?? "0"}",
),
], ],
), ),
), ),

33
lib/mine/mine_view/mine_calendar.dart

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:huixiang/utils/constant.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'calendar_page.dart'; import 'calendar_page.dart';
@ -14,10 +15,11 @@ class _MineCalendar extends State<MineCalendar> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(14.w, 0.h, 14.w, 30.h), margin: EdgeInsets.fromLTRB(
padding: EdgeInsets.only(top: 12.h,left: 12,), 14.w, 0.h, 14.w, 30.h,
),
alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
// color: Colors.white,
image: DecorationImage( image: DecorationImage(
fit: BoxFit.cover, fit: BoxFit.cover,
image: AssetImage("assets/image/s_bg.webp"), image: AssetImage("assets/image/s_bg.webp"),
@ -29,7 +31,7 @@ class _MineCalendar extends State<MineCalendar> {
offset: Offset(0, 2), offset: Offset(0, 2),
blurRadius: 4, blurRadius: 4,
spreadRadius: 0, spreadRadius: 0,
) ),
], ],
), ),
child: Stack( child: Stack(
@ -38,38 +40,25 @@ class _MineCalendar extends State<MineCalendar> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
12.d,
GestureDetector( GestureDetector(
onTap: (){ onTap: (){
// Navigator.of(context).pushNamed('/router/mine_greenery'); // Navigator.of(context).pushNamed('/router/mine_greenery');
}, },
child: Row( child: Row(
children: [ children: [
Expanded(child: Text( 12.vd,
Text(
"我的${DateTime.now().month}月足迹日历", "我的${DateTime.now().month}月足迹日历",
style: TextStyle( style: TextStyle(
color: Color(0xFF0D0D0D), color: Color(0xFF0D0D0D),
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp, fontSize: 15.sp,
), ),
),), ),
// Text(
// "查看绿叶",
// style: TextStyle(
// color: Color(0xFF000000),
// fontWeight: MyFontWeight.regular,
// fontSize: 15.sp,
// ),
// ),
// Icon(
// Icons.navigate_next,
// size: 24,
// color: Colors.black,
// ),
// SizedBox(width:12,),
], ],
), ),
), ),
SizedBox(height: 12,),
CalendarPage(), CalendarPage(),
], ],
), ),
@ -80,7 +69,7 @@ class _MineCalendar extends State<MineCalendar> {
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
], ],
) ),
); );
} }
} }

6
lib/mine/mine_view/mine_item.dart

@ -20,7 +20,7 @@ class _MineItem extends State<MineItem> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(16.w, 0.h, 16.w, 30.h), margin: EdgeInsets.fromLTRB(16.w, 0.h, 16.w, 16.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
@ -37,7 +37,9 @@ class _MineItem extends State<MineItem> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
padding: EdgeInsets.only(left: 16, top: 16, bottom: 13, right: 16), padding: EdgeInsets.only(
left: 16, top: 16, bottom: 13, right: 16,
),
child: Text( child: Text(
S.of(context).qita, S.of(context).qita,
style: TextStyle( style: TextStyle(

52
lib/mine/mine_view/mine_navbar.dart

@ -13,9 +13,7 @@ class MineNavbar extends StatefulWidget {
final SocialInfo? infoNumber; final SocialInfo? infoNumber;
final GestureTapCallback toIntegralPage; final GestureTapCallback toIntegralPage;
final Function queryCoupon; final Function queryCoupon;
MineNavbar(this.couponNum,this.userInfo,this.infoNumber,this.toIntegralPage,this.queryCoupon); MineNavbar(this.couponNum,this.userInfo,this.infoNumber,this.toIntegralPage,this.queryCoupon);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
return _MineNavbar(); return _MineNavbar();
@ -26,7 +24,9 @@ class _MineNavbar extends State<MineNavbar> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(13.5.w, 15.h, 13.5.w,30.h), margin: EdgeInsets.fromLTRB(
13.5.w, 15.h, 13.5.w, 15.h,
),
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 26.h, top: 26.h,
bottom: 24.h, bottom: 24.h,
@ -53,8 +53,7 @@ class _MineNavbar extends State<MineNavbar> {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null || if (value.getString("token") == null || value.getString("token") == "") {
value.getString("token") == "") {
LoginTipsDialog().show(context); LoginTipsDialog().show(context);
return; return;
} }
@ -75,8 +74,7 @@ class _MineNavbar extends State<MineNavbar> {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null || if (value.getString("token") == null || value.getString("token") == "") {
value.getString("token") == "") {
LoginTipsDialog().show(context); LoginTipsDialog().show(context);
return; return;
} }
@ -133,19 +131,32 @@ class _MineNavbar extends State<MineNavbar> {
), ),
Container( Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(top:17.h,left: 16.w,right: 16.w,bottom: 27.h), margin: EdgeInsets.symmetric(
child: Flex( vertical: 12,
children: List.generate(120, (_) { horizontal: 15,
return SizedBox( ),
width: 1, child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
double width = constraints.constrainWidth();
return Flex(
children: List.generate(width ~/ 4, (_) {
return Container(
width: 2,
height: 1, height: 1,
margin: EdgeInsets.symmetric(
horizontal: 1,
),
child: DecoratedBox( child: DecoratedBox(
decoration: BoxDecoration(color: Color(0xFFEDEDED)), decoration: BoxDecoration(
color: Color(0xFFEDEDED),
),
), ),
); );
}), }),
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
direction: Axis.horizontal, direction: Axis.horizontal,
);
}
), ),
), ),
Row( Row(
@ -199,10 +210,14 @@ class _MineNavbar extends State<MineNavbar> {
LoginTipsDialog().show(context); LoginTipsDialog().show(context);
return; return;
} }
Navigator.of(context).pushNamed('/router/communityFollow',arguments: { Navigator.of(context).pushNamed(
'/router/communityFollow',
arguments: {
"status":0 "status":0
},
);
}); });
});}, },
child: mineBottomItem( child: mineBottomItem(
"${widget.infoNumber?.follow ?? "0"}", "${widget.infoNumber?.follow ?? "0"}",
S.of(context).guanzhu, S.of(context).guanzhu,
@ -219,9 +234,12 @@ class _MineNavbar extends State<MineNavbar> {
LoginTipsDialog().show(context); LoginTipsDialog().show(context);
return; return;
} }
Navigator.of(context).pushNamed('/router/communityFollow',arguments: { Navigator.of(context).pushNamed(
'/router/communityFollow',
arguments: {
"status":1 "status":1
}); },
);
}); });
}, },
child: mineBottomItem( child: mineBottomItem(

10
lib/mine/mine_view/mine_order.dart

@ -82,12 +82,16 @@ class _MineOrderView extends State<MineOrderView> {
toOrderHistory(int status) { toOrderHistory(int status) {
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null || if (value.getString("token") == null || value.getString("token") == "") {
value.getString("token") == "") {
LoginTipsDialog().show(context); LoginTipsDialog().show(context);
return; return;
} }
Navigator.of(context).pushNamed('/router/order_history_page', arguments: {"status":status}); Navigator.of(context).pushNamed(
'/router/order_history_page',
arguments: {
"status":status,
},
);
}); });
} }

2
lib/mine/mine_wallet_page.dart

@ -158,7 +158,7 @@ class _MineWalletPage extends State<MineWalletPage> {
Widget balance() { Widget balance() {
return Container( return Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.fromLTRB(14.w, 16.h, 14.w, 8.h), margin: EdgeInsets.fromLTRB(14.w, 16.h, 14.w, 0),
padding: EdgeInsets.only(bottom: 12.h), padding: EdgeInsets.only(bottom: 12.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFF32A060), color: Color(0xFF32A060),

50
lib/order/order_history_page.dart

@ -6,6 +6,7 @@ import 'package:huixiang/data/base_data.dart';
import 'package:huixiang/data/order_info.dart'; import 'package:huixiang/data/order_info.dart';
import 'package:huixiang/data/order_product_vo.dart'; import 'package:huixiang/data/order_product_vo.dart';
import 'package:huixiang/data/page.dart'; import 'package:huixiang/data/page.dart';
import 'package:huixiang/data/user_info.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/order/order_utils.dart'; import 'package:huixiang/order/order_utils.dart';
import 'package:huixiang/order/order_view/order_pay_selected.dart'; import 'package:huixiang/order/order_view/order_pay_selected.dart';
@ -26,8 +27,6 @@ import 'package:retrofit/retrofit.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:shimmer/shimmer.dart'; import 'package:shimmer/shimmer.dart';
import '../data/user_info.dart';
class OrderHistoryPage extends StatefulWidget { class OrderHistoryPage extends StatefulWidget {
final Map? arguments; final Map? arguments;
@ -67,7 +66,7 @@ class _OrderHistoryPage extends State<OrderHistoryPage>
titleSize: 18.sp, titleSize: 18.sp,
background: Color(0xFFFFFFFF), background: Color(0xFFFFFFFF),
leadingColor: Colors.black, leadingColor: Colors.black,
toolbarHeight: kToolbarHeight + MediaQuery.of(context).padding.top, toolbarHeight: kToolbarHeight,
bottom: PreferredSize( bottom: PreferredSize(
preferredSize: Size(double.infinity, 38.h), preferredSize: Size(double.infinity, 38.h),
child: Theme( child: Theme(
@ -86,6 +85,8 @@ class _OrderHistoryPage extends State<OrderHistoryPage>
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
dividerHeight: 0,
dividerColor: Colors.transparent,
labelStyle: TextStyle( labelStyle: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 16.sp, fontSize: 16.sp,
@ -176,8 +177,8 @@ class _OrderHistoryList extends State<OrderHistoryList>
networkStatus = -1; networkStatus = -1;
refreshController.refreshFailed(); refreshController.refreshFailed();
refreshController.loadFailed(); refreshController.loadFailed();
return BaseData<PageInfo<OrderInfo>>()..isSuccess = false;
}); });
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
if (baseData!.data != null && if (baseData!.data != null &&
(baseData.data!.records?.isNotEmpty ?? false)) { (baseData.data!.records?.isNotEmpty ?? false)) {
@ -201,8 +202,10 @@ class _OrderHistoryList extends State<OrderHistoryList>
networkStatus = 1; networkStatus = 1;
} else { } else {
if (baseData?.msg?.isNotEmpty ?? false) if (baseData?.msg?.isNotEmpty ?? false)
SmartDialog.showToast("${baseData!.msg}", SmartDialog.showToast(
alignment: Alignment.center); "${baseData!.msg}",
alignment: Alignment.center,
);
refreshController.refreshFailed(); refreshController.refreshFailed();
refreshController.loadFailed(); refreshController.loadFailed();
} }
@ -215,7 +218,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
apiService?.minLogin(orderInfo.storeId ?? "").catchError((onError) { apiService?.minLogin(orderInfo.storeId ?? "").catchError((onError) {
debugPrint("${onError}"); debugPrint("${onError}");
}).then((baseData) { }).then((baseData) {
if (baseData?.isSuccess ?? false) { if (baseData.isSuccess ?? false) {
Map<String, dynamic> minStoreInfo = baseData.data; Map<String, dynamic> minStoreInfo = baseData.data;
String minToken = minStoreInfo["token"]; String minToken = minStoreInfo["token"];
String tenant = orderInfo.tenantCode ?? ""; String tenant = orderInfo.tenantCode ?? "";
@ -236,14 +239,17 @@ class _OrderHistoryList extends State<OrderHistoryList>
tenant: tenant, tenant: tenant,
storeId: storeId, storeId: storeId,
errorLogger: this, errorLogger: this,
)); ),
);
} }
}); });
} }
queryDetails(id) async { queryDetails(id) async {
BaseData<OrderInfo>? baseData = BaseData<OrderInfo>? baseData =
await apiService?.orderDetail(id).catchError((error) {}); await apiService?.orderDetail(id).catchError((error) {
return BaseData<OrderInfo>()..isSuccess = false;
});
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
return baseData!.data; return baseData!.data;
} }
@ -251,7 +257,9 @@ class _OrderHistoryList extends State<OrderHistoryList>
queryUserBalance() async { queryUserBalance() async {
BaseData<UserInfo>? baseData = BaseData<UserInfo>? baseData =
await apiService?.queryInfo().catchError((onError) {}); await apiService?.queryInfo().catchError((onError) {
return BaseData<UserInfo>()..isSuccess = false;
});
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
userInfo = baseData!.data; userInfo = baseData!.data;
if (mounted) setState(() {}); if (mounted) setState(() {});
@ -294,7 +302,9 @@ class _OrderHistoryList extends State<OrderHistoryList>
orderCancel(String orderId) async { orderCancel(String orderId) async {
BaseData? baseData = BaseData? baseData =
await apiService?.orderCancel(orderId).catchError((onError) {}); await apiService?.orderCancel(orderId).catchError((onError) {
return BaseData()..isSuccess = false;
});
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
SmartDialog.showToast("订单取消成功"); SmartDialog.showToast("订单取消成功");
_onRefresh(); _onRefresh();
@ -304,15 +314,6 @@ class _OrderHistoryList extends State<OrderHistoryList>
} }
aginOrder(OrderInfo orderInfo) { aginOrder(OrderInfo orderInfo) {
// Navigator.of(context).pushNamed(
// '/router/union_detail_page',
// arguments: {"id": storeId},
// );
// String storeId = (orderInfo != null &&
// orderInfo.storeVO != null)
// ? (orderInfo.storeVO.id ?? "")
// : "";
if (orderInfo.storeVO?.posType?.code == "NORMALSTORE") { if (orderInfo.storeVO?.posType?.code == "NORMALSTORE") {
Scan.toScan( Scan.toScan(
context, context,
@ -370,15 +371,18 @@ class _OrderHistoryList extends State<OrderHistoryList>
itemBuilder: (context, position) { itemBuilder: (context, position) {
return InkWell( return InkWell(
onTap: () { onTap: () {
Navigator.of(context).pushNamed('/router/order_details', Navigator.of(context).pushNamed(
'/router/order_details',
arguments: { arguments: {
"id": orderInfos[position].id, "id": orderInfos[position].id,
"jumpState": 2 "jumpState": 2
}); },
);
}, },
child: orderItem(orderInfos[position]), child: orderItem(orderInfos[position]),
); );
}) },
)
: NoDataView( : NoDataView(
src: "assets/image/ding_dan.webp", src: "assets/image/ding_dan.webp",
isShowBtn: false, isShowBtn: false,

425
lib/qr/invite_friends.dart

@ -1,7 +1,9 @@
import 'dart:convert'; import 'dart:convert';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/data/base_data.dart';
@ -10,6 +12,7 @@ import 'package:huixiang/data/page.dart';
import 'package:huixiang/data/user_info.dart'; import 'package:huixiang/data/user_info.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/constant.dart';
import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/classic_header.dart';
@ -120,12 +123,13 @@ class _InviteFriends extends State<InviteFriends> {
backgroundColor: Colors.white, backgroundColor: Colors.white,
leading: GestureDetector( leading: GestureDetector(
child: Icon( child: Icon(
Icons.clear, Icons.arrow_back_ios_new_rounded,
color: Colors.black, color: Colors.black,
), ),
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}), },
),
title: Text( title: Text(
S.of(context).yaoqinghaoyou, S.of(context).yaoqinghaoyou,
style: TextStyle( style: TextStyle(
@ -137,22 +141,7 @@ class _InviteFriends extends State<InviteFriends> {
centerTitle: true, centerTitle: true,
elevation: 0.0, elevation: 0.0,
// //
scrolledUnderElevation: 0.0 scrolledUnderElevation: 0.0,
// actions: [
// GestureDetector(
// child: Container(
// margin: EdgeInsets.only(right: 14),
// padding:EdgeInsets.only(left:70,right: 20),
// child: Icon(
// Icons.more_horiz,
// color: Colors.black,
// ),
// ),
// onTap: () {
// // Navigator.of(context).pop();
// // share();
// })
// ],
), ),
body: SmartRefresher( body: SmartRefresher(
controller: refreshController, controller: refreshController,
@ -192,19 +181,20 @@ class _InviteFriends extends State<InviteFriends> {
Widget invite() { Widget invite() {
return Container( return Container(
width: double.infinity, width: double.infinity,
height: 370.h, margin: EdgeInsets.only(
margin: EdgeInsets.only(bottom: 20.h), bottom: 16.h,
),
child: Column( child: Column(
children: [ children: [
Image.asset( Container(
child: Image.asset(
"assets/image/invite_friends.webp", "assets/image/invite_friends.webp",
height: 300.h,
width: double.infinity, width: double.infinity,
fit: BoxFit.fill, fit: BoxFit.fitWidth,
alignment: Alignment.topCenter,
), ),
SizedBox(
height: 12.h,
), ),
26.d,
GestureDetector( GestureDetector(
onTap: () { onTap: () {
widgetToUrl(); widgetToUrl();
@ -213,7 +203,7 @@ class _InviteFriends extends State<InviteFriends> {
width: double.infinity, width: double.infinity,
height: 52.h, height: 52.h,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(26), borderRadius: BorderRadius.circular(26.h),
color: Color(0xFF32A060), color: Color(0xFF32A060),
), ),
margin: EdgeInsets.symmetric(horizontal: 14.w), margin: EdgeInsets.symmetric(horizontal: 14.w),
@ -237,11 +227,11 @@ class _InviteFriends extends State<InviteFriends> {
fontSize: 16.sp, fontSize: 16.sp,
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
), ),
) ),
], ],
), ),
), ),
) ),
], ],
), ),
); );
@ -255,7 +245,11 @@ class _InviteFriends extends State<InviteFriends> {
borderRadius: BorderRadius.circular(6), borderRadius: BorderRadius.circular(6),
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
), ),
margin: EdgeInsets.only(bottom: 12.h, left: 14.h, right: 14.h), margin: EdgeInsets.only(
bottom: 12.h,
left: 14.h,
right: 14.h,
),
padding: EdgeInsets.all(6), padding: EdgeInsets.all(6),
child: Column( child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceAround, // mainAxisAlignment: MainAxisAlignment.spaceAround,
@ -278,184 +272,108 @@ class _InviteFriends extends State<InviteFriends> {
fontSize: 16.sp, fontSize: 16.sp,
color: Color(0xFF32A060), color: Color(0xFF32A060),
), ),
)), ),
),
SizedBox( SizedBox(
height: 17.h, height: 12.h,
), ),
IntrinsicHeight(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Column(
children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Spacer(),
Image.asset( Image.asset(
"assets/image/invite_wx.webp", "assets/image/invite_wx.webp",
width: 42.h, width: 42.h,
height: 42.h, height: 42.h,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
Container( Expanded(
width: 50.w, child: dashedLine(),
child: Flex(
children: List.generate(8, (_) {
return SizedBox(
width: 3,
height: 1,
child: DecoratedBox(
decoration:
BoxDecoration(color: Color(0xFF32A060)),
),
);
}),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
direction: Axis.horizontal,
), ),
Image.asset(
"assets/image/yq_zt.webp",
width: 42.h,
height: 42.h,
fit: BoxFit.cover,
), ),
], Expanded(
child: dashedLine(),
), ),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset( Image.asset(
"assets/image/invite_1.webp", "assets/image/zt_m.webp",
width: 24.h, width: 42.h,
height: 24.h, height: 42.h,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
Container( Expanded(
width: 44.w, child: dashedLine(),
child: Flex(
children: List.generate(0, (_) {
return SizedBox(
width: 3.w,
height: 1.h,
child: DecoratedBox(
decoration:
BoxDecoration(color: Colors.white),
),
);
}),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
direction: Axis.horizontal,
), ),
Image.asset(
"assets/image/invite_q.webp",
width: 42.h,
height: 42.h,
fit: BoxFit.cover,
), ),
Spacer(),
], ],
), ),
SizedBox(height: 8.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Spacer(),
Container( Container(
width: 50.w, alignment: Alignment.center,
child: Text( width: 42.h,
"分享链接给好友", child: Image.asset(
style: TextStyle( "assets/image/invite_1.webp",
fontSize: 12.sp, width: 24.h,
height: 1.3.h, height: 24.h,
fontWeight: MyFontWeight.regular, fit: BoxFit.cover,
color: Color(0xFF181818),
),
), ),
), ),
Spacer(),
Container( Container(
width: 43.w, alignment: Alignment.center,
child: Flex(
children: List.generate(0, (_) {
return SizedBox(
width: 3.w,
height: 1.h,
child: DecoratedBox(
decoration:
BoxDecoration(color: Colors.white),
),
);
}),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
direction: Axis.horizontal,
),
),
],
),
],
)),
Expanded(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
"assets/image/yq_zt.webp",
width: 42.h, width: 42.h,
height: 42.h, child: Image.asset(
"assets/image/invite_2.webp",
width: 24.h,
height: 24.h,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
Container(
width: 50.w,
child: Flex(
children: List.generate(8, (_) {
return SizedBox(
width: 3.w,
height: 1.w,
child: DecoratedBox(
decoration:
BoxDecoration(color: Color(0xFF32A060)),
),
);
}),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
direction: Axis.horizontal,
),
),
],
), ),
Row( Spacer(),
mainAxisAlignment: MainAxisAlignment.center, Container(
crossAxisAlignment: CrossAxisAlignment.center, alignment: Alignment.center,
children: [ width: 42.h,
Image.asset( child: Image.asset(
"assets/image/invite_2.webp", "assets/image/invite_3.webp",
width: 24.h, width: 24.h,
height: 24.h, height: 24.h,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
Container(
width: 44.w,
child: Flex(
children: List.generate(0, (_) {
return SizedBox(
width: 3.w,
height: 1.h,
child: DecoratedBox(
decoration:
BoxDecoration(color: Colors.white),
), ),
); Spacer(),
}), Container(
mainAxisAlignment: MainAxisAlignment.spaceBetween, alignment: Alignment.center,
direction: Axis.horizontal, width: 42.h,
child: Image.asset(
"assets/image/invite_4.webp",
width: 24.h,
height: 24.h,
fit: BoxFit.cover,
), ),
), ),
Spacer(),
], ],
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Spacer(),
width: 50.w, Expanded(
flex: 3,
child: Text( child: Text(
"好友注册并获得10元优惠券", "分享链接给好友",
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
height: 1.3.h, height: 1.3.h,
@ -464,95 +382,22 @@ class _InviteFriends extends State<InviteFriends> {
), ),
), ),
), ),
Container( Spacer(),
width: 43.w,
child: Flex(
children: List.generate(0, (_) {
return SizedBox(
width: 3.w,
height: 1.h,
child: DecoratedBox(
decoration:
BoxDecoration(color: Colors.white),
),
);
}),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
direction: Axis.horizontal,
),
),
],
),
],
)),
Expanded( Expanded(
child: Column( flex: 3,
children: [ child: Text(
Row( "好友注册并获得10元优惠券",
mainAxisAlignment: MainAxisAlignment.spaceAround, style: TextStyle(
crossAxisAlignment: CrossAxisAlignment.center, fontSize: 12.sp,
children: [ height: 1.3.h,
Image.asset( fontWeight: MyFontWeight.regular,
"assets/image/zt_m.webp", color: Color(0xFF181818),
width: 42.h,
height: 42.h,
fit: BoxFit.cover,
),
Container(
width: 50.w,
child: Flex(
children: List.generate(8, (_) {
return SizedBox(
width: 3.w,
height: 1.h,
child: DecoratedBox(
decoration:
BoxDecoration(color: Color(0xFF32A060)),
),
);
}),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
direction: Axis.horizontal,
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
"assets/image/invite_3.webp",
width: 24.h,
height: 24.h,
fit: BoxFit.cover,
),
Container(
width: 44.w,
child: Flex(
children: List.generate(0, (_) {
return SizedBox(
width: 3.w,
height: 1.h,
child: DecoratedBox(
decoration:
BoxDecoration(color: Colors.white),
),
);
}),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
direction: Axis.horizontal,
), ),
), ),
],
), ),
SizedBox(height: 8.h), Spacer(),
Row( Expanded(
mainAxisAlignment: MainAxisAlignment.center, flex: 3,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 50.w,
child: Text( child: Text(
"好友完成首单", "好友完成首单",
style: TextStyle( style: TextStyle(
@ -563,46 +408,12 @@ class _InviteFriends extends State<InviteFriends> {
), ),
), ),
), ),
Container( Spacer(),
width: 43.w, Expanded(
child: Flex( flex: 3,
children: List.generate(0, (_) {
return SizedBox(
width: 3.w,
height: 1.h,
child: DecoratedBox(
decoration:
BoxDecoration(color: Colors.white),
),
);
}),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
direction: Axis.horizontal,
),
),
],
),
],
)),
Column(
children: [
Image.asset(
"assets/image/invite_q.webp",
width: 42.h,
height: 42.h,
fit: BoxFit.cover,
),
Image.asset(
"assets/image/invite_4.webp",
width: 24.h,
height: 24.h,
fit: BoxFit.cover,
),
SizedBox(height: 8.h),
Container(
width: 50.w,
child: Text( child: Text(
"邀请达成获得奖励", "邀请达成获得奖励",
textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
height: 1.3.h, height: 1.3.h,
@ -610,14 +421,37 @@ class _InviteFriends extends State<InviteFriends> {
color: Color(0xFF181818), color: Color(0xFF181818),
), ),
), ),
) ),
Spacer(),
], ],
), ),
], ],
), ),
);
}
dashedLine() {
return LayoutBuilder(
builder: (ctx, c) {
double width = c.constrainWidth();
return Flex(
children: List.generate(
width ~/ 4,
(_) {
return Container(
width: 2,
margin: EdgeInsets.symmetric(horizontal: 1),
height: 1,
child: DecoratedBox(
decoration: BoxDecoration(color: Color(0xFF32A060)),
), ),
], );
},
), ),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
direction: Axis.horizontal,
);
},
); );
} }
@ -630,8 +464,17 @@ class _InviteFriends extends State<InviteFriends> {
borderRadius: BorderRadius.circular(6), borderRadius: BorderRadius.circular(6),
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
), ),
margin: EdgeInsets.only(bottom: 12.h, left: 14.h, right: 14.h), margin: EdgeInsets.only(
padding: EdgeInsets.only(top: 6.h, left: 6, right: 6, bottom: 16.h), bottom: 12.h,
left: 14.h,
right: 14.h,
),
padding: EdgeInsets.only(
top: 6.h,
left: 6,
right: 6,
bottom: 16.h,
),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

Loading…
Cancel
Save