diff --git a/assets/image/2x/calendar.webp b/assets/image/2x/calendar.webp new file mode 100644 index 00000000..bad76140 Binary files /dev/null and b/assets/image/2x/calendar.webp differ diff --git a/assets/image/2x/icon_mine_online_service.webp b/assets/image/2x/icon_mine_online_service.webp new file mode 100644 index 00000000..781b5699 Binary files /dev/null and b/assets/image/2x/icon_mine_online_service.webp differ diff --git a/assets/image/2x/vip_logo.webp b/assets/image/2x/vip_logo.webp new file mode 100644 index 00000000..ede748cf Binary files /dev/null and b/assets/image/2x/vip_logo.webp differ diff --git a/assets/image/3x/calendar.webp b/assets/image/3x/calendar.webp new file mode 100644 index 00000000..6ec7621e Binary files /dev/null and b/assets/image/3x/calendar.webp differ diff --git a/assets/image/3x/icon_mine_online_service.webp b/assets/image/3x/icon_mine_online_service.webp new file mode 100644 index 00000000..927a7c12 Binary files /dev/null and b/assets/image/3x/icon_mine_online_service.webp differ diff --git a/assets/image/3x/vip_logo.webp b/assets/image/3x/vip_logo.webp new file mode 100644 index 00000000..5f3132d7 Binary files /dev/null and b/assets/image/3x/vip_logo.webp differ diff --git a/assets/image/calendar.webp b/assets/image/calendar.webp new file mode 100644 index 00000000..ad94078a Binary files /dev/null and b/assets/image/calendar.webp differ diff --git a/assets/image/icon_mine_online_service.webp b/assets/image/icon_mine_online_service.webp new file mode 100644 index 00000000..7a101cba Binary files /dev/null and b/assets/image/icon_mine_online_service.webp differ diff --git a/assets/image/vip_logo.webp b/assets/image/vip_logo.webp new file mode 100644 index 00000000..4ab37d45 Binary files /dev/null and b/assets/image/vip_logo.webp differ diff --git a/lib/home/welfare_page.dart b/lib/home/welfare_page.dart index 057cc4ce..8b3254a6 100644 --- a/lib/home/welfare_page.dart +++ b/lib/home/welfare_page.dart @@ -324,7 +324,7 @@ class _WelfarePage extends State { } Widget weekList(List cops){ - return Expanded(child: ListView.builder( + return Expanded(child:(cops != null && cops.length > 0)?ListView.builder( padding: EdgeInsets.zero, itemCount: cops.length, scrollDirection: Axis.vertical, @@ -337,7 +337,12 @@ class _WelfarePage extends State { child: weekCoupon(cops[position]), ); }, - )); + ):NoDataView( + src: "assets/image/ka.webp", + isShowBtn: false, + text: S.of(context).haimeiyouyouhuiquankeyilingqu, + fontSize: 16.sp, + ),); } Widget weekCoupon(Coupon cop) { diff --git a/lib/main.dart b/lib/main.dart index 62cf08e0..22f8a3ad 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -106,6 +106,7 @@ import 'mine/manage_address_page.dart'; import 'mine/mine_greenery.dart'; import 'mine/mine_shop_details.dart'; import 'mine/mine_shop_page.dart'; +import 'mine/mine_view/calendar_page.dart'; import 'mine/mine_view/community_follow.dart'; import 'mine/mine_vip/binding_assistant_card.dart'; import 'mine/mine_vip/legal_right_details.dart'; diff --git a/lib/mine/mine_greenery.dart b/lib/mine/mine_greenery.dart index 92df2c57..a088468f 100644 --- a/lib/mine/mine_greenery.dart +++ b/lib/mine/mine_greenery.dart @@ -437,9 +437,9 @@ class _MineGreenery extends State { }, child:ClipRRect( child:Image.asset( - "assets/image/icon_story_td.webp", + "assets/image/welfare_spread.webp", width:double.infinity, - fit: BoxFit.cover, + fit: BoxFit.fill, height:80.h, ), borderRadius: BorderRadius.circular(6), diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index d405448a..4ee6bcc9 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -17,6 +17,7 @@ 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/login_tips_dialog.dart'; +import 'package:huixiang/view_widget/mine_vip_entry.dart'; import 'package:huixiang/view_widget/mine_vip_view.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -193,88 +194,87 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { child: SingleChildScrollView( child: Container( child: Stack( - alignment: Alignment.centerRight, + // alignment: Alignment.centerRight, children: [ + Container( + height: 317, + decoration: BoxDecoration( + color: Color(0xFF32A060) + ), + ), FutureBuilder( future: queryUserInfo(), builder: (context, snapshot) { return Column( children: [ - Container( - // decoration: BoxDecoration( - // gradient: LinearGradient( - // begin: Alignment.bottomLeft, - // end: Alignment.topRight, - // colors: [ - // Color(0xFFE5F7FF), - // Color(0xFFE8F5E9), - // ], - // stops: [0.1, 0.8], - // ), - // ), - decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage("assets/image/mine_bg.webp"), - ), - ), - height: 375, - child: Column( - children: [ - ///我的 用户信息 - MineView( - userInfo, - () { - _toUserInfo(); - }, - () { - toIntegralPage(); - }, - (){ - setState(() { - totalMsg =0; - }); - }, - totalMsg - ), - - ///我的 VIP等级信息 - MineVipView( - tag: "vip", - ranks: ranks, - userInfo: userInfo, - rank: double.tryParse( + Stack( + children: [ + Container( + child: Column( + children: [ + ///我的 用户信息 + MineView( + userInfo, + () { + _toUserInfo(); + }, + () { + toIntegralPage(); + }, + (){ + setState(() { + totalMsg =0; + }); + }, + totalMsg, + infoNumber + ), + + ///我的 VIP等级信息 + MineVipEntry( + tag: "vip", + ranks: ranks, + userInfo: userInfo, + rank: double.tryParse( userInfo?.expendAmount ?? "0") - .toInt(), - rankMax: + .toInt(), + rankMax: userInfo?.memberRankVo?.nextOrigin ?? 0, - createTime: userInfo?.createTime ?? "", + createTime: userInfo?.createTime ?? "", + ), + + ], ), + ), + Container( + margin: EdgeInsets.only(top: 255), + child: Column( + children: [ + ///我的订单 + MineOrderView(), + + ///推广图 + spreadImage(), - ], - ), - ), + ///我的 下面item + MineItem(), + + ///我的成就 + attainment(), + + ///绿色足迹 + MineCalendar() + ], + ), + ) + ], + ) // ///关注度/粉丝/发布 // attention(), // // /// 钱包或领券中心 // WalletCoupon(), - - ///我的订单 - MineOrderView(), - - ///推广图 - spreadImage(), - - ///我的 下面item - MineItem(), - - ///我的成就 - attainment(), - - ///绿色足迹 - MineCalendar() ], ); }, @@ -404,9 +404,9 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { }, child:ClipRRect( child:Image.asset( - "assets/image/icon_story_td.webp", + "assets/image/welfare_spread.webp", width:double.infinity, - fit: BoxFit.cover, + fit: BoxFit.fill, height:80.h, ), borderRadius: BorderRadius.circular(6.w), diff --git a/lib/mine/mine_view/calendar_page.dart b/lib/mine/mine_view/calendar_page.dart new file mode 100644 index 00000000..37ffc7f2 --- /dev/null +++ b/lib/mine/mine_view/calendar_page.dart @@ -0,0 +1,88 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:table_calendar/table_calendar.dart'; + +class CalendarPage extends StatefulWidget { + @override + State createState() { + return _CalendarPage(); + } +} + +class _CalendarPage extends State with TickerProviderStateMixin { + AnimationController _animationController; + CalendarController _calendarController; + + @override + void initState() { + super.initState(); + + _calendarController = CalendarController(); + + _animationController = AnimationController( + vsync: this, + duration: const Duration(milliseconds: 400), + ); + + _animationController.forward(); + } + + @override + void dispose() { + _animationController.dispose(); + _calendarController.dispose(); + super.dispose(); + } + + void _onDaySelected(DateTime day, List events, List holidays) { + print('CALLBACK: _onDaySelected'); + } + + void _onVisibleDaysChanged(DateTime first, DateTime last, CalendarFormat format) { + print('CALLBACK: _onVisibleDaysChanged'); + } + + void _onCalendarCreated(DateTime first, DateTime last, CalendarFormat format) { + print('CALLBACK: _onCalendarCreated'); + } + + @override + Widget build(BuildContext context) { + return Container( + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + _buildTableCalendar(), + ], + ), + ); + } + + Widget _buildTableCalendar() { + return TableCalendar( + calendarController: _calendarController, + startingDayOfWeek: StartingDayOfWeek.monday, + availableGestures: AvailableGestures.none, + headerStyle: HeaderStyle( + centerHeaderTitle: false, + leftChevronVisible: false, + rightChevronVisible: false, + formatButtonVisible: false, + ), + calendarStyle: CalendarStyle( + outsideDaysVisible: false, + selectedColor: Color(0xFF32A060), + weekendStyle: TextStyle().copyWith(color: Color(0xFF333333)), + todayColor: Color(0xFFD5EBDE), + ), + daysOfWeekStyle: DaysOfWeekStyle( + weekendStyle: TextStyle().copyWith(color: Color(0xFF4D4D4D)), + ), + onDaySelected: _onDaySelected, + onVisibleDaysChanged: _onVisibleDaysChanged, + onCalendarCreated: _onCalendarCreated, + ); + } + + +} diff --git a/lib/mine/mine_view/mine_calendar.dart b/lib/mine/mine_view/mine_calendar.dart index 383ad867..63a7b85d 100644 --- a/lib/mine/mine_view/mine_calendar.dart +++ b/lib/mine/mine_view/mine_calendar.dart @@ -1,11 +1,8 @@ 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/login_tips_dialog.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:url_launcher/url_launcher.dart'; +import 'calendar_page.dart'; class MineCalendar extends StatefulWidget { @override @@ -18,10 +15,14 @@ class _MineCalendar extends State { @override Widget build(BuildContext context) { return Container( - margin: EdgeInsets.fromLTRB(16.w, 10.h, 16.w, 28.h), - padding: EdgeInsets.only(top: 12.h,left: 12,right: 12), + margin: EdgeInsets.fromLTRB(14.w, 20.h, 14.w, 30.h), + padding: EdgeInsets.only(top: 12.h,left: 12,), decoration: BoxDecoration( - color: Colors.white, + // color: Colors.white, + image: DecorationImage( + fit: BoxFit.cover, + image: AssetImage("assets/image/s_bg.webp"), + ), borderRadius: BorderRadius.circular(8), boxShadow: [ BoxShadow( @@ -32,37 +33,55 @@ class _MineCalendar extends State { ) ], ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + child: Stack( + alignment: Alignment.bottomRight, children: [ - Row( + Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded(child: Text( - "我的3月足迹日历", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontWeight: MyFontWeight.semi_bold, - fontSize: 15.sp, + GestureDetector( + onTap: (){ + Navigator.of(context).pushNamed('/router/mine_greenery'); + }, + child: Row( + children: [ + Expanded(child: Text( + "我的5月足迹日历", + style: TextStyle( + color: Color(0xFF0D0D0D), + fontWeight: MyFontWeight.semi_bold, + 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,), + ], ), - ),), - Text( - "查看绿叶", - style: TextStyle( - color: Color(0xFF000000), - fontWeight: MyFontWeight.regular, - fontSize: 15.sp, - ), - ), - Icon( - Icons.navigate_next, - size: 24, - color: Colors.black, ), + SizedBox(height: 12,), + CalendarPage(), ], ), - SizedBox(height: 12,) + Image.asset( + "assets/image/calendar.webp", + width:25, + height: 50, + fit: BoxFit.fill, + ), ], - ), + ) ); } } diff --git a/lib/mine/mine_view/mine_item.dart b/lib/mine/mine_view/mine_item.dart index 5766dfd4..176936fd 100644 --- a/lib/mine/mine_view/mine_item.dart +++ b/lib/mine/mine_view/mine_item.dart @@ -18,7 +18,7 @@ class _MineItem extends State { @override Widget build(BuildContext context) { return Container( - margin: EdgeInsets.fromLTRB(16.w, 10.h, 16.w, 27.h), + margin: EdgeInsets.fromLTRB(16.w, 20.h, 16.w, 30.h), // padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h), decoration: BoxDecoration( color: Colors.white, @@ -284,7 +284,16 @@ class _MineItem extends State { "assets/image/fan_kui.webp", ), ),), - Expanded(child:Container(),), + ///联系客服 + Expanded(child: InkWell( + onTap: () { + showCallMobile(); + }, + child: mineItem( + "联系客服", + "assets/image/icon_mine_online_service.webp", + ), + ),), Expanded(child:Container(),), Expanded(child:Container(),), ], diff --git a/lib/mine/mine_view/mine_order.dart b/lib/mine/mine_view/mine_order.dart index 81ac055d..487680b9 100644 --- a/lib/mine/mine_view/mine_order.dart +++ b/lib/mine/mine_view/mine_order.dart @@ -16,7 +16,7 @@ class _MineOrderView extends State { @override Widget build(BuildContext context) { return Container( - margin: EdgeInsets.only(left:16.w, bottom:20.h, right:16.w,), + margin: EdgeInsets.only(left:14, bottom:30, right:14), padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h), decoration: BoxDecoration( color: Colors.white, diff --git a/lib/mine/mine_view/mine_view.dart b/lib/mine/mine_view/mine_view.dart index 0cf0bc05..380366ec 100644 --- a/lib/mine/mine_view/mine_view.dart +++ b/lib/mine/mine_view/mine_view.dart @@ -9,6 +9,7 @@ import 'package:flutter_svg/svg.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/msg_stats.dart'; +import 'package:huixiang/retrofit/data/social_info.dart'; import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -28,8 +29,9 @@ class MineView extends StatefulWidget { final GestureTapCallback toIntegralPage; final Function messageZero; final int totalMsg; + final SocialInfo infoNumber; - MineView(this.userInfo, this.toUserInfo, this.toIntegralPage,this.messageZero,this.totalMsg); + MineView(this.userInfo, this.toUserInfo, this.toIntegralPage,this.messageZero,this.totalMsg,this.infoNumber); @override State createState() { @@ -65,7 +67,7 @@ class _MineView extends State { return Column( children: [ Container( - margin: EdgeInsets.only(top: 20.w), + margin: EdgeInsets.only(top: 28.w), alignment: Alignment.centerRight, child: Row( mainAxisAlignment: MainAxisAlignment.end, @@ -88,6 +90,7 @@ class _MineView extends State { "assets/image/icon_notices.webp", width:32.w, height: 32.h, + color: Colors.white, ), if(widget.totalMsg != 0) Container( @@ -130,6 +133,7 @@ class _MineView extends State { "assets/image/icon_scan_qr_code.webp", width:32.w, height: 32.h, + color: Colors.white, ), ), ), @@ -144,6 +148,7 @@ class _MineView extends State { "assets/image/icon_mine_setting.webp", width: 32.w, height: 32.h, + color: Colors.white, ), ), ), @@ -229,7 +234,7 @@ class _MineView extends State { print("---" + widget.userInfo.toString()); return Container( alignment: Alignment.center, - margin: EdgeInsets.symmetric(horizontal: 16.w), + margin: EdgeInsets.only(left: 16.w), child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, @@ -243,8 +248,8 @@ class _MineView extends State { MImage( widget.userInfo == null ? "" : widget.userInfo.headimg, isCircle: true, - width: 50, - height: 50, + width: 58, + height: 58, fit: BoxFit.cover, errorSrc: "assets/image/default_user.webp", fadeSrc: "assets/image/default_user.webp", @@ -279,7 +284,7 @@ class _MineView extends State { style: TextStyle( fontSize: 16.sp, fontWeight: MyFontWeight.medium, - color: Color(0xFF353535), + color: Color(0xFFFFFFFF), ), ), onTap: widget.toUserInfo, @@ -299,7 +304,7 @@ class _MineView extends State { style: TextStyle( fontSize: 16.sp, fontWeight: FontWeight.bold, - color: Color(0xFF353535), + color: Color(0xFFFFFFFF), ), ), ), @@ -317,31 +322,31 @@ class _MineView extends State { style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, - color: Color(0xFF2F2F2F), + color: Color(0xFFFFFFFF), ), ) : Row( children: [ Text( - "${S.of(context).guanzhu} 0", + "${S.of(context).guanzhu} ${widget?.infoNumber?.follow.toString() ?? "0"}", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, - color: Color(0xFF4D4D4D), + color: Color(0xFFFFFFFF), ), ), Container( width: 1.w, height: 12.h, margin: EdgeInsets.symmetric(horizontal: 3.w), - color: Color(0xFF4D4D4D), + color: Color(0xFFFFFFFF), ), Text( - "${S.of(context).fensi} 0", + "${S.of(context).fensi} ${widget?.infoNumber?.fans.toString() ?? "0"}", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, - color: Color(0xFF4D4D4D), + color: Color(0xFFFFFFFF), ), ), ], diff --git a/lib/store/shop__details_page.dart b/lib/store/shop__details_page.dart index c8c404ef..1470f505 100644 --- a/lib/store/shop__details_page.dart +++ b/lib/store/shop__details_page.dart @@ -5,13 +5,14 @@ import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/activity.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/miNiDetail.dart'; import 'package:huixiang/retrofit/data/shoppingCart.dart'; import 'package:huixiang/retrofit/data/store_info.dart'; import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; -import 'package:huixiang/store/store_view/product_sku.dart'; +import 'package:huixiang/store/store_view/people_num.dart'; import 'package:huixiang/store/store_view/shop_car.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; @@ -50,13 +51,18 @@ class _ShopDetailsPage extends State { String cName; String cid; List selectSkus = []; + List activitys; int counts = 1; String selectedPrice = ""; + String storeId; + String parentId; + int numberOfPeople = 0; @override void initState() { super.initState(); id = widget.arguments["id"]; + storeId = widget.arguments["storeId"]; SharedPreferences.getInstance().then((value) { String minToken = value.getString("minToken"); String tenant = value.getString("tenant"); @@ -68,8 +74,13 @@ class _ShopDetailsPage extends State { storeId: storeId, showLoading: true); queryMiNiDetail(id); + queryShopCar().then((value) { + this.shopCarGoods = value; + setState(() {}); + }); }); - + queryStoreInfo(); + buildCount(); } ///商品详情 @@ -81,6 +92,9 @@ class _ShopDetailsPage extends State { if (baseData != null && baseData.isSuccess) { setState(() { miNiDetail = baseData.data; + miNiDetail.attrList.forEach((element) { + selectSkus.add(element.attrValueList[0].attrValue); + }); }); refreshController.refreshCompleted(); } else { @@ -92,6 +106,162 @@ class _ShopDetailsPage extends State { queryMiNiDetail(id); } + /// 查询店铺信息 + queryStoreInfo() async { + SharedPreferences value = await SharedPreferences.getInstance(); + if (apiService == null) + apiService = ApiService( + Dio(), + context: context, + token: value.getString("token"), + ); + BaseData baseData = await apiService.queryStoreInfo(storeId).catchError((error) { + debugPrint(error); + }); + if (baseData != null && baseData.isSuccess) { + storeInfo = StoreInfo.fromJson(baseData.data); + activitys = storeInfo.informationVOPageVO.list + .map((e) => Activity.fromJson(e)) + .toList(); + if (mounted) { + setState(() {}); + } + } + EasyLoading.dismiss(); + } + + ///获取父订单(火锅订单加菜前调用) + getParentInfo() async { + BaseData baseData = await minService.getParentInfo("$tableId") + .catchError((error) {debugPrint(error);}); + if (baseData != null && baseData.isSuccess) { + if (baseData.data != null) { + parentId = baseData.data["id"]; + parentCode = baseData.data["parentCode"]; + } else { + ///TODO: 没有父订单, + queryStoreInfo1(); + } + } + } + + ///显示选择人数的弹窗 + showPeopleNum(String tableName) async { + var people = await showDialog( + context: context, + barrierDismissible: false, + builder: (context) { + return PeopleNumView(tableName); + }, + ); + + if (people != null && people > 0) { + setState(() { + this.numberOfPeople = people; + }); + } else { + Navigator.of(context).pop(); + } + } + + ///获取桌子信息 + queryStoreInfo1() async { + BaseData baseData = await minService.queryStoreInfo1({ + "getCoupon": true, + "storeId": storeId, + "tableId": tableId, + }).catchError((error) { + debugPrint(error); + }); + if (baseData != null && baseData.isSuccess) { + StoreInfo storeInfo = StoreInfo.fromJson(baseData.data); + if (storeInfo.storeTable != null) { + showPeopleNum(storeInfo.storeTable.tableName); + } + } + } + + ///计算个数 + int count() { + if (shopCarGoods == null || + shopCarGoods.shoppingCartSkuItemList == null || + shopCarGoods.shoppingCartSkuItemList.length == 0) return 0; + int count = 0; + shopCarGoods.shoppingCartSkuItemList.forEach((element) { + count += element.buyNum; + }); + return count; + } + + ///去下单结算页面 + toDownOrder() async { + int num = count(); + + if (parentId == null || parentId == "") { + if (num == 0) { + SmartDialog.showToast("请先选择您要购买的商品!~"); + return; + } + } + + await Navigator.of(context).pushNamed( + '/router/settlement', + arguments: { + "storeInfo": storeInfo, + "tableId": tableId, + "parentCode": parentCode, + "parentId": parentId, + // "pName": pName, + "pid": pid, + // "cName": cName, + "cid": cid, + "shoppingCart": shopCarGoods, + "numberOfPeople": numberOfPeople, + }, + ); + if (tableId > 0) { + getParentInfo(); + } + queryShopCar().then((value) { + this.shopCarGoods = value; + setState(() {}); + }); + } + + /// 购物车的key,用于刷新UI + GlobalKey shopCartKey = GlobalKey(); + + ///购物车弹窗 + showShoppingCart() { + queryShopCar().then((value) { + this.shopCarGoods = value; + dialogShowing = true; + SmartDialog.show( + widget: ShopCar( + shopCartKey, + this.shopCarGoods, + clearShopCar, + toDownOrder, + shopCartAdd, + shopCartReduce, + ), + onDismiss: () { + dialogShowing = false; + }, + alignmentTemp: Alignment.bottomCenter, + ); + }); + } + + ///清空购物车 + clearShopCar() async { + BaseData baseData = await minService.clearShoppingCart(); + if (baseData.isSuccess) { + shopCarGoods = null; + setState(() {}); + } + } + ///选规格 _queryMiNiDetail(String id, int count) async { EasyLoading.show(status: S.current.zhengzaijiazai); @@ -116,24 +286,9 @@ class _ShopDetailsPage extends State { if (miNiDetail.attrList != null && miNiDetail.attrList.length == 1 && miNiDetail.attrList[0].attrValueList.length == 1) { - _addShopCar(miNiDetail, [], count); + _addShopCar(miNiDetail, [], counts); } else { - EasyLoading.dismiss(); - dialogShowing = true; - SmartDialog.show( - widget: ProductSku( - miNiDetail, - shopCarGoods, - id, - _addShopCar, - add, - reduce, - ), - onDismiss: () { - dialogShowing = false; - }, - alignmentTemp: Alignment.bottomCenter, - ); + showSpanDialog(); } } @@ -166,7 +321,9 @@ class _ShopDetailsPage extends State { BaseData> baseDate = await minService.addShoppingCart({ "storeId": storeInfo.id, "storeName": storeInfo.storeName ?? "", - "parentId": miNiDetail.id, + "numberOfPeople": numberOfPeople, + "tableId": tableId, + "parentId": parentId, "parentCode": parentCode, "shoppingCartSkuItemList": [ { @@ -178,6 +335,7 @@ class _ShopDetailsPage extends State { "storeId": storeInfo.id, "skuPrice": productSku.skuPrice, "skuStock": productSku.skuStock, + "tableId": tableId, }, ], }); @@ -188,91 +346,18 @@ class _ShopDetailsPage extends State { setState(() {}); }); } - } - } - - /// 购物车的key,用于刷新UI - GlobalKey shopCartKey = GlobalKey(); - - ///购物车弹窗 - showShoppingCart() { - queryShopCar().then((value) { - this.shopCarGoods = value; - dialogShowing = true; - SmartDialog.show( - widget: ShopCar( - shopCartKey, - this.shopCarGoods, - clearShopCar, - toDownOrder, - shopCartAdd, - shopCartReduce, - ), - onDismiss: () { - dialogShowing = false; - }, - alignmentTemp: Alignment.bottomCenter, - ); - }); - } - - ///计算个数 - int count() { - if (shopCarGoods == null || - shopCarGoods.shoppingCartSkuItemList == null || - shopCarGoods.shoppingCartSkuItemList.length == 0) return 0; - int count = 0; - shopCarGoods.shoppingCartSkuItemList.forEach((element) { - count += element.buyNum; - }); - return count; - } - - ///去下单结算页面 - toDownOrder() async { - int num = count(); - - if (miNiDetail.id == null || miNiDetail.id == "") { - if (num == 0) { - SmartDialog.showToast("请先选择您要购买的商品!~"); - return; + else { + SmartDialog.showToast(baseDate?.msg, alignment: Alignment.center); } } - - await Navigator.of(context).pushNamed( - '/router/settlement', - arguments: { - "storeInfo": storeInfo, - "parentCode": parentCode, - "parentId": miNiDetail.id, - // "pName": pName, - // "pid": pid, - // "cName": cName, - // "cid": cid, - "shoppingCart": shopCarGoods, - }, - ); - queryShopCar().then((value) { - this.shopCarGoods = value; - setState(() {}); - }); - } - - ///清空购物车 - clearShopCar() async { - BaseData baseData = await minService.clearShoppingCart(); - if (baseData.isSuccess) { - shopCarGoods = null; - setState(() {}); - } } ///查询购物车 Future queryShopCar() async { - // pName = ""; //活动 - // pid = ""; //活动 - // cName = ""; //优惠券 - // cid = ""; //优惠券 + pName = ""; //活动 + pid = ""; //活动 + cName = ""; //优惠券 + cid = ""; //优惠券 BaseData> baseDate = await minService.getShoppingCart(tableId); if (baseDate != null && @@ -282,14 +367,14 @@ class _ShopDetailsPage extends State { if (baseDate.data[0].selectDiscount == 1) { baseDate.data[0].couponList.forEach((element) { if (element.isMaxCoupon) { - cName = element.promotionName; + // cName = element.promotionName; cid = element.id; } }); } else if (baseDate.data[0].selectDiscount == 2) { baseDate.data[0].promotionInfoList.forEach((element) { if (element.isMaxPromotion) { - pName = element.name; + // pName = element.name; pid = element.id; } }); @@ -528,12 +613,8 @@ class _ShopDetailsPage extends State { ), flex: 1, ), - // if(count() != 0) - Positioned( - bottom: 0, - left: 0, - right: 0, - child: Stack( + if(count() != 0) + Stack( alignment: Alignment.bottomLeft, children: [ Container( @@ -621,7 +702,6 @@ class _ShopDetailsPage extends State { ), ], ), - ), ], ), ), @@ -680,7 +760,7 @@ class _ShopDetailsPage extends State { )), GestureDetector( onTap: () { - showDeleteDialog(); + _queryMiNiDetail(id,counts); }, child: Container( width: 92.w, @@ -750,7 +830,7 @@ class _ShopDetailsPage extends State { Widget swiper() { return Container( child: AspectRatio( - aspectRatio: 1.3698, + aspectRatio: 375/375, child: Stack( children: [ Swiper( @@ -767,7 +847,7 @@ class _ShopDetailsPage extends State { itemBuilder: (context, position) { return MImage( miNiDetail?.imgs != null ? miNiDetail.imgs[position]:"", - fit: BoxFit.cover, + fit: BoxFit.fill, radius: BorderRadius.zero, errorSrc: "assets/image/default_2_1.webp", fadeSrc: "assets/image/default_2_1.webp", @@ -796,196 +876,218 @@ class _ShopDetailsPage extends State { } ///选择規格弹窗 - showDeleteDialog() { + showSpanDialog() { showDialog( context: context, builder: (context) { - return AlertDialog( - content: Container( - width: MediaQuery.of(context).size.width - 84, - height: 500.h, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ClipRRect( - child: MImage( - miNiDetail.imgs[0], - fit: BoxFit.cover, - width: 70, - height: 70, - errorSrc: "assets/image/default_2_1.webp", - fadeSrc: "assets/image/default_2_1.webp", + return StatefulBuilder(builder: ( + context, + state, + ) + { + return AlertDialog( + content: Container( + width: MediaQuery + .of(context) + .size + .width - 84, + height: 500.h, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ClipRRect( + child: MImage( + miNiDetail.imgs[0], + fit: BoxFit.cover, + width: 70, + height: 70, + errorSrc: "assets/image/default_2_1.webp", + fadeSrc: "assets/image/default_2_1.webp", + ), + borderRadius: BorderRadius.circular(4), ), - borderRadius: BorderRadius.circular(4), - ), + SizedBox( + width: 10.w, + ), + Expanded( + child: Container( + height: 70, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment + .spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + miNiDetail?.productName ?? "", + style: TextStyle( + fontSize: 13.sp, + fontWeight: FontWeight.bold, + color: Color(0xFF000000), + ), + ), + GestureDetector( + onTap: () { + Navigator.of(context).pop(); + }, + child: Image.asset( + "assets/image/cancel.webp", + fit: BoxFit.cover, + height: 24, + width: 24, + ), + ), + ], + ), + Text( + "¥${miNiDetail?.price ?? ""}", + style: TextStyle( + fontSize: 12.sp, + fontWeight: FontWeight.bold, + color: Color(0xFFF65720), + ), + ), + ], + ), + )), + ], + ), + if (miNiDetail.attrList != null && + miNiDetail.attrList.length > 0) SizedBox( - width: 10.w, + height: 10, ), + if (miNiDetail.attrList != null && + miNiDetail.attrList.length > 0) Expanded( - child: Container( - height: 70, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, + child: ListView.builder( + itemCount: miNiDetail.attrList.length, + scrollDirection: Axis.vertical, + physics: BouncingScrollPhysics(), + padding: EdgeInsets.zero, + itemBuilder: (context, position) { + return attrItem( + (attrValue) { + state(() { + // if(selectSkus.length > position) + selectSkus[position] = attrValue; + buildCount(); + }); + }, + miNiDetail.attrList[position], + position, + ); + }, + ), + ), + SizedBox( + height: 24, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "数量", + style: TextStyle( + color: Color(0xFFB3B3B3), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ), + SizedBox(height: 10,), + Row( children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - miNiDetail?.productName ?? "", - style: TextStyle( - fontSize: 13.sp, - fontWeight: FontWeight.bold, - color: Color(0xFF000000), - ), - ), - GestureDetector( - onTap: (){ - Navigator.of(context).pop(); - }, - child: Image.asset( - "assets/image/cancel.webp", - fit: BoxFit.cover, - height: 24, - width: 24, - ), - ), - ], + InkWell( + onTap: () { + state(() { + if (counts > 1) + setState(() { + counts -= 1; + }); + reduce(miNiDetail, selectSkus); + }); + }, + child: Icon( + Icons.remove, + color: Color(0xFF32A060), + size: 24, + ) + // Image.asset( + // "assets/image/reduce.webp", + // width: 22, + // height: 22, + // ), ), - Text( - "¥${miNiDetail?.price ?? ""}", - style: TextStyle( - fontSize: 12.sp, - fontWeight: FontWeight.bold, - color: Color(0xFFF65720), + Padding( + padding: EdgeInsets.only(left: 8, right: 8), + child: Text( + "$counts", + style: TextStyle( + color: Colors.black, + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + ), ), ), + InkWell( + onTap: () { + state(() { + counts += 1; + add(miNiDetail, selectSkus); + }); + }, + child: Icon( + Icons.add, + color: Color(0xFF32A060), + size: 24, + ) + ), ], + ) + ], + ), + SizedBox( + height: 24, + ), + GestureDetector( + onTap: () { + state(() { + _addShopCar(miNiDetail, selectSkus, counts); + Navigator.of(context).pop(); + }); + }, + child: Container( + width: double.infinity, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + color: Color(0xFF32A060), ), - )), - ], - ), - // if (miNiDetail.attrList != null && miNiDetail.attrList.length > 0) - // SizedBox( - // height:10, - // ), - // if (miNiDetail.attrList != null && miNiDetail.attrList.length > 0) - // Expanded( - // child: ListView.builder( - // itemCount: miNiDetail.attrList.length, - // scrollDirection: Axis.vertical, - // physics: BouncingScrollPhysics(), - // padding: EdgeInsets.zero, - // itemBuilder: (context, position) { - // return attrItem( - // (attrValue) { - // setState(() { - // selectSkus[position] = attrValue; - // buildCount(); - // }); - // }, - // miNiDetail.attrList[position], - // position, - // ); - // }, - // ), - // ), - SizedBox( - height: 24, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text( - "数量", - style: TextStyle( - color: Color(0xFFB3B3B3), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - ), - ), - SizedBox(height: 10,), - Row( - children: [ - InkWell( - onTap: () { - if (counts > 1) - setState(() { - counts -= 1; - }); - reduce(miNiDetail, selectSkus); - }, - child: Icon( - Icons.remove, - color: Color(0xFF32A060), - size: 24, - ) - // Image.asset( - // "assets/image/reduce.webp", - // width: 22, - // height: 22, - // ), + padding: EdgeInsets.symmetric(vertical: 6), + child: Text( + "加入购物车", + style: TextStyle( + fontSize: 15.sp, + fontWeight: MyFontWeight.bold, + color: Color(0xFFFFFFFF), ), - Padding( - padding: EdgeInsets.only(left: 8, right: 8), - child: Text( - // "$count", - "0", - style: TextStyle( - color: Colors.black, - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - ), - ), - ), - InkWell( - onTap: () { - setState(() { - counts += 1; - }); - add(miNiDetail, selectSkus); - }, - child:Icon( - Icons.add, - color: Color(0xFF32A060), - size: 24, - ) - ), - ], - ) - ], - ), - SizedBox( - height: 24, - ), - Container( - width: double.infinity, - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(20), - color: Color(0xFF32A060), - ), - padding: EdgeInsets.symmetric(vertical: 6), - child: Text( - "加入购物车", - style: TextStyle( - fontSize: 15.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFFFFFFFF), + ), ), - ), - ) - ], + ) + ], + ), ), - ), - ); + ); + }); }, ); } @@ -1026,7 +1128,7 @@ class _ShopDetailsPage extends State { }, child:sweetnessItem( tag.attrValue, - (tag.attrValue == selectSkus[position]) ?? false, + (selectSkus.length > position && tag.attrValue == selectSkus[position]), )); }).toList()); } diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index c7b85641..1ae3aa53 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -340,7 +340,7 @@ class _StoreOrderPage extends State ], ), ), - top:226.h, + top:233.h, bottom: 0, left: 0, right: 0, @@ -407,6 +407,12 @@ class _StoreOrderPage extends State minToken, tenant, _queryMiNiDetail, + (){ + queryShopCar().then((value) { + this.shopCarGoods = value; + setState(() {}); + }); + } ), ///星店活动, @@ -619,7 +625,7 @@ class _StoreOrderPage extends State Widget buildSwiper() { return Container( width: double.infinity, - height: 230.h, + height: 235.h, child: Swiper( pagination: SwiperPagination( alignment: Alignment.bottomCenter, diff --git a/lib/store/store_view/store_order_list.dart b/lib/store/store_view/store_order_list.dart index 965d5db3..cda12941 100644 --- a/lib/store/store_view/store_order_list.dart +++ b/lib/store/store_view/store_order_list.dart @@ -22,6 +22,8 @@ class StoreOrderListPage extends StatefulWidget { final String minToken; final String tenant; final Function(String id, int count) queryMiNiDetail; + final Function queryShoppingCart; + ShoppingCart shopCarGoods; @@ -34,6 +36,7 @@ class StoreOrderListPage extends StatefulWidget { this.minToken, this.tenant, this.queryMiNiDetail, + this.queryShoppingCart, ); @override @@ -126,11 +129,7 @@ class _StoreOrderListPage extends State { itemBuilder: (context, position) { return GestureDetector( onTap: () { - setState(() { - Navigator.of(context).pushNamed('/router/shop_details_page',arguments: { - "id":productListBeans[position].id, - }); - }); + goShopDetailsPage(position); }, child: goodsItem(position), ); @@ -142,6 +141,14 @@ class _StoreOrderListPage extends State { ); } + goShopDetailsPage(position) async{ + await Navigator.of(context).pushNamed('/router/shop_details_page',arguments: { + "id":productListBeans[position].id, + "storeId":productListBeans[position].storeId, + }); + widget. queryShoppingCart(); + } + Widget orderItem(FindMiNiGroupList findMiNiGroupList, int index) { int count = calculateItemCount(findMiNiGroupList); return Container( diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index ced3837b..0b3eda52 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -9,8 +9,6 @@ import 'package:flutter_baidu_mapapi_utils/flutter_baidu_mapapi_utils.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/main.dart'; -import 'package:huixiang/mine/coupons_page.dart'; -import 'package:huixiang/mine/vip_card_page.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/store.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; @@ -20,8 +18,6 @@ import 'package:huixiang/utils/location.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'; -import 'package:huixiang/view_widget/icon_text.dart'; -import 'package:huixiang/view_widget/item_title.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_tab.dart'; import 'package:huixiang/view_widget/request_permission.dart'; diff --git a/lib/view_widget/mine_vip_entry.dart b/lib/view_widget/mine_vip_entry.dart new file mode 100644 index 00000000..bebbb23d --- /dev/null +++ b/lib/view_widget/mine_vip_entry.dart @@ -0,0 +1,193 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/retrofit/data/rank.dart'; +import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:huixiang/view_widget/login_tips_dialog.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +class MineVipEntry extends StatelessWidget { + int vipLevel; + int curLevel; + final int rankMax; + final int rank; + final String createTime; + final String tag; + final double padding; + final UserInfo userInfo; + final List ranks; + + MineVipEntry( + {this.vipLevel = 1, + this.ranks, + this.tag, + this.userInfo, + this.padding = 16, + this.curLevel = 1, + this.rankMax = 0, + this.rank = 0, + this.createTime = ""}); + + String topLeft = ""; + String levelText = "普通用户"; + + @override + Widget build(BuildContext context) { + if (userInfo != null && + userInfo.memberRankVo != null && + ranks != null && + ranks.length > 0) { + curLevel = (ranks.indexWhere((element) => element.id == userInfo.memberRankVo.id) + 1); + vipLevel = curLevel; + } + + if (curLevel == vipLevel) { + topLeft = S.of(context).dangqiandengji; + } else if (vipLevel < curLevel) { + topLeft = S.of(context).shangyidengji; + } else { + topLeft = S.of(context).zanweikaitong; + } + switch (vipLevel) { + case 1: + { + levelText = "${S.of(context).yinkahuiyuan}"; + break; + } + case 2: + { + levelText = "${S.of(context).jinkahuiyuan}"; + break; + } + case 3: + { + levelText = "${S.of(context).gongchuanghuiyuan}"; + break; + } + } + + Widget widget = Container( + width: double.infinity, + padding: EdgeInsets.only(top: 12.h, bottom: 25.h, left: 12, right: 12), + // margin: EdgeInsets.symmetric(horizontal: 14), + margin: EdgeInsets.only(top: 15,left: 14,right: 14), + decoration: BoxDecoration( + color: Color(0xFF3D3D5D), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(6), + topRight: Radius.circular(6), + ), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ) + ], + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Image.asset( + "assets/image/vip_logo.webp", + width: 24, + height: 24, + ), + SizedBox( + width: 4, + ), + Expanded( + child: Text( + levelText, + style: TextStyle( + fontSize: 16, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFFFFEAD2)), + )), + Container( + padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h), + decoration: BoxDecoration( + color: Color(0xFFFFECD2), + borderRadius: BorderRadius.circular(10), + ), + child: Text( + S.of(context).chakanquanyi, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFF92755D), + ), + ), + ) + ], + ), + SizedBox( + height: 14, + ), + Container( + height: 8.h, + child: ClipRRect( + borderRadius: BorderRadius.circular(6.5), + child: LinearProgressIndicator( + value: rankMax > (rank ?? 0) + ? ((vipLevel < curLevel) + ? rankMax / rankMax + : (rank ?? 0) / rankMax) + : 0, + backgroundColor: Color(0xFF222233), + color: Color(0xFFFFECD2), + ), + ), + ), + SizedBox( + height: 8, + ), + Text( + rank > rankMax + ? S.of(context).dangqiandengji + : "消费金额¥${rank.toStringAsFixed(2).toString()} 距${S.of(context).xiayidengji}还需¥${(rankMax - (rank ?? 0)).toStringAsFixed(2)}", + style: TextStyle( + color: Color(0xFFFFEAD2), + fontWeight: MyFontWeight.regular, + fontSize: 14.sp, + ), + ) + ], + )); + + return GestureDetector( + onTap: () { + if (userInfo != null) { + SharedPreferences.getInstance().then((value) { + if (value.getString("token") == null || + value.getString("token") == "") { + LoginTipsDialog().show(context); + return; + } + // Navigator.of(context) + // .pushNamed('/router/mine_vip_level_page', arguments: { + // "rankLevel": curLevel, + // "createTime": (userInfo != null) ? "${userInfo.createTime}" : "", + // "points": (userInfo != null) ? int.tryParse(userInfo.points) : 0, + // }); + Navigator.of(context) + .pushNamed('/router/mine_vip_core', arguments: { + "rankLevel": curLevel, + "userInfo": userInfo.masterCardRankName, + "createTime": (userInfo != null) ? "${userInfo.createTime}" : "", + "expendAmount": + double.tryParse(userInfo?.expendAmount ?? "0").toInt(), + }); + }); + } + }, + child: widget, + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index 8b091912..6adae494 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -644,6 +644,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.3.2" + simple_gesture_detector: + dependency: transitive + description: + name: simple_gesture_detector + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.1.6" sky_engine: dependency: transitive description: flutter @@ -677,6 +684,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" + table_calendar: + dependency: "direct main" + description: + name: table_calendar + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.3" term_glyph: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index fe5406cd..d91b5c92 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -91,6 +91,8 @@ dependencies: ai_decimal_accuracy: ^1.1.0 + table_calendar: ^2.3.3 +