From c99b68df97589b7dc135d5c4d212fdcd3b249826 Mon Sep 17 00:00:00 2001 From: fmk Date: Wed, 13 Oct 2021 20:43:09 +0800 Subject: [PATCH] safety --- lib/store/store_order.dart | 146 +++++++++++++-------- lib/store/store_view/product_sku.dart | 113 ++++++++-------- lib/store/store_view/shop_car.dart | 97 +++++++------- lib/store/store_view/shop_goods.dart | 134 ++++++++++--------- lib/store/store_view/store_order_list.dart | 48 ++++--- pubspec.lock | 7 + pubspec.yaml | 3 +- 7 files changed, 312 insertions(+), 236 deletions(-) diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index d2473e87..4dadfc0f 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -1,3 +1,4 @@ +import 'package:ai_decimal_accuracy/ai_decimal_accuracy.dart'; import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/gestures.dart'; @@ -40,18 +41,21 @@ class StoreOrderPage extends StatefulWidget { } class _StoreOrderPage extends State - with TickerProviderStateMixin, AutomaticKeepAliveClientMixin { + with TickerProviderStateMixin/*, AutomaticKeepAliveClientMixin*/ { TabController tabcontroller; ApiService apiService; MinApiService minService; StoreInfo storeInfo; List activitys; RefreshController refreshController; - List _widgetOptions; + int allCount = 0; double allPrice = 0; StoreOrderListPage storeOrderListPage; + List productLists = []; + List> shopCarGoods = []; + ScrollController controller = ScrollController(); @override @@ -63,43 +67,20 @@ class _StoreOrderPage extends State length: 2, vsync: this, ); - storeOrderListPage = StoreOrderListPage(widget.arguments, activitys, - storeInfo, controller, _queryMiNiDetail, _fc); - _widgetOptions = [ - storeOrderListPage, - - ///星店活动, - StoreActivity( - widget.arguments, - activitys, - ), - ]; minLogin(); queryStoreInfo(); } - _fc(ProductListBean plb) { + _fc(int count, String productId, int allCount, double allPrice) { + if (count == 0) { + int index = shopCarGoods.indexWhere((element) => element["id"] == productId); + shopCarGoods.removeAt(index); + } + setState(() { - allCount = 0; - allPrice = 0; - bool flag = false; - for (var i = 0; i < productLists.length; i++) { - if (productLists[i].id == plb.id) { - flag = true; - if (plb.buyNum == 0) - productLists.removeAt(i); - else - productLists[i] = plb; - break; - } - } - storeOrderListPage.notifyList(productLists); - if (!flag && plb.buyNum != 0) productLists.add(plb); - productLists.forEach((element) { - allCount += element.buyNum; - allPrice += double.parse(element.price) * element.buyNum; - }); + this.allCount = allCount; + this.allPrice = allPrice; }); } @@ -321,7 +302,23 @@ class _StoreOrderPage extends State }, body: TabBarView( physics: BouncingScrollPhysics(), - children: _widgetOptions, + children: [ + StoreOrderListPage( + widget.arguments, + activitys, + storeInfo, + shopCarGoods, + controller, + _queryMiNiDetail, + _fc, + ), + + ///星店活动, + StoreActivity( + widget.arguments, + activitys, + ), + ], controller: tabcontroller, ), ), @@ -350,7 +347,7 @@ class _StoreOrderPage extends State ), ), Text( - "¥" + allPrice.toString(), + "¥$allPrice", style: TextStyle( fontSize: 20.sp, fontWeight: MyFontWeight.medium, @@ -384,9 +381,7 @@ class _StoreOrderPage extends State children: [ InkWell( onTap: () { - setState(() { - showShoppingCart(); - }); + showShoppingCart(); }, child: Image.asset( "assets/image/shopp.png", @@ -401,7 +396,7 @@ class _StoreOrderPage extends State child: RoundButton( width: 17, height: 17, - text: allCount.toString(), + text: "$allCount", textColor: Colors.white, fontWeight: MyFontWeight.regular, backgroup: Color(0xFF32A060), @@ -455,21 +450,38 @@ class _StoreOrderPage extends State ); } - List productLists = []; - ///购物车弹窗 showShoppingCart() { + + List shopCar = []; + + if (shopCarGoods != null && shopCarGoods.length > 0) { + shopCarGoods.forEach((element) { + ProductListBean productListBean = productLists.firstWhere((element1) { + return element["id"] == element1.id; + }); + if (productListBean != null) { + shopCar.add(productListBean); + } + }); + } + showModalBottomSheet( context: context, backgroundColor: Colors.transparent, builder: (context) { return ShopCar( - productLists, - _queryMiNiDetail, - (ProductListBean productListBeans) { + shopCar, + shopCarGoods, + (int count, String productId, allCount, allPrice) { + if (count == 0) { + int index = shopCarGoods.indexWhere((element) => element["id"] == productId); + shopCarGoods.removeAt(index); + } + print("shopCarCount: $allCount allPrice: $allPrice "); setState(() { - // this.allCount = allCount; - // this.allPrice = allPrice; + this.allCount = allCount; + this.allPrice = allPrice; }); }, ); @@ -481,9 +493,7 @@ class _StoreOrderPage extends State _queryMiNiDetail(String id) async { BaseData baseData = await minService.miNiDetail(id); if (baseData != null && baseData.isSuccess) { - setState(() { - showStoreSelector(baseData.data); - }); + showStoreSelector(baseData.data, id); } } @@ -500,18 +510,46 @@ class _StoreOrderPage extends State } ///选规格弹窗 - showStoreSelector(MiNiDetail miNiDetail) { - showModalBottomSheet( + showStoreSelector(MiNiDetail miNiDetail, String id) async { + var result = await showModalBottomSheet( context: context, backgroundColor: Colors.transparent, builder: (context) { - return ProductSku(miNiDetail); + return ProductSku(miNiDetail, id); }, ); + if (result != null) { + if (shopCarGoods == null || shopCarGoods.length == 0) { + shopCarGoods = []; + shopCarGoods.add(result); + } else { + Map map; + shopCarGoods.forEach((element) { + if (element["id"] == result["id"]) { + map = element; + } + }); + print("result000: $map"); + if (map != null) { + int index = shopCarGoods.indexWhere((element) => element["id"] == result["id"]); + shopCarGoods.removeAt(index); + shopCarGoods.insert(index, result); + } else { + shopCarGoods.add(result); + } + } + calculatePrice(); + } + print("result111: $shopCarGoods"); } - @override - bool get wantKeepAlive => true; + calculatePrice() { + + setState(() {}); + } + + // @override + // bool get wantKeepAlive => true; } class Title extends StatefulWidget { diff --git a/lib/store/store_view/product_sku.dart b/lib/store/store_view/product_sku.dart index f32b4f5a..179f09a5 100644 --- a/lib/store/store_view/product_sku.dart +++ b/lib/store/store_view/product_sku.dart @@ -9,8 +9,9 @@ import 'package:huixiang/view_widget/round_button.dart'; class ProductSku extends StatefulWidget { final MiNiDetail miNiDetail; + final String productId; - ProductSku(this.miNiDetail); + ProductSku(this.miNiDetail, this.productId); @override State createState() { @@ -19,13 +20,33 @@ class ProductSku extends StatefulWidget { } class _ProductSku extends State { - int isChoice = 0; - int tempClickIndex = 0; + List selectSkus = []; + int selectCount = 1; + + Map tempSelected = {}; + + @override + void initState() { + super.initState(); + + if (widget.miNiDetail != null) { + tempSelected["id"] = widget.productId; + tempSelected["count"] = 1; + tempSelected["price"] = widget.miNiDetail.price; + if (tempSelected["attr"] == null) + tempSelected["attr"] = []; + widget.miNiDetail.attrList.forEach((element) { + selectSkus.add(element.attrValueList[0].attrValue); + (tempSelected["attr"] as List).add({ + "attrId": "${element.id}", + "attrValue": "${element.attrValueList[0].id}", + }); + }); + } + } @override Widget build(BuildContext context) { - String selectSku = ""; - int selectCount = 1; return StatefulBuilder(builder: (context1, state) { return Container( alignment: Alignment.topCenter, @@ -75,7 +96,7 @@ class _ProductSku extends State { Padding( padding: EdgeInsets.only(top: 4, bottom: 7), child: Text( - "已选:" + selectSku, + "已选: " + (selectSkus.map((e) => "$e").toList().toString()), style: TextStyle( color: Color(0xFF727272), fontSize: 11.sp, @@ -128,30 +149,22 @@ class _ProductSku extends State { physics: BouncingScrollPhysics(), itemBuilder: (context, position) { return attrItem( - () { + (index) { + if (tempSelected["attr"] == null) { + tempSelected["attr"] = []; + } + (tempSelected["attr"] as List).add({ + "attrId": "${widget.miNiDetail.attrList[position].id}", + "attrValue": "${widget.miNiDetail.attrList[position].attrValueList[index].id}", + }); + state(() { - for (var i = 0; - i < - widget.miNiDetail.attrList[position] - .attrValueList.length; - i++) { - if (tempClickIndex == i) - widget.miNiDetail.attrList[position] - .attrValueList[i].isSelected = true; - else - widget.miNiDetail.attrList[position] - .attrValueList[i].isSelected = false; - } - selectSku = ""; - widget.miNiDetail.attrList.forEach((e0) { - e0.attrValueList.forEach((e1) { - if (e1.isSelected ?? false) - selectSku += e1.attrValue + " "; - }); - }); + selectSkus[position] = widget.miNiDetail + .attrList[position].attrValueList[index].attrValue; }); }, widget.miNiDetail.attrList[position], + position, ); }, ), @@ -177,6 +190,7 @@ class _ProductSku extends State { state(() { if (selectCount > 1) selectCount--; }); + tempSelected["count"] = selectCount; }, child: Image.asset( "assets/image/reduce.png", @@ -199,6 +213,7 @@ class _ProductSku extends State { onTap: () { state(() { selectCount++; + tempSelected["count"] = selectCount; }); }, child: Image.asset( @@ -212,29 +227,18 @@ class _ProductSku extends State { SizedBox( height: 24, ), - GestureDetector( - onTap: () { - bool flag = false; - widget.miNiDetail.productSkuVOList.forEach((element) { - if (selectSku.trim() == element.skuNameStr) { - Navigator.of(context).pop(); - flag = true; - } - }); - if (!flag) - SmartDialog.showToast("请选择規格!", alignment: Alignment.center); + RoundButton( + width: double.infinity, + height: 54.h, + text: "加入购物车", + textColor: Colors.white, + fontWeight: MyFontWeight.semi_bold, + radius: 27, + backgroup: Color(0xFF32A060), + fontSize: 16.sp, + callback: () { + Navigator.of(context).pop(tempSelected); }, - child: RoundButton( - width: double.infinity, - height: 54.h, - text: "加入购物车", - textColor: Colors.white, - fontWeight: MyFontWeight.semi_bold, - radius: 27, - backgroup: Color(0xFF32A060), - fontSize: 16.sp, - // padding: EdgeInsets.symmetric(vertical: 5.h), - ), ), SizedBox( height: 21.h, @@ -245,7 +249,7 @@ class _ProductSku extends State { }); } - Widget attrItem(Function fc, AttrListBean attrListBean) { + Widget attrItem(Function fc, AttrListBean attrListBean, position) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -260,12 +264,12 @@ class _ProductSku extends State { ), ), ), - sweetnessStore(fc, attrListBean.attrValueList), + sweetnessStore(fc, attrListBean.attrValueList, position), ], ); } - Widget sweetnessStore(Function fc, List arrays) { + Widget sweetnessStore(Function fc, List arrays, position) { return GridView.builder( itemCount: arrays.length, shrinkWrap: true, @@ -283,11 +287,12 @@ class _ProductSku extends State { itemBuilder: (context, index) { return GestureDetector( onTap: () { - tempClickIndex = index; - fc(); + fc(index); }, child: sweetnessItem( - arrays[index].attrValue, arrays[index].isSelected ?? false), + arrays[index].attrValue, + (arrays[index].attrValue == selectSkus[position]) ?? false, + ), ); }, ); diff --git a/lib/store/store_view/shop_car.dart b/lib/store/store_view/shop_car.dart index 8ed3e9bd..b37b4cce 100644 --- a/lib/store/store_view/shop_car.dart +++ b/lib/store/store_view/shop_car.dart @@ -8,60 +8,35 @@ import 'package:huixiang/view_widget/round_button.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ShopCar extends StatefulWidget { - final List productLists; final Function(String id) queryMiNiDetail; - final Function(ProductListBean productListBeans) fc; + final List> shopCarGoods; + + final Function(int count, String productId, int allCount, double allPrice) fc; ShopCar( this.productLists, - this.queryMiNiDetail, + this.shopCarGoods, this.fc, + { + this.queryMiNiDetail, + } ); @override State createState() { - return _ShopCar(); + return _ShopCar(this.shopCarGoods); } } class _ShopCar extends State { - int allCount = 0; - double allPrice = 0; + int allCount; + double allPrice; - ProductListBean productListBeans; + final List> shopCarGoods; - @override - void initState() { - super.initState(); - _fc(null); - } - - _fc(ProductListBean plb) { - setState(() { - if(plb != null){ - allCount = 0; - allPrice = 0; - bool flag = false; - for(var i = 0;i < widget.productLists.length;i++){ - if(widget.productLists[i].id == plb.id){ - flag = true; - if(plb.buyNum == 0) - widget.productLists.removeAt(i); - else widget.productLists[i] = plb; - break; - } - } - if(!flag) - widget.productLists.add(plb); - } - widget.productLists.forEach((element) { - allCount += element.buyNum; - allPrice += double.parse(element.price) * element.buyNum; - }); - }); - } + _ShopCar(this.shopCarGoods); @override Widget build(BuildContext context) { @@ -102,8 +77,7 @@ class _ShopCar extends State { ), InkWell( onTap: () { - state(() { - }); + state(() {}); }, child: Image.asset( "assets/image/delete.png", @@ -129,20 +103,31 @@ class _ShopCar extends State { return GestureDetector( onTap: () {}, child: ShopGoods( - widget.productLists, - position, - widget.queryMiNiDetail, - (ProductListBean productListBeans){ - widget.fc(productListBeans); - setState(() { - this.productListBeans = productListBeans; + widget.productLists[position], + (int count, String productId) { + int index = shopCarGoods.indexWhere((element) => element["id"] == productId); + if (count == 0) { + shopCarGoods.removeAt(index); + } + Map map = shopCarGoods.firstWhere((element) => element["id"] == productId); + map["count"] = count; + shopCarGoods[index] = map; + + shopCarGoods.forEach((element) { + if (element["price"] != null && element["price"] != "") { + double singlePrice = double.tryParse(element["price"]); + allCount += element["count"]; + allPrice += (singlePrice * element["count"]); + } }); + + widget.fc(count, productId, allCount, allPrice); + + state((){}); }, + shopCarGoods: _shopCarGoods(position), + queryMiNiDetail: widget.queryMiNiDetail, ), - // child: ShopGoods(widget.productLists, position, widget.queryMiNiDetail, (plb){setState(() { - // _fc(plb); - // widget.fc(plb); - // });}), ); }, ), @@ -244,4 +229,14 @@ class _ShopCar extends State { ); }); } -} \ No newline at end of file + + Map _shopCarGoods(int position) { + widget.shopCarGoods.forEach((element) { + if (widget.productLists[position].id == element["id"]) { + return element; + } + }); + return null; + } + +} diff --git a/lib/store/store_view/shop_goods.dart b/lib/store/store_view/shop_goods.dart index a6944721..4ba3f944 100644 --- a/lib/store/store_view/shop_goods.dart +++ b/lib/store/store_view/shop_goods.dart @@ -7,17 +7,17 @@ import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/round_button.dart'; class ShopGoods extends StatefulWidget { - final List productListBeans; - final int position; + final ProductListBean productList; final Function(String id) queryMiNiDetail; - final Function(ProductListBean productListBeans) fc; + final Function(int count, String productId) fc; + final Map shopCarGoods; ShopGoods( - this.productListBeans, - this.position, + this.productList, + this.fc, { this.queryMiNiDetail, - this.fc, - ); + this.shopCarGoods, + }); @override State createState() { @@ -26,20 +26,25 @@ class ShopGoods extends StatefulWidget { } class _ShopGoods extends State { + @override Widget build(BuildContext context) { + int buyNum = _count(); + print("result:11 $buyNum"); return Container( color: Colors.white, - padding: EdgeInsets.only(right: 16.w, bottom: 10.h, top: 10.h), + padding: EdgeInsets.only( + right: 16.w, + bottom: 10.h, + top: 10.h, + ), child: Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ SizedBox(width: 12.w), MImage( - widget.productListBeans[widget.position] != null - ? widget.productListBeans[widget.position].imgPath - : "", + widget.productList != null ? widget.productList.imgPath : "", width: 70, height: 70, fit: BoxFit.cover, @@ -54,7 +59,7 @@ class _ShopGoods extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - widget.productListBeans[widget.position].productName, + widget.productList.productName, style: TextStyle( color: Colors.black, fontSize: 13.sp, @@ -68,7 +73,7 @@ class _ShopGoods extends State { children: [ Expanded( child: Text( - widget.productListBeans[widget.position].shortName, + widget.productList.shortName, overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -105,7 +110,7 @@ class _ShopGoods extends State { width: 4, ), Text( - "¥${widget.productListBeans[widget.position].price}", + "¥${widget.productList.price}", style: TextStyle( color: Color(0xFFFF7A1A), fontSize: 11.sp, @@ -128,7 +133,7 @@ class _ShopGoods extends State { width: 4, ), Text( - "¥${widget.productListBeans[widget.position].applyPrice}", + "¥${widget.productList.applyPrice}", style: TextStyle( color: Color(0xFFA29E9E), fontSize: 10.sp, @@ -140,46 +145,39 @@ class _ShopGoods extends State { ], ), Spacer(), - widget.productListBeans[widget.position].attrStyle == 1 - ? RoundButton( - width: 49.w, - text: S.of(context).xuanguige, - textColor: Colors.white, - fontWeight: MyFontWeight.medium, - radius: 11, - backgroup: Color(0xFF32A060), - fontSize: 11.sp, - padding: EdgeInsets.symmetric(vertical: 5.h), - callback: () { - widget.queryMiNiDetail( - widget.productListBeans[widget.position].id); - }, - ) - : InkWell( - onTap: () { - setState(() { - { - if (widget.productListBeans[widget.position] - .buyNum > - 0) - widget.productListBeans[widget.position] - .buyNum--; - widget.fc(widget.productListBeans[widget.position]); - } - }); - }, - child: Image.asset( - "assets/image/reduce.png", - width: 22, - height: 22, - ), - ), - if (widget.productListBeans[widget.position].attrStyle == 0) - Padding( - padding: EdgeInsets.only(left: 8, right: 8), + if (buyNum == 0) + RoundButton( + width: 49.w, + text: S.of(context).xuanguige, + textColor: Colors.white, + fontWeight: MyFontWeight.medium, + radius: 11, + backgroup: Color(0xFF32A060), + fontSize: 11.sp, + padding: EdgeInsets.symmetric(vertical: 5.h), + callback: () { + widget.queryMiNiDetail(widget.productList.id); + }, + ), + if (buyNum > 0) + InkWell( + onTap: () { + reduceCount(); + widget.fc(widget.shopCarGoods["count"], widget.productList.id); + setState(() {}); + }, + child: Image.asset( + "assets/image/reduce.png", + width: 22, + height: 22, + ), + ), + if (buyNum > 0) + Container( + width: 30, + alignment: Alignment.center, child: Text( - widget.productListBeans[widget.position].buyNum - .toString(), + "$buyNum", style: TextStyle( color: Colors.black, fontSize: 14.sp, @@ -187,13 +185,12 @@ class _ShopGoods extends State { ), ), ), - if (widget.productListBeans[widget.position].attrStyle == 0) + if (buyNum > 0) InkWell( onTap: () { - setState(() { - widget.productListBeans[widget.position].buyNum++; - widget.fc(widget.productListBeans[widget.position]); - }); + addCount(); + widget.fc(widget.shopCarGoods["count"], widget.productList.id); + setState(() {}); }, child: Image.asset( "assets/image/add.png", @@ -210,4 +207,23 @@ class _ShopGoods extends State { ), ); } + + addCount() { + widget.shopCarGoods["count"] += 1; + } + + reduceCount() { + widget.shopCarGoods["count"] -= 1; + } + + int _count() { + if (widget.shopCarGoods == null) return 0; + + if (widget.productList.id == widget.shopCarGoods["id"]) { + return widget.shopCarGoods["count"]; + } + + return 0; + } + } diff --git a/lib/store/store_view/store_order_list.dart b/lib/store/store_view/store_order_list.dart index 7fdc9a23..e908b3d5 100644 --- a/lib/store/store_view/store_order_list.dart +++ b/lib/store/store_view/store_order_list.dart @@ -1,13 +1,12 @@ +import 'package:ai_decimal_accuracy/ai_decimal_accuracy.dart'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/retrofit/data/activity.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/findMiNiGroupList.dart'; -import 'package:huixiang/retrofit/data/miNiDetail.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/shop_goods.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -18,14 +17,15 @@ class StoreOrderListPage extends StatefulWidget { final List activitys; final StoreInfo storeInfo; final ScrollController controller; - final Function(ProductListBean plb) fc; + final Function(int count, String productId, int allCount, double allPrice) fc; final Function(String id) queryMiNiDetail; - _StoreOrderListPage _storeOrderListPage; + List> shopCarGoods; StoreOrderListPage( this.arguments, this.activitys, this.storeInfo, + this.shopCarGoods, this.controller, this.queryMiNiDetail, this.fc @@ -33,16 +33,13 @@ class StoreOrderListPage extends StatefulWidget { @override State createState() { - _storeOrderListPage = _StoreOrderListPage(); - return _storeOrderListPage; + return _StoreOrderListPage(); } - void notifyList(List product){ - _storeOrderListPage.notifyList(product); - } } class _StoreOrderListPage extends State { + int isSelected = 0; int tempClickIndex = 0; ApiService apiService; @@ -177,16 +174,33 @@ class _StoreOrderListPage extends State { } Widget goodsItem(position) { + Map map; + widget.shopCarGoods.forEach((element) { + if (productListBeans[position].id == element["id"]) { + map = element; + } + }); return ShopGoods( - productListBeans, - position, - widget.queryMiNiDetail, - widget.fc, + productListBeans[position], + (int count, String productId) { + int allCount = 0; + AiDecimalAccuracy allPrice = AiDecimalAccuracy.zero; + widget.shopCarGoods.forEach((element2) { + if (element2["price"] != null && element2["price"] != "") { + double singlePrice = double.tryParse(element2["price"]); + allCount += element2["count"]; + + AiDecimalAccuracy aiDecimalAccuracy = AiDecimalAccuracy.fromInt(element2["count"]); + AiDecimalAccuracy aiPrice = AiDecimalAccuracy.tryParse("$singlePrice"); + + allPrice += (aiPrice * aiDecimalAccuracy); + } + }); + widget.fc(count, productId, allCount, allPrice.toDouble()); + }, + queryMiNiDetail: widget.queryMiNiDetail, + shopCarGoods: map, ); } - List shopCarList() { - return productListBeans; - } - } diff --git a/pubspec.lock b/pubspec.lock index 68fd0bd2..7cfc194b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -8,6 +8,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "14.0.0" + ai_decimal_accuracy: + dependency: "direct main" + description: + name: ai_decimal_accuracy + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.0" analyzer: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 9feb7e27..28f27e18 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -86,7 +86,8 @@ dependencies: font_awesome_flutter: ^9.1.0 # flutter_bugly: ^0.3.3 # bitmap: ^0.1.2 - +# decimal: ^1.3.0 + ai_decimal_accuracy: ^1.1.0 # zefyr: ^0.12.0 dev_dependencies: