diff --git a/lib/business_system/goods/add_goods/add_goods_page.dart b/lib/business_system/goods/add_goods/add_goods_page.dart index ed35dcfe..ec005024 100644 --- a/lib/business_system/goods/add_goods/add_goods_page.dart +++ b/lib/business_system/goods/add_goods/add_goods_page.dart @@ -1,9 +1,16 @@ +import 'dart:io'; + import 'package:dio/dio.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/business_system/goods/add_goods/data/product_sku_attr.dart'; +import 'package:huixiang/retrofit/data/upload_result.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:image_pickers/image_pickers.dart'; +import 'package:permission_handler/permission_handler.dart'; import '../../../generated/l10n.dart'; import '../../../retrofit/business_api.dart'; import '../../../retrofit/data/base_data.dart'; @@ -13,6 +20,7 @@ import '../../../utils/business_instance.dart'; import '../../../utils/flutter_utils.dart'; import '../../../utils/font_weight.dart'; import '../../../view_widget/settlement_tips_dialog.dart'; +import 'data/product_sku.dart'; class AddGoodsPage extends StatefulWidget { final Map arguments; @@ -52,8 +60,9 @@ class _AddGoodsPage extends State { bool isAttrStyle = false; bool isKeyBoardShow = false; FocusNode _focusNode = FocusNode(); - List mealDetails = []; - List goodsSpecsDetails = []; + List> mealDetails = []; + List skuAttrList = []; + List skuList = []; @override void initState() { @@ -144,56 +153,73 @@ class _AddGoodsPage extends State { tenant: BusinessInstance.instance.businessTenant, storeId: widget.arguments["storeId"]); } - BaseData baseData = await businessService.productSave({ + + if (productImgUrl == null || productImgUrl.isEmpty) { + SmartDialog.show( + widget: SettlementTips( + () {}, + text: "必须传商品图片", + color: Color(0xFF30415B), + )); + return; + } + + var map = { "storeId": widget.arguments["storeId"], - "attrStyle": isAttrStyle == true ? 0 : 1, //款式类型:1-多款式 0-单款式 - "categoryId": "1343391656220557312", //分类id + "attrStyle": isAttrStyle ? 1 : 0, //款式类型:1-多款式 0-单款式 + "categoryId": categoryId, //分类id "oversold": isOversold == true ? 1 : 0, //允许超卖:1-允许 0-不允许 "setMeal": isSetMeal == true ? 0 : 1, //套餐专属商品 0是 1不是 - "groupId": "1693436138259218432", //分组id + "groupId": groupId, //分组id "imgs": [ { - "imgPath": - "https://pos.upload.lotus-wallet.com/1195/2023/10/1ba87000-d940-49e5-a6ca-f15623d5f841.jpg" + "imgPath": productImgUrl } ], //商品图片 "needLogistics": isLogistics == true ? 1 : 0, //需要物流:1-需要 0-不需要 - "productName": "新建商品", //商品名字 + "productName": goodsNameController.text.trim(), //商品名字 "productType": 0, //商品类型(0:普通类型;1:拼盘类型)app新增商品用不到,默认传0 - "shortName": "商品简介", //商品简介 - "skuAttrList": [ + "shortName": profileController.text.trim(), //商品简介 + "skuAttrList": isAttrStyle ? skuAttrList.map((e) => e.toJson()).toList() : + [ { - "attrCode": "", //规格的数据编码,app新增商品用不到,但必须传"" - "attrName": "", //属性名称,app新增商品用不到,但必须传"" + "attrCode": "attr_code_0", //规格的数据编码,app新增商品用不到,但必须传"" + "attrName": skuController.text.trim(), //属性名称,app新增商品用不到,但必须传"" "needImg": 0, //是否需要图片,app新增商品用不到,但必须传0 "attrValueList": [ { - "attrValue": "商品规格", //商品规格 - "attrValueCode": "", //规格值的数据编码,app新增商品用不到,但必须传"" + "attrValue": skuController.text.trim(), //商品规格 + "attrValueCode": "attr_code_0_value_0", //规格值的数据编码,app新增商品用不到,但必须传"" } ] //规格对应的规格值 } ], //规格列表 - "skuList": [ + "skuList": isAttrStyle ? + skuList.map((e) => e.toJson()).toList() : + [ { - "applyPrice": "234", - //商品原价 + "applyPrice": originalPriceController.text.trim(), + ///商品原价 "skuAttrCodeDTOList": [ - {"attrCode": "", "attrValueCode": ""} + {"attrCode": "attr_code_0", "attrValueCode": "attr_code_0_value_0"} ], - //sku对应的规格编码,app新增商品用不到,但必须传该段 - "skuPrice": "123", - //商品售价 - "packagingFee": "789", - //打包费 - "skuStock": "666", - //库存 - "weight": "222" - //重量 + ///sku对应的规格编码,app新增商品用不到,但必须传该段 + "skuPrice": priceController.text.trim(), + ///商品售价 + "packagingFee": packingChargeController.text.trim(), + ///打包费 + "skuStock": stockController.text.trim(), + ///库存 + "weight": heftController.text.trim(), + ///重量 + "productSetMeals": mealDetails + /// 商品套餐 } ], //商品sku列表 "status": isGround == true ? 1 : 0 //状态:1-上架 0-下架 - }).catchError((error) { + }; + print("mapmapmap: $map"); + BaseData baseData = await businessService.productSave(map).catchError((error) { networkError = AppUtils.dioErrorTypeToString(error.type); networkStatus = -1; setState(() {}); @@ -208,6 +234,7 @@ class _AddGoodsPage extends State { )); networkStatus = 1; setState(() {}); + Navigator.of(context).pop(); } else { SmartDialog.show( widget: SettlementTips( @@ -284,8 +311,7 @@ class _AddGoodsPage extends State { child: Column( children: [ Padding( - padding: - EdgeInsets.only(top: 18.h, left: 16.w, right: 16.w), + padding: EdgeInsets.only(top: 18.h, left: 16.w, right: 16.w), child: Row( children: [ Padding( @@ -306,7 +332,7 @@ class _AddGoodsPage extends State { }); }, child: Image.asset( - isAttrStyle == true + isAttrStyle ? "assets/image/reservation_switch.webp" : "assets/image/reservation_unswitch.webp", width: 44.w, @@ -329,11 +355,19 @@ class _AddGoodsPage extends State { Navigator.of(context).pushNamed( '/router/set_goods_specs', arguments: { - "goodsSpecsDetails": goodsSpecsDetails + "skuAttrList": skuAttrList, + "skuList": skuList }).then((value) { - if (value != null) { - goodsSpecsDetails.clear(); - goodsSpecsDetails.addAll(value); + print("value:$value"); + if (value != null && value is Map) { + if (value["skuAttrList"] is List) { + List goodsSpecsDetail = value["skuAttrList"]; + skuAttrList = goodsSpecsDetail; + } + if (value["skuList"] is List) { + List specsValue = value["skuList"]; + skuList = specsValue; + } setState(() {}); } }); @@ -359,7 +393,7 @@ class _AddGoodsPage extends State { ), )), Text( - "请设置商品规格", + (skuList != null && skuList.isNotEmpty) ? "商品规格已设置" : "请设置商品规格", style: TextStyle( color: Color(0xFF7A797F), fontSize: 14.sp, @@ -402,9 +436,9 @@ class _AddGoodsPage extends State { arguments: { "mealDetails": mealDetails }).then((value) { - if (value != null) { + if (value != null && value is List) { mealDetails.clear(); - mealDetails.addAll(value); + mealDetails.addAll(value.map((e) => e as Map).toList()); setState(() {}); } }); @@ -429,9 +463,9 @@ class _AddGoodsPage extends State { ), ), Text( - "套餐选择", + (mealDetails != null && mealDetails.isNotEmpty) ? "已设置套餐" : "套餐选择", style: TextStyle( - color: Color(0xFF7A797F), + color: (mealDetails != null && mealDetails.isNotEmpty) ? Color(0xA9000000) : Color(0xFF7A797F), fontSize: 14.sp, fontWeight: FontWeight.bold, ), @@ -453,22 +487,27 @@ class _AddGoodsPage extends State { ), ), ), - Container( - width: double.infinity, - padding: EdgeInsets.symmetric(vertical: 16.h), - margin: EdgeInsets.only( - top: 111.h, bottom: 34.h, left: 16.w, right: 16.w), - decoration: BoxDecoration( - color: Color(0xFF30415B), - borderRadius: BorderRadius.circular(27), - ), - alignment: Alignment.center, - child: Text( - S.of(context).baocun, - style: TextStyle( - color: Colors.white, - fontSize: 16.sp, - fontWeight: MyFontWeight.bold, + GestureDetector( + onTap: () { + addGoods(); + }, + child: Container( + width: double.infinity, + padding: EdgeInsets.symmetric(vertical: 16.h), + margin: EdgeInsets.only( + top: 111.h, bottom: 34.h, left: 16.w, right: 16.w), + decoration: BoxDecoration( + color: Color(0xFF30415B), + borderRadius: BorderRadius.circular(27), + ), + alignment: Alignment.center, + child: Text( + S.of(context).baocun, + style: TextStyle( + color: Colors.white, + fontSize: 16.sp, + fontWeight: MyFontWeight.bold, + ), ), ), ), @@ -521,25 +560,59 @@ class _AddGoodsPage extends State { ), ), ), - Container( - padding: EdgeInsets.all(15), - margin: EdgeInsets.only(right: 4.w), - decoration: BoxDecoration( - color: Color(0xFFF0F0F0), - borderRadius: BorderRadius.circular(4), - ), - child: Icon( - Icons.add, - size: 24, - color: Color(0xFFD8D8D8), + InkWell( + onTap: () { + showImagePicker() { + showCupertinoModalPopup( + context: context, + builder: (contetx) { + return CupertinoActionSheet( + title: Text(S.of(context).genghuantouxiang), + actions: [ + CupertinoActionSheetAction( + child: Text(S.of(context).paizhao), + onPressed: () { + openCamera(); + Navigator.of(context).pop(); + }, + isDefaultAction: true, + isDestructiveAction: false, + ), + CupertinoActionSheetAction( + child: Text(S.of(context).xiangce), + onPressed: () { + openStorage(); + Navigator.of(context).pop(); + }, + isDefaultAction: true, + isDestructiveAction: false, + ), + ], + cancelButton: CupertinoActionSheetAction( + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text(S.of(context).quxiao), + isDestructiveAction: true, + ), + ); + }); + } + }, + child: Container( + padding: EdgeInsets.all(15), + margin: EdgeInsets.only(right: 4.w), + decoration: BoxDecoration( + color: Color(0xFFF0F0F0), + borderRadius: BorderRadius.circular(4), + ), + child: Icon( + Icons.add, + size: 24, + color: Color(0xFFD8D8D8), + ), ), ), - Image.asset( - "assets/image/vip_code.webp", - fit: BoxFit.cover, - width: 54.h, - height: 54.h, - ), ], ), Container( @@ -931,7 +1004,7 @@ class _AddGoodsPage extends State { ), textAlign: TextAlign.right, style: TextStyle( - color: Color(0xFF7A797F), + color: Color(0xA9000000), fontSize: 14.sp, fontWeight: MyFontWeight.bold), ), @@ -1029,8 +1102,8 @@ class _AddGoodsPage extends State { GestureDetector( onTap: () { setState(() { - categoryName = - goodsCategoryList[categoryIndex].categoryName; + categoryName = goodsCategoryList[categoryIndex].categoryName; + categoryId = goodsCategoryList[categoryIndex].id; Navigator.of(context).pop(); }); }, @@ -1186,9 +1259,8 @@ class _AddGoodsPage extends State { GestureDetector( onTap: () { setState(() { - groupName = - productGroupList?.records[groupIndex]?.groupName ?? - ""; + groupName = productGroupList?.records[groupIndex]?.groupName ?? ""; + groupId = productGroupList?.records[groupIndex]?.id ?? ""; Navigator.of(context).pop(); }); }, @@ -1260,4 +1332,70 @@ class _AddGoodsPage extends State { ), ); } + + ///拍照 + openCamera() async { + if (await Permission.camera.isGranted) { + Media medias = await ImagePickers.openCamera( + cameraMimeType: CameraMimeType.photo, + cropConfig: CropConfig( + enableCrop: true, + width: 200, + height: 200, + ), + compressSize: 500, + ); + if (medias == null) return; + filePath = medias.path; + fileUpload(); + } else { + await Permission.camera.request(); + openCamera(); + } + } + + String filePath; + String productImgUrl = ""; + + ///打开相册 + openStorage() async { + if (await Permission.storage.isGranted) { + List medias = await ImagePickers.pickerPaths( + galleryMode: GalleryMode.image, + selectCount: 1, + showGif: true, + showCamera: false, + compressSize: 500, + uiConfig: UIConfig( + uiThemeColor: Color(0xFFFFFFFF), + ), + cropConfig: CropConfig( + enableCrop: true, + width: 200, + height: 200, + ), + ); + if (medias == null || medias.length == 0) return; + filePath = medias[0].path; + setState(() {}); + fileUpload(); + } else { + await Permission.storage.request(); + openStorage(); + } + } + + ///文件上传 + fileUpload() async { + if (filePath != null && filePath != "" && await File(filePath).exists()) { + BaseData baseData = await businessService + .upload(File(filePath), 123123123) + .catchError((onError) {}); + if (baseData != null && baseData.isSuccess) { + UploadResult uploadResult = baseData.data; + productImgUrl = uploadResult.url; + } + } + } + } diff --git a/lib/business_system/goods/add_goods/data/product_sku.dart b/lib/business_system/goods/add_goods/data/product_sku.dart new file mode 100644 index 00000000..9effac91 --- /dev/null +++ b/lib/business_system/goods/add_goods/data/product_sku.dart @@ -0,0 +1,837 @@ + + +class Sku { + Sku({ + String applyPrice, + String autoRenewSkuStock, + String deliveries, + String id, + String isDelete, + List material, + String packagingFee, + String productId, + List productSetMeals, + String setMeal, + List setMealDTOList, + List skuAttrCodeDTOList, + List skuAttrList, + String skuCode, + String skuImg, + String skuNameStr, + String skuPrice, + String skuStock, + List skuTickets, + String sort, + String storeId, + List takeType, + String ticketDays, + TicketExpireTime ticketExpireTime, + String ticketStyle, + String ticketType, + String ticketWipedTimeTemplateId, + String version, + String vipPrice, + String volume, + String weight,}){ + _applyPrice = applyPrice; + _autoRenewSkuStock = autoRenewSkuStock; + _deliveries = deliveries; + _id = id; + _isDelete = isDelete; + _material = material; + _packagingFee = packagingFee; + _productId = productId; + _productSetMeals = productSetMeals; + _setMeal = setMeal; + _setMealDTOList = setMealDTOList; + _skuAttrCodeDTOList = skuAttrCodeDTOList; + _skuAttrList = skuAttrList; + _skuCode = skuCode; + _skuImg = skuImg; + _skuNameStr = skuNameStr; + _skuPrice = skuPrice; + _skuStock = skuStock; + _skuTickets = skuTickets; + _sort = sort; + _storeId = storeId; + _takeType = takeType; + _ticketDays = ticketDays; + _ticketExpireTime = ticketExpireTime; + _ticketStyle = ticketStyle; + _ticketType = ticketType; + _ticketWipedTimeTemplateId = ticketWipedTimeTemplateId; + _version = version; + _vipPrice = vipPrice; + _volume = volume; + _weight = weight; +} + + Sku.fromJson(dynamic json) { + _applyPrice = json['applyPrice']; + _autoRenewSkuStock = json['autoRenewSkuStock']; + _deliveries = json['deliveries']; + _id = json['id']; + _isDelete = json['isDelete']; + if (json['material'] != null) { + _material = []; + json['material'].forEach((v) { + _material.add(v); + }); + } + _packagingFee = json['packagingFee']; + _productId = json['productId']; + if (json['productSetMeals'] != null) { + _productSetMeals = []; + json['productSetMeals'].forEach((v) { + _productSetMeals.add(ProductSetMeals.fromJson(v)); + }); + } + _setMeal = json['setMeal']; + if (json['setMealDTOList'] != null) { + _setMealDTOList = []; + json['setMealDTOList'].forEach((v) { + _setMealDTOList.add(SetMealDtoList.fromJson(v)); + }); + } + if (json['skuAttrCodeDTOList'] != null) { + _skuAttrCodeDTOList = []; + json['skuAttrCodeDTOList'].forEach((v) { + _skuAttrCodeDTOList.add(SkuAttrCodeDtoList.fromJson(v)); + }); + } + if (json['skuAttrList'] != null) { + _skuAttrList = []; + json['skuAttrList'].forEach((v) { + _skuAttrList.add(SkuAttrList.fromJson(v)); + }); + } + _skuCode = json['skuCode']; + _skuImg = json['skuImg']; + _skuNameStr = json['skuNameStr']; + _skuPrice = json['skuPrice']; + _skuStock = json['skuStock']; + if (json['skuTickets'] != null) { + _skuTickets = []; + json['skuTickets'].forEach((v) { + _skuTickets.add(v); + }); + } + _sort = json['sort']; + _storeId = json['storeId']; + if (json['takeType'] != null) { + _takeType = []; + json['takeType'].forEach((v) { + _takeType.add(v); + }); + } + _ticketDays = json['ticketDays']; + _ticketExpireTime = json['ticketExpireTime'] != null ? TicketExpireTime.fromJson(json['ticketExpireTime']) : null; + _ticketStyle = json['ticketStyle']; + _ticketType = json['ticketType']; + _ticketWipedTimeTemplateId = json['ticketWipedTimeTemplateId']; + _version = json['version']; + _vipPrice = json['vipPrice']; + _volume = json['volume']; + _weight = json['weight']; + } + String _applyPrice; + String _autoRenewSkuStock; + String _deliveries; + String _id; + String _isDelete; + List _material; + String _packagingFee; + String _productId; + List _productSetMeals; + String _setMeal; + List _setMealDTOList; + List _skuAttrCodeDTOList; + List _skuAttrList; + String _skuCode; + String _skuImg; + String _skuNameStr; + String _skuPrice; + String _skuStock; + List _skuTickets; + String _sort; + String _storeId; + List _takeType; + String _ticketDays; + TicketExpireTime _ticketExpireTime; + String _ticketStyle; + String _ticketType; + String _ticketWipedTimeTemplateId; + String _version; + String _vipPrice; + String _volume; + String _weight; + + String get applyPrice => _applyPrice; + String get autoRenewSkuStock => _autoRenewSkuStock; + String get deliveries => _deliveries; + String get id => _id; + String get isDelete => _isDelete; + List get material => _material; + String get packagingFee => _packagingFee; + String get productId => _productId; + List get productSetMeals => _productSetMeals; + String get setMeal => _setMeal; + List get setMealDTOList => _setMealDTOList; + List get skuAttrCodeDTOList => _skuAttrCodeDTOList; + List get skuAttrList => _skuAttrList; + String get skuCode => _skuCode; + String get skuImg => _skuImg; + String get skuNameStr => _skuNameStr; + String get skuPrice => _skuPrice; + String get skuStock => _skuStock; + List get skuTickets => _skuTickets; + String get sort => _sort; + String get storeId => _storeId; + List get takeType => _takeType; + String get ticketDays => _ticketDays; + TicketExpireTime get ticketExpireTime => _ticketExpireTime; + String get ticketStyle => _ticketStyle; + String get ticketType => _ticketType; + String get ticketWipedTimeTemplateId => _ticketWipedTimeTemplateId; + String get version => _version; + String get vipPrice => _vipPrice; + String get volume => _volume; + String get weight => _weight; + + Map toJson() { + final map = {}; + map['applyPrice'] = _applyPrice; + map['autoRenewSkuStock'] = _autoRenewSkuStock; + map['deliveries'] = _deliveries; + map['id'] = _id; + map['isDelete'] = _isDelete; + if (_material != null) { + map['material'] = _material.map((v) => v.toJson()).toList(); + } + map['packagingFee'] = _packagingFee; + map['productId'] = _productId; + if (_productSetMeals != null) { + map['productSetMeals'] = _productSetMeals.map((v) => v.toJson()).toList(); + } + map['setMeal'] = _setMeal; + if (_setMealDTOList != null) { + map['setMealDTOList'] = _setMealDTOList.map((v) => v.toJson()).toList(); + } + if (_skuAttrCodeDTOList != null) { + map['skuAttrCodeDTOList'] = _skuAttrCodeDTOList.map((v) => v.toJson()).toList(); + } + if (_skuAttrList != null) { + map['skuAttrList'] = _skuAttrList.map((v) => v.toJson()).toList(); + } + map['skuCode'] = _skuCode; + map['skuImg'] = _skuImg; + map['skuNameStr'] = _skuNameStr; + map['skuPrice'] = _skuPrice; + map['skuStock'] = _skuStock; + if (_skuTickets != null) { + map['skuTickets'] = _skuTickets.map((v) => v.toJson()).toList(); + } + map['sort'] = _sort; + map['storeId'] = _storeId; + if (_takeType != null) { + map['takeType'] = _takeType.map((v) => v.toJson()).toList(); + } + map['ticketDays'] = _ticketDays; + if (_ticketExpireTime != null) { + map['ticketExpireTime'] = _ticketExpireTime.toJson(); + } + map['ticketStyle'] = _ticketStyle; + map['ticketType'] = _ticketType; + map['ticketWipedTimeTemplateId'] = _ticketWipedTimeTemplateId; + map['version'] = _version; + map['vipPrice'] = _vipPrice; + map['volume'] = _volume; + map['weight'] = _weight; + return map; + } + +} + +class TicketExpireTime { + TicketExpireTime({ + String hour, + String minute, + String nano, + String second,}){ + _hour = hour; + _minute = minute; + _nano = nano; + _second = second; +} + + TicketExpireTime.fromJson(dynamic json) { + _hour = json['hour']; + _minute = json['minute']; + _nano = json['nano']; + _second = json['second']; + } + String _hour; + String _minute; + String _nano; + String _second; +TicketExpireTime copyWith({ String hour, + String minute, + String nano, + String second, +}) => TicketExpireTime( hour: hour ?? _hour, + minute: minute ?? _minute, + nano: nano ?? _nano, + second: second ?? _second, +); + String get hour => _hour; + String get minute => _minute; + String get nano => _nano; + String get second => _second; + + Map toJson() { + final map = {}; + map['hour'] = _hour; + map['minute'] = _minute; + map['nano'] = _nano; + map['second'] = _second; + return map; + } + +} + +class SkuAttrList { + SkuAttrList({ + String attrId, + String attrValueId, + String id, + String isDelete, + String skuId, + String sortOrder,}){ + _attrId = attrId; + _attrValueId = attrValueId; + _id = id; + _isDelete = isDelete; + _skuId = skuId; + _sortOrder = sortOrder; +} + + SkuAttrList.fromJson(dynamic json) { + _attrId = json['attrId']; + _attrValueId = json['attrValueId']; + _id = json['id']; + _isDelete = json['isDelete']; + _skuId = json['skuId']; + _sortOrder = json['sortOrder']; + } + String _attrId; + String _attrValueId; + String _id; + String _isDelete; + String _skuId; + String _sortOrder; +SkuAttrList copyWith({ String attrId, + String attrValueId, + String id, + String isDelete, + String skuId, + String sortOrder, +}) => SkuAttrList( attrId: attrId ?? _attrId, + attrValueId: attrValueId ?? _attrValueId, + id: id ?? _id, + isDelete: isDelete ?? _isDelete, + skuId: skuId ?? _skuId, + sortOrder: sortOrder ?? _sortOrder, +); + String get attrId => _attrId; + String get attrValueId => _attrValueId; + String get id => _id; + String get isDelete => _isDelete; + String get skuId => _skuId; + String get sortOrder => _sortOrder; + + Map toJson() { + final map = {}; + map['attrId'] = _attrId; + map['attrValueId'] = _attrValueId; + map['id'] = _id; + map['isDelete'] = _isDelete; + map['skuId'] = _skuId; + map['sortOrder'] = _sortOrder; + return map; + } + +} + +class SkuAttrCodeDtoList { + SkuAttrCodeDtoList({ + String attrCode, + String attrValueCode,}){ + _attrCode = attrCode; + _attrValueCode = attrValueCode; +} + + SkuAttrCodeDtoList.fromJson(dynamic json) { + _attrCode = json['attrCode']; + _attrValueCode = json['attrValueCode']; + } + String _attrCode; + String _attrValueCode; +SkuAttrCodeDtoList copyWith({ String attrCode, + String attrValueCode, +}) => SkuAttrCodeDtoList( attrCode: attrCode ?? _attrCode, + attrValueCode: attrValueCode ?? _attrValueCode, +); + String get attrCode => _attrCode; + String get attrValueCode => _attrValueCode; + + Map toJson() { + final map = {}; + map['attrCode'] = _attrCode; + map['attrValueCode'] = _attrValueCode; + return map; + } + +} + +class SetMealDtoList { + SetMealDtoList({ + String buyNum, + String groupId, + String productId, + String productName, + String sellPrice, + String skuId, + String storeId,}){ + _buyNum = buyNum; + _groupId = groupId; + _productId = productId; + _productName = productName; + _sellPrice = sellPrice; + _skuId = skuId; + _storeId = storeId; +} + + SetMealDtoList.fromJson(dynamic json) { + _buyNum = json['buyNum']; + _groupId = json['groupId']; + _productId = json['productId']; + _productName = json['productName']; + _sellPrice = json['sellPrice']; + _skuId = json['skuId']; + _storeId = json['storeId']; + } + String _buyNum; + String _groupId; + String _productId; + String _productName; + String _sellPrice; + String _skuId; + String _storeId; +SetMealDtoList copyWith({ String buyNum, + String groupId, + String productId, + String productName, + String sellPrice, + String skuId, + String storeId, +}) => SetMealDtoList( buyNum: buyNum ?? _buyNum, + groupId: groupId ?? _groupId, + productId: productId ?? _productId, + productName: productName ?? _productName, + sellPrice: sellPrice ?? _sellPrice, + skuId: skuId ?? _skuId, + storeId: storeId ?? _storeId, +); + String get buyNum => _buyNum; + String get groupId => _groupId; + String get productId => _productId; + String get productName => _productName; + String get sellPrice => _sellPrice; + String get skuId => _skuId; + String get storeId => _storeId; + + Map toJson() { + final map = {}; + map['buyNum'] = _buyNum; + map['groupId'] = _groupId; + map['productId'] = _productId; + map['productName'] = _productName; + map['sellPrice'] = _sellPrice; + map['skuId'] = _skuId; + map['storeId'] = _storeId; + return map; + } + +} + +class ProductSetMeals { + ProductSetMeals({ + String groupName, + String optionalNumber, + List productInfoList, + String totalNumber,}){ + _groupName = groupName; + _optionalNumber = optionalNumber; + _productInfoList = productInfoList; + _totalNumber = totalNumber; +} + + ProductSetMeals.fromJson(dynamic json) { + _groupName = json['groupName']; + _optionalNumber = json['optionalNumber']; + if (json['productInfoList'] != null) { + _productInfoList = []; + json['productInfoList'].forEach((v) { + _productInfoList.add(ProductInfoList.fromJson(v)); + }); + } + _totalNumber = json['totalNumber']; + } + String _groupName; + String _optionalNumber; + List _productInfoList; + String _totalNumber; +ProductSetMeals copyWith({ String groupName, + String optionalNumber, + List productInfoList, + String totalNumber, +}) => ProductSetMeals( groupName: groupName ?? _groupName, + optionalNumber: optionalNumber ?? _optionalNumber, + productInfoList: productInfoList ?? _productInfoList, + totalNumber: totalNumber ?? _totalNumber, +); + String get groupName => _groupName; + String get optionalNumber => _optionalNumber; + List get productInfoList => _productInfoList; + String get totalNumber => _totalNumber; + + Map toJson() { + final map = {}; + map['groupName'] = _groupName; + map['optionalNumber'] = _optionalNumber; + if (_productInfoList != null) { + map['productInfoList'] = _productInfoList.map((v) => v.toJson()).toList(); + } + map['totalNumber'] = _totalNumber; + return map; + } + +} + +class ProductInfoList { + ProductInfoList({ + bool allSku, + bool markProductNone, + String number, + List productAttrInfoList, + String productId, + String productImg, + String productName, + List skuInfoList, + String storeId,}){ + _allSku = allSku; + _markProductNone = markProductNone; + _number = number; + _productAttrInfoList = productAttrInfoList; + _productId = productId; + _productImg = productImg; + _productName = productName; + _skuInfoList = skuInfoList; + _storeId = storeId; +} + + ProductInfoList.fromJson(dynamic json) { + _allSku = json['allSku']; + _markProductNone = json['markProductNone']; + _number = json['number']; + if (json['productAttrInfoList'] != null) { + _productAttrInfoList = []; + json['productAttrInfoList'].forEach((v) { + _productAttrInfoList.add(ProductAttrInfoList.fromJson(v)); + }); + } + _productId = json['productId']; + _productImg = json['productImg']; + _productName = json['productName']; + if (json['skuInfoList'] != null) { + _skuInfoList = []; + json['skuInfoList'].forEach((v) { + _skuInfoList.add(SkuInfoList.fromJson(v)); + }); + } + _storeId = json['storeId']; + } + bool _allSku; + bool _markProductNone; + String _number; + List _productAttrInfoList; + String _productId; + String _productImg; + String _productName; + List _skuInfoList; + String _storeId; +ProductInfoList copyWith({ bool allSku, + bool markProductNone, + String number, + List productAttrInfoList, + String productId, + String productImg, + String productName, + List skuInfoList, + String storeId, +}) => ProductInfoList( allSku: allSku ?? _allSku, + markProductNone: markProductNone ?? _markProductNone, + number: number ?? _number, + productAttrInfoList: productAttrInfoList ?? _productAttrInfoList, + productId: productId ?? _productId, + productImg: productImg ?? _productImg, + productName: productName ?? _productName, + skuInfoList: skuInfoList ?? _skuInfoList, + storeId: storeId ?? _storeId, +); + bool get allSku => _allSku; + bool get markProductNone => _markProductNone; + String get number => _number; + List get productAttrInfoList => _productAttrInfoList; + String get productId => _productId; + String get productImg => _productImg; + String get productName => _productName; + List get skuInfoList => _skuInfoList; + String get storeId => _storeId; + + Map toJson() { + final map = {}; + map['allSku'] = _allSku; + map['markProductNone'] = _markProductNone; + map['number'] = _number; + if (_productAttrInfoList != null) { + map['productAttrInfoList'] = _productAttrInfoList.map((v) => v.toJson()).toList(); + } + map['productId'] = _productId; + map['productImg'] = _productImg; + map['productName'] = _productName; + if (_skuInfoList != null) { + map['skuInfoList'] = _skuInfoList.map((v) => v.toJson()).toList(); + } + map['storeId'] = _storeId; + return map; + } + +} + + +class SkuInfoList { + SkuInfoList({ + String id, + List productSkuAttrList, + String skuName,}){ + _id = id; + _productSkuAttrList = productSkuAttrList; + _skuName = skuName; +} + + SkuInfoList.fromJson(dynamic json) { + _id = json['id']; + if (json['productSkuAttrList'] != null) { + _productSkuAttrList = []; + json['productSkuAttrList'].forEach((v) { + _productSkuAttrList.add(ProductSkuAttrList.fromJson(v)); + }); + } + _skuName = json['skuName']; + } + String _id; + List _productSkuAttrList; + String _skuName; +SkuInfoList copyWith({ String id, + List productSkuAttrList, + String skuName, +}) => SkuInfoList( id: id ?? _id, + productSkuAttrList: productSkuAttrList ?? _productSkuAttrList, + skuName: skuName ?? _skuName, +); + String get id => _id; + List get productSkuAttrList => _productSkuAttrList; + String get skuName => _skuName; + + Map toJson() { + final map = {}; + map['id'] = _id; + if (_productSkuAttrList != null) { + map['productSkuAttrList'] = _productSkuAttrList.map((v) => v.toJson()).toList(); + } + map['skuName'] = _skuName; + return map; + } + +} + +/// attrId : 0 +/// attrValueId : 0 +/// id : 0 +/// isDelete : 0 +/// skuId : 0 +/// sortOrder : 0 + +class ProductSkuAttrList { + ProductSkuAttrList({ + String attrId, + String attrValueId, + String id, + String isDelete, + String skuId, + String sortOrder,}){ + _attrId = attrId; + _attrValueId = attrValueId; + _id = id; + _isDelete = isDelete; + _skuId = skuId; + _sortOrder = sortOrder; +} + + ProductSkuAttrList.fromJson(dynamic json) { + _attrId = json['attrId']; + _attrValueId = json['attrValueId']; + _id = json['id']; + _isDelete = json['isDelete']; + _skuId = json['skuId']; + _sortOrder = json['sortOrder']; + } + String _attrId; + String _attrValueId; + String _id; + String _isDelete; + String _skuId; + String _sortOrder; +ProductSkuAttrList copyWith({ String attrId, + String attrValueId, + String id, + String isDelete, + String skuId, + String sortOrder, +}) => ProductSkuAttrList( attrId: attrId ?? _attrId, + attrValueId: attrValueId ?? _attrValueId, + id: id ?? _id, + isDelete: isDelete ?? _isDelete, + skuId: skuId ?? _skuId, + sortOrder: sortOrder ?? _sortOrder, +); + String get attrId => _attrId; + String get attrValueId => _attrValueId; + String get id => _id; + String get isDelete => _isDelete; + String get skuId => _skuId; + String get sortOrder => _sortOrder; + + Map toJson() { + final map = {}; + map['attrId'] = _attrId; + map['attrValueId'] = _attrValueId; + map['id'] = _id; + map['isDelete'] = _isDelete; + map['skuId'] = _skuId; + map['sortOrder'] = _sortOrder; + return map; + } + +} + +/// attrId : 0 +/// attrName : "" +/// attrValueList : [{"attrId":0,"attrName":"","attrValueList":[{}]}] + +class ProductAttrInfoList { + ProductAttrInfoList({ + String attrId, + String attrName, + List attrValueList,}){ + _attrId = attrId; + _attrName = attrName; + _attrValueList = attrValueList; +} + + ProductAttrInfoList.fromJson(dynamic json) { + _attrId = json['attrId']; + _attrName = json['attrName']; + if (json['attrValueList'] != null) { + _attrValueList = []; + json['attrValueList'].forEach((v) { + _attrValueList.add(AttrValueList.fromJson(v)); + }); + } + } + String _attrId; + String _attrName; + List _attrValueList; +ProductAttrInfoList copyWith({ String attrId, + String attrName, + List attrValueList, +}) => ProductAttrInfoList( attrId: attrId ?? _attrId, + attrName: attrName ?? _attrName, + attrValueList: attrValueList ?? _attrValueList, +); + String get attrId => _attrId; + String get attrName => _attrName; + List get attrValueList => _attrValueList; + + Map toJson() { + final map = {}; + map['attrId'] = _attrId; + map['attrName'] = _attrName; + if (_attrValueList != null) { + map['attrValueList'] = _attrValueList.map((v) => v.toJson()).toList(); + } + return map; + } + +} + +/// attrId : 0 +/// attrName : "" +/// attrValueList : [{}] + +class AttrValueList { + AttrValueList({ + String attrId, + String attrName, + List attrValueList,}){ + _attrId = attrId; + _attrName = attrName; + _attrValueList = attrValueList; +} + + AttrValueList.fromJson(dynamic json) { + _attrId = json['attrId']; + _attrName = json['attrName']; + if (json['attrValueList'] != null) { + _attrValueList = []; + json['attrValueList'].forEach((v) { + _attrValueList.add(v); + }); + } + } + String _attrId; + String _attrName; + List _attrValueList; +AttrValueList copyWith({ String attrId, + String attrName, + List attrValueList, +}) => AttrValueList( attrId: attrId ?? _attrId, + attrName: attrName ?? _attrName, + attrValueList: attrValueList ?? _attrValueList, +); + String get attrId => _attrId; + String get attrName => _attrName; + List get attrValueList => _attrValueList; + + Map toJson() { + final map = {}; + map['attrId'] = _attrId; + map['attrName'] = _attrName; + if (_attrValueList != null) { + map['attrValueList'] = _attrValueList.map((v) => v.toJson()).toList(); + } + return map; + } + +} \ No newline at end of file diff --git a/lib/business_system/goods/add_goods/data/product_sku_attr.dart b/lib/business_system/goods/add_goods/data/product_sku_attr.dart new file mode 100644 index 00000000..e1fec457 --- /dev/null +++ b/lib/business_system/goods/add_goods/data/product_sku_attr.dart @@ -0,0 +1,70 @@ + + +import 'package:flutter/cupertino.dart'; + + +class ProductSkuAttr { + + TextEditingController _specsNameController; + + String attrCode; + String needImg; + + TextEditingController get specsNameController => _specsNameController; + + String get attrName => _attrName = specsNameController.text; + + String _attrName; + + List attrValueList = []; + + ProductSkuAttr(){ + _specsNameController = TextEditingController(); + } + + Map toJson() { + final map = {}; + map['attrCode'] = attrCode; + map['needImg'] = needImg ?? false; + map['attrName'] = attrName; + if (attrValueList != null && attrValueList.isNotEmpty) { + map['attrValueList'] = attrValueList.map((e) => e.toJson()).toList(); + } + return map; + } + + @override + String toString() { + return 'ProductSkuAttr{attrCode: $attrCode, attrName: $attrName, needimg: $needImg, attrValueList: $attrValueList}'; + } + +} + + +class ProductSkuAttrValue { + + String attrValue; + String attrValueCode; + String attrValueImage; + + TextEditingController _specsValueNameController; + + TextEditingController get specsValueNameController => _specsValueNameController; + + ProductSkuAttrValue(){ + _specsValueNameController = TextEditingController(); + } + + Map toJson() { + final map = {}; + map['attrValue'] = attrValue; + map['attrValueCode'] = attrValueCode; + map['attrValueImage'] = attrValueImage; + return map; + } + + @override + String toString() { + return 'ProductSkuAttrValue{attrValue: $attrValue, attrValueCode: $attrValueCode, attrValueImage: $attrValueImage}'; + } +} diff --git a/lib/business_system/goods/add_goods/edit_specs_detail.dart b/lib/business_system/goods/add_goods/edit_specs_detail.dart index f2f7d237..6699e367 100644 --- a/lib/business_system/goods/add_goods/edit_specs_detail.dart +++ b/lib/business_system/goods/add_goods/edit_specs_detail.dart @@ -7,6 +7,8 @@ import '../../../retrofit/business_api.dart'; import '../../../retrofit/data/edit_specs_detail_list.dart'; import '../../../utils/font_weight.dart'; import '../../../view_widget/settlement_tips_dialog.dart'; +import 'data/product_sku.dart'; +import 'data/product_sku_attr.dart'; class EditSpecsDetail extends StatefulWidget { final Map arguments; @@ -21,6 +23,7 @@ class EditSpecsDetail extends StatefulWidget { class _EditSpecsDetail extends State { List editSpecsDetailList = []; + Map> codeMap = {}; bool isKeyBoardShow = false; FocusNode _focusNode = FocusNode(); BusinessApiService businessService; @@ -42,18 +45,23 @@ class _EditSpecsDetail extends State { } }); }); - List skus = widget?.arguments["skus"] ?? []; - List> specsDetails = - widget.arguments["specsDetails"] ?? []; - skus.forEach((element) { + List skus = widget?.arguments["skus"] ?? []; + + List skiStr = mergeAttrCode(skus); + + List skuList = widget.arguments["skuList"] ?? []; + print("skuList: ${skuList.map((e) => e.toJson()).toList()}"); + + print("skiStr: $skiStr"); + skiStr.forEach((element) { var edit = EditSpecsDetailList(element); - for(var e1 in specsDetails){ - if(e1["skuName"] == element){ - edit.goodPriceController.text = e1["goodPrice"]; - edit.originalPriceController.text = e1["originalPrice"]; - edit.packagingFeeController.text = e1["packagingFee"]; - edit.specsWeightController.text = e1["specsWeight"]; - edit.skuStockController.text = e1["skuStock"]; + for (var e1 in skuList) { + if (e1.skuNameStr == element) { + edit.goodPriceController.text = "${e1.skuPrice}"; + edit.originalPriceController.text = "${e1.applyPrice}"; + edit.packagingFeeController.text = "${e1.packagingFee}"; + edit.specsWeightController.text = "${e1.weight}"; + edit.skuStockController.text = "${e1.skuStock}"; break; } } @@ -61,6 +69,67 @@ class _EditSpecsDetail extends State { }); } + ///sku计算 + List mergeArr(List> arr) { + var result = arr.removeAt(0); + while (arr.isNotEmpty) { + var curArr = arr.removeAt(0); + var lastArr = result; + result = []; + for (var lastVal in lastArr) { + for (var curVal in curArr) { + result.add("$lastVal $curVal"); + } + } + } + return result; + } + + ///sku计算 + List mergeAttrCode(List arr) { + List attrValue = []; + + for (ProductSkuAttr skuAttr in arr) { + attrValue = mergeName(attrValue, skuAttr.attrValueList); + } + + codeMap = mergeCodeMap(codeMap, attrValue, arr); + + print("attrValue: $attrValue"); + print("codeMap: $codeMap"); + return attrValue; + } + + Map> mergeCodeMap(Map> resultMap, List attrValue, List skuAttr) { + for (String attrName in attrValue) { + for (ProductSkuAttr skuAttrValue in skuAttr) { + for (ProductSkuAttrValue skuAttrValue in skuAttrValue.attrValueList) { + if (attrName.contains("${skuAttrValue.attrValue}")) { + if (resultMap.containsKey(attrName)) { + resultMap[attrName].add(skuAttrValue.attrValueCode); + } else { + resultMap[attrName] = [skuAttrValue.attrValueCode]; + } + } + } + } + } + return resultMap; + } + + List mergeName(List attrValues, List values) { + if (attrValues.isEmpty) { + return values.map((e) => e.attrValue).toList(); + } + List resultValue = []; + for (String rValue in attrValues) { + for (ProductSkuAttrValue iValue in values) { + resultValue.add("$rValue ${iValue.attrValue}"); + } + } + return resultValue; + } + ///离开页面记着销毁和清除 @override void dispose() { @@ -110,26 +179,32 @@ class _EditSpecsDetail extends State { onTap: () { bool flag = false; String editType = ""; - List> specsDetail = []; + List skuList = []; editSpecsDetailList.forEach((element) { if (element.goodPriceController.text.trim() == "") { flag = true; editType = "请输入商品售价"; return; - } else if (element.originalPriceController.text.trim() == - "") { + } else if (element.originalPriceController.text.trim() == "") { flag = true; editType = "请输入商品原价"; return; } - specsDetail.add({ - "skuName": element.specsDetailName, - "goodPrice": element.goodPriceController.text, - "originalPrice": element.originalPriceController.text == "" ? "0" :element.originalPriceController.text, - "packagingFee": element.packagingFeeController.text == "" ? "0" :element.packagingFeeController.text, - "specsWeight": element.specsWeightController.text == "" ? "0" :element.specsWeightController.text, - "skuStock": element.skuStockController.text == "" ? "0" :element.skuStockController.text - }); + var productSku = Sku( + skuNameStr: element.specsDetailName, + skuPrice: element.goodPriceController.text.toString(), + applyPrice: element.originalPriceController.text == "" ? "0" : element.originalPriceController.text, + packagingFee: element.packagingFeeController.text == "" ? "0" : element.packagingFeeController.text, + weight: element.specsWeightController.text == "" ? "0" : element.specsWeightController.text, + skuStock: element.skuStockController.text == "" ? "0" : element.skuStockController.text, + skuAttrCodeDTOList: codeMap[element.specsDetailName].map((e) { + return SkuAttrCodeDtoList( + attrCode: e.substring(0, e.lastIndexOf("_value")), + attrValueCode: e, + ); + }).toList(), + ); + skuList.add(productSku); }); if (flag) { SmartDialog.show( @@ -140,7 +215,7 @@ class _EditSpecsDetail extends State { color: Color(0xFF30415B), )); } else { - Navigator.of(context).pop(specsDetail); + Navigator.of(context).pop(skuList); } }, child: Container( diff --git a/lib/business_system/goods/add_goods/set_goods_specs.dart b/lib/business_system/goods/add_goods/set_goods_specs.dart index 707d6d61..c8214322 100644 --- a/lib/business_system/goods/add_goods/set_goods_specs.dart +++ b/lib/business_system/goods/add_goods/set_goods_specs.dart @@ -1,11 +1,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/business_system/goods/add_goods/data/product_sku_attr.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import '../../../retrofit/business_api.dart'; import '../../../retrofit/data/set_specs_list.dart'; import '../../../utils/font_weight.dart'; import '../../../view_widget/settlement_tips_dialog.dart'; +import 'data/product_sku.dart'; class SetGoodsSpecs extends StatefulWidget { final Map arguments; @@ -19,8 +21,8 @@ class SetGoodsSpecs extends StatefulWidget { } class _SetGoodsSpecs extends State { - List specs = []; - List> specsDetails = []; + List skuAttrList = []; + List skuList = []; bool isKeyBoardShow = false; FocusNode _focusNode = FocusNode(); BusinessApiService businessService; @@ -42,13 +44,10 @@ class _SetGoodsSpecs extends State { } }); }); - List goodsSpecsDetails = widget?.arguments["goodsSpecsDetails"] ??[]; - goodsSpecsDetails.forEach((element) { - var tempValue = SetSpecsList(); - tempValue.specsNameController.text = element["specsName"]; - tempValue.specsValues = element["specsValue"]; - specsDetails.addAll(element["valueDetail"]); - specs.add(tempValue); + skuAttrList = widget?.arguments["skuAttrList"] ?? []; + skuList = widget?.arguments["skuList"] ?? []; + skuAttrList.forEach((element) { + element.specsNameController.text = element.attrName; }); } @@ -59,22 +58,6 @@ class _SetGoodsSpecs extends State { super.dispose(); } - ///sku计算 - List mergeArr(List> arr) { - var result = arr.removeAt(0); - while (arr.isNotEmpty) { - var curArr = arr.removeAt(0); - var lastArr = result; - result = []; - for (var lastVal in lastArr) { - for (var curVal in curArr) { - result.add("$lastVal $curVal"); - } - } - } - return result; - } - @override Widget build(BuildContext context) { return GestureDetector( @@ -102,7 +85,7 @@ class _SetGoodsSpecs extends State { children: [ ListView.builder( padding: EdgeInsets.zero, - itemCount: specs.length, + itemCount: skuAttrList.length, scrollDirection: Axis.vertical, shrinkWrap: true, physics: BouncingScrollPhysics(), @@ -119,7 +102,9 @@ class _SetGoodsSpecs extends State { behavior: HitTestBehavior.opaque, onTap: () { setState(() { - specs.add(SetSpecsList()); + ProductSkuAttr product = ProductSkuAttr(); + product.attrCode = "attr_code_${skuAttrList.length}"; + skuAttrList.add(product); }); }, child: Container( @@ -148,7 +133,7 @@ class _SetGoodsSpecs extends State { ), ), ), - if (specs.length > 0) + if (skuAttrList.length > 0) Padding( padding: EdgeInsets.all(16), child: Text( @@ -159,7 +144,7 @@ class _SetGoodsSpecs extends State { fontWeight: MyFontWeight.bold, ), )), - if (specs.length > 0) + if (skuAttrList.length > 0) Container( color: Colors.white, padding: EdgeInsets.only( @@ -185,21 +170,26 @@ class _SetGoodsSpecs extends State { onTap: () { bool flag = false; String tipText = ""; - specs.forEach((element) { + skuAttrList.forEach((element) { if (element.specsNameController.text .trim() == "") { flag = true; tipText = "规格名称未输入,请先输入规格名称"; return; - } else if (element - .specsValues.length == + } else if (element.attrValueList.length == 0) { flag = true; tipText = "未添加规格值,请先添加规格值"; return; } }); + + for (var value1 in skuAttrList) { + int index = skuAttrList.indexOf(value1); + value1.attrCode = "attr_code_$index"; + } + if (flag) { SmartDialog.show( clickBgDismissTemp: false, @@ -209,19 +199,16 @@ class _SetGoodsSpecs extends State { color: Color(0xFF30415B), )); } else { - List skus = mergeArr(specs - .map((e) => e.specsValues) - .toList()); Navigator.of(context).pushNamed( '/router/edit_specs_detail', arguments: { - "skus": skus, - "specsDetails": specsDetails + "skus": skuAttrList, + "skuList": skuList }).then((value) { - if (value != null){ - specsDetails.clear(); - specsDetails.addAll(value); - setState((){}); + if (value != null && value is List) { + skuList.clear(); + skuList.addAll(value.map((e) => e as Sku).toList()); + setState(() {}); } }); } @@ -234,9 +221,17 @@ class _SetGoodsSpecs extends State { padding: EdgeInsets.only(right: 5.w), child: Text( - "去设置", + (skuList != null && + skuList.isNotEmpty) + ? "已设置" + : "去设置", style: TextStyle( - color: Color(0xD9000000), + color: + (skuList != null && + skuList + .isNotEmpty) + ? Color(0xA9000000) + : Color(0xD9000000), fontSize: 14.sp, fontWeight: MyFontWeight.bold, ), @@ -264,42 +259,40 @@ class _SetGoodsSpecs extends State { onTap: () { bool flag = false; String tipText = ""; - List goodsSpecsDetail = []; - specs.forEach((element) { - if (element.specsNameController.text - .trim() == - "") { + List skuAttrs = []; + skuAttrList.forEach((element) { + if (element.specsNameController.text.trim() == "") { flag = true; tipText = "规格名称未输入,请先输入规格名称"; return; - } else if (element - .specsValues.length == - 0) { + } else if (element.attrValueList.length == 0) { flag = true; tipText = "未添加规格值,请先添加规格值"; return; - }else if(specsDetails.length == 0){ + } else if (skuList.length == 0) { flag = true; tipText = "请设置规格明细"; return; } - goodsSpecsDetail.add({ - "specsName": element.specsNameController.text, - "specsValue":element.specsValues, - "valueDetail":specsDetails - }); + skuAttrs.add(element); }); if (flag) { SmartDialog.show( clickBgDismissTemp: false, widget: SettlementTips( - () {}, + () {}, text: tipText, color: Color(0xFF30415B), )); } else { - print(goodsSpecsDetail); - Navigator.of(context).pop(goodsSpecsDetail); + print("skuAttrs:$skuAttrs"); + skuList.forEach((element) { + print("skuList: ${element.toJson()}"); + }); + Navigator.of(context).pop({ + "skuAttrList": skuAttrs, + "skuList": skuList, + }); } }, child: Container( @@ -354,7 +347,7 @@ class _SetGoodsSpecs extends State { ), Expanded( child: TextField( - controller: specs[index].specsNameController, + controller: skuAttrList[index].specsNameController, decoration: InputDecoration( hintText: "请输入规格名称", hintTextDirection: TextDirection.rtl, @@ -405,12 +398,23 @@ class _SetGoodsSpecs extends State { '/router/set_goods_specs_value', arguments: { "storeId": "", - "specsValues": specs[index].specsValues + "attrCode": skuAttrList[index].attrCode, + "attrValues": skuAttrList[index].attrValueList }).then((value) { - if (value != null) + if (value != null && value is Map && value["attrValues"] is List) { + String code = value["attrCode"]; + List attrValues = value["attrValues"]; + print("value: $value"); setState(() { - specs[index].specsValues = value; + skuAttrList[index].attrValueList = attrValues.map((e) { + int index = attrValues.indexOf(e); + var product = ProductSkuAttrValue(); + product.attrValue = e; + product.attrValueCode = "${code}_value_$index"; + return product; + }).toList(); }); + } }); }, child: Row( @@ -419,10 +423,10 @@ class _SetGoodsSpecs extends State { children: [ Expanded( child: Text( - specs[index].specsValues.length != 0 - ? specs[index] - .specsValues - .map((e) => e) + skuAttrList[index].attrValueList.length != 0 + ? skuAttrList[index] + .attrValueList + .map((e) => e.attrValue) .toString() .replaceAll("(", "") .replaceAll(")", "") @@ -457,7 +461,7 @@ class _SetGoodsSpecs extends State { GestureDetector( onTap: () { setState(() { - specs.removeAt(index); + skuAttrList.removeAt(index); }); }, child: Padding( diff --git a/lib/business_system/goods/add_goods/set_goods_specs_value.dart b/lib/business_system/goods/add_goods/set_goods_specs_value.dart index de56fb95..3c0b03dc 100644 --- a/lib/business_system/goods/add_goods/set_goods_specs_value.dart +++ b/lib/business_system/goods/add_goods/set_goods_specs_value.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/business_system/goods/add_goods/data/product_sku_attr.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import '../../../retrofit/business_api.dart'; @@ -8,6 +9,7 @@ import '../../../retrofit/data/set_specs_value_list.dart'; import '../../../utils/font_weight.dart'; import '../../../view_widget/settlement_tips_dialog.dart'; +/// 设置商品规格明细 class SetGoodsSpecsValue extends StatefulWidget { final Map arguments; @@ -20,7 +22,8 @@ class SetGoodsSpecsValue extends StatefulWidget { } class _SetGoodsSpecsValue extends State { - List specsValue = []; + List attrValues = []; + String attrCode; bool isKeyBoardShow = false; FocusNode _focusNode = FocusNode(); BusinessApiService businessService; @@ -42,11 +45,11 @@ class _SetGoodsSpecsValue extends State { } }); }); - List specsValues = widget.arguments["specsValues"] ?? []; - specsValues.forEach((element) { - var temp = SetSpecsValueList(); - temp.specsValueNameController.text = element; - specsValue.add(temp); + attrValues = widget.arguments["attrValues"] ?? []; + attrCode = widget.arguments["attrCode"] ?? ""; + print("arguments: ${widget.arguments}"); + attrValues.forEach((element) { + element.specsValueNameController.text = element.attrValue; }); } @@ -86,7 +89,7 @@ class _SetGoodsSpecsValue extends State { color: Colors.white, child: ListView.builder( padding: EdgeInsets.zero, - itemCount: specsValue.length, + itemCount: attrValues.length, scrollDirection: Axis.vertical, shrinkWrap: true, physics: BouncingScrollPhysics(), @@ -103,7 +106,7 @@ class _SetGoodsSpecsValue extends State { behavior: HitTestBehavior.opaque, onTap: () { setState(() { - specsValue.add(SetSpecsValueList()); + attrValues.add(ProductSkuAttrValue()); FocusScope.of(context).unfocus(); }); }, @@ -144,26 +147,23 @@ class _SetGoodsSpecsValue extends State { child: GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { - bool flag = false; - List values = []; - specsValue.forEach((element) { - if (element.specsValueNameController.text == "") { - flag = true; - return; - } - values.add(element.specsValueNameController.text); - }); - if (flag) { + if (attrValues.any((element) => element.specsValueNameController.text == "")) { SmartDialog.show( clickBgDismissTemp: false, widget: SettlementTips( - () {}, + () {}, text: "还有规格未输入值,请输入完整", color: Color(0xFF30415B), )); - } else { - Navigator.of(context).pop(values); + return; } + List values = attrValues.map((element) { + return element.specsValueNameController.text; + }).toList(); + Navigator.of(context).pop({ + "attrCode": attrCode, + "attrValues": values, + }); }, child: Container( color: Colors.white, @@ -206,7 +206,7 @@ class _SetGoodsSpecsValue extends State { GestureDetector( onTap: () { setState(() { - specsValue.removeAt(index); + attrValues.removeAt(index); }); }, child: Container( @@ -220,7 +220,7 @@ class _SetGoodsSpecsValue extends State { ), Expanded( child: TextField( - controller: specsValue[index].specsValueNameController, + controller: attrValues[index].specsValueNameController, decoration: InputDecoration( hintText: "请输入规格值名称", hintStyle: TextStyle( @@ -239,7 +239,7 @@ class _SetGoodsSpecsValue extends State { ), ], ), - if (specsValue.length - 1 > index) + if (attrValues.length - 1 > index) Container( width: double.infinity, height: 1.h, diff --git a/lib/business_system/goods/add_goods/set_meal.dart b/lib/business_system/goods/add_goods/set_meal.dart index afde17c5..cfa55ecc 100644 --- a/lib/business_system/goods/add_goods/set_meal.dart +++ b/lib/business_system/goods/add_goods/set_meal.dart @@ -47,10 +47,10 @@ class _SetMeal extends State { List mealDetails = widget?.arguments["mealDetails"] ??[]; mealDetails.forEach((element) { var tempValue = SetSpecsMealList(); - tempValue.groupsNameController.text = element["groupsName"]; - tempValue.groupsTotal = element["groupsTotal"]; - tempValue.optionalNum = element["optionalNum"]; - tempValue.goodsMeal = element["goodsDetail"]; + tempValue.groupsNameController.text = element["groupName"]; + tempValue.groupsTotal = element["totalNumber"]; + tempValue.optionalNum = element["optionalNumber"]; + tempValue.goodsMeal = element["productInfoList"]; specsMeal.add(tempValue); }); } @@ -103,10 +103,10 @@ class _SetMeal extends State { return; } mealDetail.add({ - "groupsName":element.groupsNameController.text, - "groupsTotal":element.groupsTotal, - "optionalNum":element.optionalNum, - "goodsDetail":element.goodsMeal + "groupName": element.groupsNameController.text, + "totalNumber":element.groupsTotal, + "optionalNumber":element.optionalNum, + "productInfoList":element.goodsMeal }); }); if (flag) { @@ -397,11 +397,17 @@ class _SetMeal extends State { Navigator.of(context).pushNamed('/router/batch_shelf', arguments: { "storeId": widget.arguments["storeId"], - "titleName": "选择商品" + "titleName": "选择商品", + "groupNum": specsMeal[index].groupsTotal }).then((value) { - specsMeal[index].goodsMeal.clear(); - specsMeal[index].goodsMeal.addAll(value); - setState(() {}); + if (value != null && value is List) { + if (specsMeal[index].goodsMeal == null) { + specsMeal[index].goodsMeal = []; + } + specsMeal[index].goodsMeal.clear(); + specsMeal[index].goodsMeal.addAll(value.map((e) => e as Map).toList()); + setState(() {}); + } }); }, child: Container( @@ -563,7 +569,7 @@ class _SetMeal extends State { Widget addGoodsItem(specsIndex, index) { return Container( color: Colors.white, - margin: EdgeInsets.symmetric(vertical: 12.h), + margin: EdgeInsets.symmetric(vertical: 8), padding: EdgeInsets.only( left: 16.w, top: 20.h, @@ -575,7 +581,7 @@ class _SetMeal extends State { children: [ Expanded( child: Text( - specsMeal[specsIndex]?.goodsMeal[index]["goodsName"] ?? "", + specsMeal[specsIndex]?.goodsMeal[index]["productName"] ?? "", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -599,7 +605,7 @@ class _SetMeal extends State { ), Expanded( child: Text( - specsMeal[specsIndex]?.goodsMeal[index]["goodsNum"] ?? "", + specsMeal[specsIndex]?.goodsMeal[index]["number"] ?? "", textAlign: TextAlign.center, style: TextStyle( color: Color(0xFF000000), diff --git a/lib/business_system/goods/on_sale/batch_shelf.dart b/lib/business_system/goods/on_sale/batch_shelf.dart index ff1e6ee7..882a58ff 100644 --- a/lib/business_system/goods/on_sale/batch_shelf.dart +++ b/lib/business_system/goods/on_sale/batch_shelf.dart @@ -1,3 +1,5 @@ +import 'dart:ffi'; + import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; @@ -40,12 +42,14 @@ class _BatchShelf extends State { BusinessApiService businessService; ProductGroupList productGroupList; List adminProductVoList = []; + List selectedProductVoList = []; List productIds = []; int _loadCount = 0; int _pageIndex = 1; int groupIndex = -1; String networkError = ""; int networkStatus = 0; + int groupNum = 1; String titleName; @override @@ -53,6 +57,7 @@ class _BatchShelf extends State { super.initState(); _onRefresh(); titleName = widget?.arguments["titleName"] ?? ""; + groupNum = widget?.arguments["groupNum"] ?? 1; } @override @@ -134,6 +139,14 @@ class _BatchShelf extends State { if (!mounted) return; if (baseData != null && baseData.isSuccess) { adminProductVoList.addAll(baseData?.data?.adminProductVOList ?? []); + + // 判断新列表中是否又选中过的商品 + if (selectedProductVoList.isNotEmpty) { + adminProductVoList.forEach((element) { + element.isSelect = selectedProductVoList.any((e) => e.id == element.id); + }); + } + if ((baseData?.data?.adminProductVOList ?? []).isEmpty || adminProductVoList.length == baseData.data.total) { _refreshController.loadNoData(); @@ -201,7 +214,7 @@ class _BatchShelf extends State { action: GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { - List> goodsMeal = []; + List> goodsMeal = []; if (titleName == "批量下架") { if (productIds.length != 0) productIds.clear(); adminProductVoList.forEach((element) { @@ -215,24 +228,29 @@ class _BatchShelf extends State { } } else { if (goodsMeal.length != 0) goodsMeal.clear(); - adminProductVoList.forEach((element) { - if (element.isSelect) - goodsMeal.add({ - "goodsName": element.productName, - "goodsNum": element.goodsNumber.toString() - }); - }); - Navigator.of(context).pop(goodsMeal); + if (groupNum != selectedProductVoList.length) { + SmartDialog.showToast("选择的商品与分组总数不一致", alignment: Alignment.center); + return; + } + goodsMeal = selectedProductVoList.map((e) => { + "productId": e.id, + "storeId": e.storeId, + "skuInfoList": e.productSkuVOList, + "productAttrInfoList": e.attrList, + "productName": e.productName, + "number": e.goodsNumber.toString() + }).toList(); if (goodsMeal.length == 0) { SmartDialog.showToast("请选择要增加的商品", alignment: Alignment.center); return; } + Navigator.of(context).pop(goodsMeal); } }, child: Container( alignment: Alignment.center, child: Text( - S.of(context).queren, + "${S.of(context).queren}(${selectedProductVoList.length}/${groupNum})", style: TextStyle( color: Color(0xFF30415B), fontSize: 14.sp, @@ -450,13 +468,13 @@ class _BatchShelf extends State { ); } - Widget shelfGoodsItem(AdminProductVoList adminProductVoList) { + Widget shelfGoodsItem(AdminProductVoList adminProductVo) { return Container( margin: EdgeInsets.only(bottom: 21.h, left: 16.w), child: Row( children: [ MImage( - adminProductVoList?.productImg ?? "", + adminProductVo?.productImg ?? "", width: 77.h, height: 77.h, fit: BoxFit.cover, @@ -472,7 +490,7 @@ class _BatchShelf extends State { Padding( padding: EdgeInsets.only(top: 2.h), child: Text( - adminProductVoList?.productName ?? "", + adminProductVo?.productName ?? "", maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -484,7 +502,7 @@ class _BatchShelf extends State { Row( children: [ Text( - "库存${adminProductVoList?.stock ?? 0}", + "库存${adminProductVo?.stock ?? 0}", style: TextStyle( fontSize: 10.sp, fontWeight: MyFontWeight.regular, @@ -496,7 +514,7 @@ class _BatchShelf extends State { ), Expanded( child: Text( - "销量${adminProductVoList?.sellCount ?? 0}", + "销量${adminProductVo?.sellCount ?? 0}", style: TextStyle( fontSize: 10.sp, fontWeight: MyFontWeight.regular, @@ -504,11 +522,21 @@ class _BatchShelf extends State { ), )), Checkbox( - value: adminProductVoList.isSelect, + value: adminProductVo.isSelect, onChanged: (a) { + if (!adminProductVo.isSelect) { + if (selectedProductVoList.length >= groupNum) { + SmartDialog.showToast("商品分组总数只有${groupNum}个,无法添加更多", alignment: Alignment.center); + return; + } + } setState(() { - adminProductVoList.isSelect = - !adminProductVoList.isSelect; + adminProductVo.isSelect = !adminProductVo.isSelect; + if (adminProductVo.isSelect) { + selectedProductVoList.add(adminProductVo); + } else { + selectedProductVoList.remove(adminProductVo); + } }); }, shape: RoundedRectangleBorder( @@ -537,7 +565,7 @@ class _BatchShelf extends State { ), ), TextSpan( - text: adminProductVoList?.price ?? "", + text: adminProductVo?.price ?? "", style: TextStyle( fontSize: 18.sp, fontWeight: MyFontWeight.medium, @@ -552,9 +580,9 @@ class _BatchShelf extends State { behavior: HitTestBehavior.opaque, onTap: () { setState(() { - if (adminProductVoList.goodsNumber <= 1) return; - adminProductVoList?.goodsNumber = - adminProductVoList.goodsNumber - 1; + if (adminProductVo.goodsNumber <= 1) return; + adminProductVo?.goodsNumber = + adminProductVo.goodsNumber - 1; }); }, child: Container( @@ -566,7 +594,7 @@ class _BatchShelf extends State { ))), if (titleName == "选择商品") Text( - adminProductVoList?.goodsNumber?.toString() ?? "", + adminProductVo?.goodsNumber?.toString() ?? "", style: TextStyle( color: Color(0xD9000000), fontSize: 20.sp, @@ -578,8 +606,8 @@ class _BatchShelf extends State { behavior: HitTestBehavior.opaque, onTap: () { setState(() { - adminProductVoList.goodsNumber = - adminProductVoList.goodsNumber + 1; + adminProductVo.goodsNumber = + adminProductVo.goodsNumber + 1; }); }, child: Container( diff --git a/lib/main.dart b/lib/main.dart index 4e634d07..72b6792b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -275,7 +275,6 @@ class MyApp extends StatelessWidget { if(lastRoutePage?.settings?.name == "/router/personal_page" && lastRoutePage.navigator != null) lastRoutePage.navigator.pop(); - } final Function pageContentBuilder = routers[name]; if (pageContentBuilder != null) { diff --git a/lib/retrofit/business_api.dart b/lib/retrofit/business_api.dart index 417045f4..bd2b9a1a 100644 --- a/lib/retrofit/business_api.dart +++ b/lib/retrofit/business_api.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:dio/dio.dart'; +import 'package:dio_log/interceptor/dio_log_interceptor.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; @@ -94,6 +95,7 @@ abstract class BusinessApiService { responseType: ResponseType.json, baseUrl: baseUrl, ); + dio.interceptors.add(DioLogInterceptor()); dio.interceptors.add( InterceptorsWrapper(onRequest: (RequestOptions options) { debugPrint("\n======================= 请求数据 ======================="); diff --git a/lib/retrofit/data/set_specs_list.dart b/lib/retrofit/data/set_specs_list.dart index 5f28f98a..f5dd0b6e 100644 --- a/lib/retrofit/data/set_specs_list.dart +++ b/lib/retrofit/data/set_specs_list.dart @@ -1,17 +1,22 @@ import 'package:flutter/cupertino.dart'; +import 'package:huixiang/business_system/goods/add_goods/data/product_sku_attr.dart'; +@Deprecated("更换为:ProductSkuAttr") class SetSpecsList { TextEditingController _specsNameController; - List _specsValues = []; - + List _specsValues = []; + String _specsCode = ""; TextEditingController get specsNameController => _specsNameController; + List get specsValues => _specsValues; + String get specsCode => _specsCode; - List get specsValues => _specsValues; - - set specsValues(List value) { + set specsValues(List value) { _specsValues = value; } + set specsCode(String value) { + _specsCode = value; + } SetSpecsList(){ _specsNameController = TextEditingController(); diff --git a/lib/retrofit/data/set_specs_meal_list.dart b/lib/retrofit/data/set_specs_meal_list.dart index d86cabc3..2041a639 100644 --- a/lib/retrofit/data/set_specs_meal_list.dart +++ b/lib/retrofit/data/set_specs_meal_list.dart @@ -2,16 +2,16 @@ import 'package:flutter/cupertino.dart'; class SetSpecsMealList { TextEditingController _groupsNameController; - List> _goodsMeal = []; + List> _goodsMeal = []; num _groupsTotal = 1; num _optionalNum = 1; TextEditingController get groupsNameController => _groupsNameController; - List> get goodsMeal => _goodsMeal; + List> get goodsMeal => _goodsMeal; - set goodsMeal(List> value) { + set goodsMeal(List> value) { _goodsMeal = value; } diff --git a/lib/retrofit/data/set_specs_value_list.dart b/lib/retrofit/data/set_specs_value_list.dart index 362ccefe..bcf213cb 100644 --- a/lib/retrofit/data/set_specs_value_list.dart +++ b/lib/retrofit/data/set_specs_value_list.dart @@ -1,5 +1,6 @@ import 'package:flutter/cupertino.dart'; +@Deprecated("更换为:ProductSkuAttrValue") class SetSpecsValueList { TextEditingController _specsValueNameController; diff --git a/pubspec.lock b/pubspec.lock index 32ecefb3..87884e3c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,7 +5,6 @@ packages: dependency: "direct main" description: name: ai_decimal_accuracy - sha256: "2a0f195a0bf9f36e7481a66e03d5b1e4e90b4861438910d63e99e42ddcdebdbb" url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" @@ -13,7 +12,6 @@ packages: dependency: "direct main" description: name: android_intent_plus - sha256: e49b4d9e26135dd7ef83606aac56bd3105345e8243de903939a15c5aa07cc0ec url: "https://pub.flutter-io.cn" source: hosted version: "1.0.2" @@ -21,7 +19,6 @@ packages: dependency: transitive description: name: args - sha256: b003c3098049a51720352d219b0bb5f219b60fbfb68e7a4748139a06a5676515 url: "https://pub.flutter-io.cn" source: hosted version: "2.3.1" @@ -29,7 +26,6 @@ packages: dependency: transitive description: name: asn1lib - sha256: b74e3842a52c61f8819a1ec8444b4de5419b41a7465e69d4aa681445377398b0 url: "https://pub.flutter-io.cn" source: hosted version: "1.4.1" @@ -37,15 +33,13 @@ packages: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 url: "https://pub.flutter-io.cn" source: hosted - version: "2.10.0" + version: "2.8.2" barcode: dependency: transitive description: name: barcode - sha256: "6f4e44699843c336fcb4a14a4f4221f03d21ae47dd8c4ae4c25ffc7b7dd1cfb8" url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" @@ -53,7 +47,6 @@ packages: dependency: "direct main" description: name: barcode_widget - sha256: "4fb82c63a008972bc5f0ca83865bd3a5728f596c80f44658aefd7d55b6e65f45" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.1" @@ -61,15 +54,13 @@ packages: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.1" + version: "2.1.0" bubble_tab_indicator: dependency: "direct main" description: name: bubble_tab_indicator - sha256: "0aa37980a00e3374d917f9da8e83acd7f59ba872a3d05c306220063f28f945aa" url: "https://pub.flutter-io.cn" source: hosted version: "0.1.6" @@ -77,15 +68,13 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.1" + version: "1.2.0" charcode: dependency: transitive description: name: charcode - sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 url: "https://pub.flutter-io.cn" source: hosted version: "1.3.1" @@ -93,7 +82,6 @@ packages: dependency: transitive description: name: charts_common - sha256: "7b8922f9b0d9b134122756a787dab1c3946ae4f3fc5022ff323ba0014998ea02" url: "https://pub.flutter-io.cn" source: hosted version: "0.12.0" @@ -101,7 +89,6 @@ packages: dependency: "direct main" description: name: charts_flutter - sha256: "4172c3f4b85322fdffe1896ffbed79ae4689ae72cb6fe6690dcaaea620a9c558" url: "https://pub.flutter-io.cn" source: hosted version: "0.12.0" @@ -109,7 +96,6 @@ packages: dependency: transitive description: name: chewie - sha256: "90a75721f8cb881be0a38878b246183f69a0490e409f1d8f294b686b89a25f24" url: "https://pub.flutter-io.cn" source: hosted version: "1.3.3" @@ -117,7 +103,6 @@ packages: dependency: "direct main" description: name: chewie_audio - sha256: ac29d37382c4f0d9da8e6f53c78b3e74ffff102040b1e77c7e49e4fa35cd425f url: "https://pub.flutter-io.cn" source: hosted version: "1.4.0" @@ -125,23 +110,20 @@ packages: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.1" + version: "1.1.0" collection: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 url: "https://pub.flutter-io.cn" source: hosted - version: "1.17.0" + version: "1.16.0" convert: dependency: transitive description: name: convert - sha256: "1be13198012c1d5bc042dc40ad1d7f16cbd522350984c0c1abf471d6d7e305c6" url: "https://pub.flutter-io.cn" source: hosted version: "3.1.0" @@ -149,7 +131,6 @@ packages: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 url: "https://pub.flutter-io.cn" source: hosted version: "3.0.2" @@ -157,7 +138,6 @@ packages: dependency: transitive description: name: csslib - sha256: b36c7f7e24c0bdf1bf9a3da461c837d1de64b9f8beb190c9011d8c72a3dfd745 url: "https://pub.flutter-io.cn" source: hosted version: "0.17.2" @@ -165,7 +145,6 @@ packages: dependency: "direct main" description: name: cupertino_icons - sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be url: "https://pub.flutter-io.cn" source: hosted version: "1.0.5" @@ -173,15 +152,20 @@ packages: dependency: "direct main" description: name: dio - sha256: "11979099d9ea182d74b6734340704d628b99c7a8316f9edd7718a297d1bcdd27" url: "https://pub.flutter-io.cn" source: hosted version: "3.0.10" + dio_log: + dependency: "direct main" + description: + name: dio_log + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.5" emoji_picker_flutter: dependency: "direct main" description: name: emoji_picker_flutter - sha256: a0e8b36a98ca2257b0edd9cb6ef5b4aa2a6fbf3ed67cf11eab96100778741b8a url: "https://pub.flutter-io.cn" source: hosted version: "1.4.1" @@ -189,7 +173,6 @@ packages: dependency: "direct main" description: name: encrypt - sha256: "4fd4e4fdc21b9d7d4141823e1e6515cd94e7b8d84749504c232999fba25d9bbb" url: "https://pub.flutter-io.cn" source: hosted version: "5.0.1" @@ -197,7 +180,6 @@ packages: dependency: transitive description: name: equatable - sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.5" @@ -205,7 +187,6 @@ packages: dependency: "direct main" description: name: event_bus - sha256: "44baa799834f4c803921873e7446a2add0f3efa45e101a054b1f0ab9b95f8edc" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" @@ -213,15 +194,13 @@ packages: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.1" + version: "1.3.0" ffi: dependency: transitive description: name: ffi - sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" @@ -229,7 +208,6 @@ packages: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" url: "https://pub.flutter-io.cn" source: hosted version: "6.1.4" @@ -237,7 +215,6 @@ packages: dependency: "direct main" description: name: fl_chart - sha256: "48a1b69be9544e2b03d9a8e843affd89e43f3194c9248776222efcb4206bb1ec" url: "https://pub.flutter-io.cn" source: hosted version: "0.62.0" @@ -245,7 +222,6 @@ packages: dependency: "direct main" description: name: flare_flutter - sha256: "99d63c60f00fac81249ce6410ee015d7b125c63d8278a30da81edf3317a1f6a0" url: "https://pub.flutter-io.cn" source: hosted version: "3.0.2" @@ -258,7 +234,6 @@ packages: dependency: "direct main" description: name: flutter_baidu_mapapi_base - sha256: e0ee788b4e48e4a0f33f321fd45c2375fda2b9f736a6fe32348a272fbb038ba5 url: "https://pub.flutter-io.cn" source: hosted version: "3.2.0" @@ -266,7 +241,6 @@ packages: dependency: "direct main" description: name: flutter_baidu_mapapi_map - sha256: "7db88c86e4353005477064645200c3070cfd775a97be977b157fa65f67d05354" url: "https://pub.flutter-io.cn" source: hosted version: "3.2.1" @@ -274,7 +248,6 @@ packages: dependency: "direct main" description: name: flutter_baidu_mapapi_search - sha256: "8228f356297a97c6a86229056f01211bc2fd7ee4d57d2e64d4d95b7ccf4d494f" url: "https://pub.flutter-io.cn" source: hosted version: "3.2.0" @@ -282,7 +255,6 @@ packages: dependency: "direct main" description: name: flutter_baidu_mapapi_utils - sha256: fbd2c5511f795671bd25783f8640f32f0b26dc68befbe5582092909434c4ba89 url: "https://pub.flutter-io.cn" source: hosted version: "3.2.0" @@ -290,7 +262,6 @@ packages: dependency: "direct main" description: name: flutter_bmflocation - sha256: "1aa324563c3bdfaf08d09dc336599c8a2cbc08053cf74d77903bacf29078a611" url: "https://pub.flutter-io.cn" source: hosted version: "3.2.1" @@ -298,7 +269,6 @@ packages: dependency: "direct main" description: name: flutter_datetime_picker - sha256: "8e695c63c769350e541951227c2775190ec73ceda774a315b1dc9a99d5facfe5" url: "https://pub.flutter-io.cn" source: hosted version: "1.5.1" @@ -306,7 +276,6 @@ packages: dependency: "direct main" description: name: flutter_easyloading - sha256: ba21a3c883544e582f9cc455a4a0907556714e1e9cf0eababfcb600da191d17c url: "https://pub.flutter-io.cn" source: hosted version: "3.0.5" @@ -314,7 +283,6 @@ packages: dependency: "direct main" description: name: flutter_html - sha256: ccb810fcabfce3a7ffaca46e458323915ac7e7fc59082c7357ff848972c02230 url: "https://pub.flutter-io.cn" source: hosted version: "2.2.1" @@ -322,7 +290,6 @@ packages: dependency: transitive description: name: flutter_layout_grid - sha256: "86c1b21520612edfbb93f189b3ec05058470570f3a5c08ce10c92cc76a6e814e" url: "https://pub.flutter-io.cn" source: hosted version: "1.0.6" @@ -335,7 +302,6 @@ packages: dependency: transitive description: name: flutter_math_fork - sha256: cfec964c4975c6becc64291eb9b782fe70df5e0c5bfe0763d9e856432fcc6fcd url: "https://pub.flutter-io.cn" source: hosted version: "0.4.2+2" @@ -343,7 +309,6 @@ packages: dependency: transitive description: name: flutter_page_indicator - sha256: a5b2992228c2827b69faed3977681a3f5c313c7f13d72272decbb2923d1d7176 url: "https://pub.flutter-io.cn" source: hosted version: "0.0.3" @@ -351,7 +316,6 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "96af49aa6b57c10a312106ad6f71deed5a754029c24789bbf620ba784f0bd0b0" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.14" @@ -359,7 +323,6 @@ packages: dependency: "direct main" description: name: flutter_screenutil - sha256: c04bf2f9a41b5130c1071daa34acc04b5e4f479181287a958ece9b31a5b8f89c url: "https://pub.flutter-io.cn" source: hosted version: "5.0.0+1" @@ -367,7 +330,6 @@ packages: dependency: "direct main" description: name: flutter_slidable - sha256: "90787334388211e6810065550119b015e6fd3893584641194d500bf5bc7e6235" url: "https://pub.flutter-io.cn" source: hosted version: "1.3.2" @@ -375,7 +337,6 @@ packages: dependency: "direct main" description: name: flutter_smart_dialog - sha256: "3f99d33847629b223f28bb339eff58687d64efed3965a7e44d650d0c89739325" url: "https://pub.flutter-io.cn" source: hosted version: "3.0.6" @@ -383,7 +344,6 @@ packages: dependency: "direct main" description: name: flutter_spinkit - sha256: b39c753e909d4796906c5696a14daf33639a76e017136c8d82bf3e620ce5bb8e url: "https://pub.flutter-io.cn" source: hosted version: "5.2.0" @@ -391,7 +351,6 @@ packages: dependency: "direct main" description: name: flutter_staggered_grid_view - sha256: f0b6d8c0fa7b4b444985cdde68492c0138a4fb6fc57a641b24cb234b7ee0f5c4 url: "https://pub.flutter-io.cn" source: hosted version: "0.4.1" @@ -399,7 +358,6 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: "9ac1967e2f72a08af11b05b39167920f90d043cf67163d13a544a358c8f31afa" url: "https://pub.flutter-io.cn" source: hosted version: "0.22.0" @@ -407,7 +365,6 @@ packages: dependency: "direct main" description: name: flutter_swiper - sha256: e52a0e894abfa4099a5d4e5098a00597f3b55e25617cdd19e6fe6be5d24858c7 url: "https://pub.flutter-io.cn" source: hosted version: "1.1.6" @@ -425,7 +382,6 @@ packages: dependency: "direct main" description: name: fluwx - sha256: e54837349819d51261be00692071db43fc1ff79dd06cf3a50175a5940249691e url: "https://pub.flutter-io.cn" source: hosted version: "3.9.0+2" @@ -433,7 +389,6 @@ packages: dependency: "direct main" description: name: font_awesome_flutter - sha256: "1f93e5799f0e6c882819e8393a05c6ca5226010f289190f2242ec19f3f0fdba5" url: "https://pub.flutter-io.cn" source: hosted version: "9.2.0" @@ -441,7 +396,6 @@ packages: dependency: "direct main" description: name: gbk2utf8 - sha256: "83a255e974b970d20538c1661bd5b7ee9120e106fbb10478cffcd515ba480e34" url: "https://pub.flutter-io.cn" source: hosted version: "1.0.1" @@ -449,7 +403,6 @@ packages: dependency: "direct main" description: name: gradient_widgets - sha256: d337a8a329da9aefa50b82155d11875c1b9992982f65d15c805aa057a2670536 url: "https://pub.flutter-io.cn" source: hosted version: "0.6.0" @@ -457,7 +410,6 @@ packages: dependency: transitive description: name: graphs - sha256: db4e50f399d69bf7349d4e99e8dabd74fad51c0574f36b8d3613ef465715af52 url: "https://pub.flutter-io.cn" source: hosted version: "0.2.0" @@ -465,7 +417,6 @@ packages: dependency: transitive description: name: html - sha256: "58e3491f7bf0b6a4ea5110c0c688877460d1a6366731155c4a4580e7ded773e8" url: "https://pub.flutter-io.cn" source: hosted version: "0.15.3" @@ -473,7 +424,6 @@ packages: dependency: transitive description: name: http_parser - sha256: "9d2b0626e9e402fc98e6868360da8f256064d6c0b8e4c3edcca5e02fb0b95da9" url: "https://pub.flutter-io.cn" source: hosted version: "3.1.4" @@ -481,7 +431,6 @@ packages: dependency: "direct main" description: name: image_gallery_saver - sha256: be812580c7a320d3bf583af89cac6b376f170d48000aca75215a73285a3223a0 url: "https://pub.flutter-io.cn" source: hosted version: "1.7.1" @@ -489,7 +438,6 @@ packages: dependency: "direct main" description: name: image_pickers - sha256: "3175436eec5136773230cf25bb0feba7e58bded93c6f4159bd4bae2b90b4c2d3" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" @@ -497,7 +445,6 @@ packages: dependency: transitive description: name: infinite_listview - sha256: f6062c1720eb59be553dfa6b89813d3e8dd2f054538445aaa5edaddfa5195ce6 url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" @@ -505,7 +452,6 @@ packages: dependency: "direct main" description: name: intl - sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" url: "https://pub.flutter-io.cn" source: hosted version: "0.17.0" @@ -513,15 +459,13 @@ packages: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" url: "https://pub.flutter-io.cn" source: hosted - version: "0.6.5" + version: "0.6.4" json_annotation: dependency: "direct main" description: name: json_annotation - sha256: "6cec7404b25d6338c8cb7b30131cd6c760079a4ec1fa7846c55bdda91f9d2819" url: "https://pub.flutter-io.cn" source: hosted version: "3.1.1" @@ -529,7 +473,6 @@ packages: dependency: "direct main" description: name: keframe - sha256: a84add1826c54cd68e6095dbcc00cdd84fd4d97820712bfc8e1d06f41b0bfac3 url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0" @@ -537,7 +480,6 @@ packages: dependency: "direct main" description: name: like_button - sha256: "08e6a45b78888412df5d351786c550205ad3a677e72a0820d5bbc0b063c8a463" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.5" @@ -545,15 +487,13 @@ packages: dependency: "direct main" description: name: logger - sha256: "7ad7215c15420a102ec687bb320a7312afd449bac63bfb1c60d9787c27b9767f" url: "https://pub.flutter-io.cn" source: hosted - version: "1.4.0" + version: "2.0.2+1" logging: dependency: transitive description: name: logging - sha256: c0bbfe94d46aedf9b8b3e695cf3bd48c8e14b35e3b2c639e0aa7755d589ba946 url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" @@ -561,31 +501,27 @@ packages: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.13" + version: "0.12.11" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 url: "https://pub.flutter-io.cn" source: hosted - version: "0.2.0" + version: "0.1.4" meta: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.0" + version: "1.7.0" mqtt_client: dependency: "direct main" description: name: mqtt_client - sha256: e8347f8996c33b80a6764a1881e94a8ef5392c2d6e724b9daad65eafa202b0c7 url: "https://pub.flutter-io.cn" source: hosted version: "9.6.8" @@ -593,7 +529,6 @@ packages: dependency: transitive description: name: nested - sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" @@ -601,7 +536,6 @@ packages: dependency: "direct main" description: name: network_to_file_image - sha256: "47528730539abf61ea9b5edf30fe2803b5f8212b2049e1a6cb3b564acadc46dc" url: "https://pub.flutter-io.cn" source: hosted version: "4.0.1" @@ -609,7 +543,6 @@ packages: dependency: "direct main" description: name: number_precision - sha256: "397639f584cdd4fb5965e3b91c03b911b0c8fa9c5be7e7236bbf102bf6f75681" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2+1" @@ -617,7 +550,6 @@ packages: dependency: transitive description: name: numerus - sha256: "0087ef729d63b96cb347a9c44b9c592f21cecb3605b415bbd18710aef80ce5cb" url: "https://pub.flutter-io.cn" source: hosted version: "1.1.1" @@ -625,7 +557,6 @@ packages: dependency: "direct main" description: name: package_info - sha256: "6c07d9d82c69e16afeeeeb6866fe43985a20b3b50df243091bfc4a4ad2b03b75" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" @@ -633,15 +564,13 @@ packages: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.2" + version: "1.8.1" path_drawing: dependency: transitive description: name: path_drawing - sha256: "3bdd251dae9ffaef944450b73f168610db7e968e7b20daf0c3907f8b4aafc8a2" url: "https://pub.flutter-io.cn" source: hosted version: "0.5.1+1" @@ -649,7 +578,6 @@ packages: dependency: transitive description: name: path_parsing - sha256: ee5c47c1058ad66b4a41746ec3996af9593d0858872807bcd64ac118f0700337 url: "https://pub.flutter-io.cn" source: hosted version: "0.2.1" @@ -657,7 +585,6 @@ packages: dependency: "direct main" description: name: path_provider - sha256: "7a6929151858214b36140fb847090292d027818e91da7141a2402cbf037b491e" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.4" @@ -665,7 +592,6 @@ packages: dependency: transitive description: name: path_provider_linux - sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1" url: "https://pub.flutter-io.cn" source: hosted version: "2.1.10" @@ -673,7 +599,6 @@ packages: dependency: transitive description: name: path_provider_macos - sha256: "4e9a9637dfeba8c35f598238c63adc6e77121b16d81ae97ad21b952a67c83a64" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.3" @@ -681,7 +606,6 @@ packages: dependency: transitive description: name: path_provider_platform_interface - sha256: "2e14fc474b8acfc4111ac8eb0e37c2fe70234f9f8cd796f1560d03aa1689fa51" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" @@ -689,7 +613,6 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: d3f80b32e83ec208ac95253e0cd4d298e104fbc63cb29c5c69edaed43b0c69d6 url: "https://pub.flutter-io.cn" source: hosted version: "2.1.6" @@ -697,7 +620,6 @@ packages: dependency: "direct main" description: name: permission_handler - sha256: fb4666087528b1cbf91d98771cf50b14f36f4d8756ec7e7a8629dd3cb55442b7 url: "https://pub.flutter-io.cn" source: hosted version: "5.1.0+2" @@ -705,7 +627,6 @@ packages: dependency: transitive description: name: permission_handler_platform_interface - sha256: f7e3c798f7c4dd215e4ca8843695b3a63a5b79c9aa04f296d316f13a15d518ba url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" @@ -713,7 +634,6 @@ packages: dependency: transitive description: name: petitparser - sha256: "2ebb289dc4764ec397f5cd3ca9881c6d17196130a7d646ed022a0dd9c2e25a71" url: "https://pub.flutter-io.cn" source: hosted version: "5.0.0" @@ -721,7 +641,6 @@ packages: dependency: "direct main" description: name: photo_view - sha256: "26cb153080a2673bebccaf72d3283e82f8f41a47fe5f9bc5ba8634d2e8a9fc8e" url: "https://pub.flutter-io.cn" source: hosted version: "0.13.0" @@ -729,7 +648,6 @@ packages: dependency: "direct main" description: name: pin_input_text_field - sha256: "569861876d5c67994adc58ddd15e93bd0057c4f26d7e5599ccde880d05813463" url: "https://pub.flutter-io.cn" source: hosted version: "4.4.1" @@ -737,7 +655,6 @@ packages: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" url: "https://pub.flutter-io.cn" source: hosted version: "3.1.0" @@ -745,7 +662,6 @@ packages: dependency: transitive description: name: plugin_platform_interface - sha256: c3ebbff365bfb1b5f7b690c9857d2dabea167f35b05eb7586186499b407efb37 url: "https://pub.flutter-io.cn" source: hosted version: "1.0.3" @@ -753,7 +669,6 @@ packages: dependency: transitive description: name: pointycastle - sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" url: "https://pub.flutter-io.cn" source: hosted version: "3.7.3" @@ -761,7 +676,6 @@ packages: dependency: transitive description: name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" url: "https://pub.flutter-io.cn" source: hosted version: "4.2.4" @@ -769,7 +683,6 @@ packages: dependency: transitive description: name: provider - sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f url: "https://pub.flutter-io.cn" source: hosted version: "6.0.5" @@ -777,7 +690,6 @@ packages: dependency: "direct main" description: name: pull_to_refresh - sha256: bbadd5a931837b57739cf08736bea63167e284e71fb23b218c8c9a6e042aad12 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" @@ -785,7 +697,6 @@ packages: dependency: transitive description: name: qr - sha256: "5c4208b4dc0d55c3184d10d83ee0ded6212dc2b5e2ba17c5a0c0aab279128d21" url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" @@ -793,7 +704,6 @@ packages: dependency: "direct main" description: name: qr_flutter - sha256: c5c121c54cb6dd837b9b9d57eb7bc7ec6df4aee741032060c8833a678c80b87e url: "https://pub.flutter-io.cn" source: hosted version: "4.0.0" @@ -801,7 +711,6 @@ packages: dependency: transitive description: name: quiver - sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 url: "https://pub.flutter-io.cn" source: hosted version: "3.2.1" @@ -809,7 +718,6 @@ packages: dependency: "direct main" description: name: retrofit - sha256: bd4d2817ecb01cdf7ce6d7de62a44716639e82e6b62bd295984c12eb916fb341 url: "https://pub.flutter-io.cn" source: hosted version: "1.3.4+1" @@ -817,7 +725,6 @@ packages: dependency: "direct main" description: name: rive - sha256: cf420a4440bc072698432bd176e70c70cbec01b8c1debe5c56edf2a19b310fbf url: "https://pub.flutter-io.cn" source: hosted version: "0.6.8" @@ -825,7 +732,6 @@ packages: dependency: "direct main" description: name: rxdart - sha256: "2ef8b4e91cb3b55d155e0e34eeae0ac7107974e451495c955ac04ddee8cc21fd" url: "https://pub.flutter-io.cn" source: hosted version: "0.26.0" @@ -833,7 +739,6 @@ packages: dependency: "direct main" description: name: scan - sha256: b343ec36f863a88d41eb4c174b810c055c6bd1f1822b2188ab31aab684fb7cdb url: "https://pub.flutter-io.cn" source: hosted version: "1.6.0" @@ -841,7 +746,6 @@ packages: dependency: "direct main" description: name: shared_preferences - sha256: "78528fd87d0d08ffd3e69551173c026e8eacc7b7079c82eb6a77413957b7e394" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.20" @@ -849,7 +753,6 @@ packages: dependency: transitive description: name: shared_preferences_android - sha256: ad423a80fe7b4e48b50d6111b3ea1027af0e959e49d485712e134863d9c1c521 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.17" @@ -857,7 +760,6 @@ packages: dependency: transitive description: name: shared_preferences_foundation - sha256: "1e755f8583229f185cfca61b1d80fb2344c9d660e1c69ede5450d8f478fa5310" url: "https://pub.flutter-io.cn" source: hosted version: "2.1.5" @@ -865,7 +767,6 @@ packages: dependency: transitive description: name: shared_preferences_linux - sha256: "3a59ed10890a8409ad0faad7bb2957dab4b92b8fbe553257b05d30ed8af2c707" url: "https://pub.flutter-io.cn" source: hosted version: "2.1.5" @@ -873,7 +774,6 @@ packages: dependency: transitive description: name: shared_preferences_platform_interface - sha256: "992f0fdc46d0a3c0ac2e5859f2de0e577bbe51f78a77ee8f357cbe626a2ad32d" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" @@ -881,7 +781,6 @@ packages: dependency: transitive description: name: shared_preferences_web - sha256: "0dc2633f215a3d4aa3184c9b2c5766f4711e4e5a6b256e62aafee41f89f1bfb8" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.6" @@ -889,7 +788,6 @@ packages: dependency: transitive description: name: shared_preferences_windows - sha256: "71bcd669bb9cdb6b39f22c4a7728b6d49e934f6cba73157ffa5a54f1eed67436" url: "https://pub.flutter-io.cn" source: hosted version: "2.1.5" @@ -897,7 +795,6 @@ packages: dependency: "direct main" description: name: sharesdk_plugin - sha256: a1a18d01f362c119df1931082e3694591a24b3b00eef2576522e00ef8da3b25e url: "https://pub.flutter-io.cn" source: hosted version: "1.3.10" @@ -905,7 +802,6 @@ packages: dependency: "direct main" description: name: shimmer - sha256: "5f88c883a22e9f9f299e5ba0e4f7e6054857224976a5d9f839d4ebdc94a14ac9" url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0" @@ -913,7 +809,6 @@ packages: dependency: transitive description: name: simple_gesture_detector - sha256: "7ab8ee2027f4323a1574e9eeda55d4279ae499190e119d6b872b3a52b501eb42" url: "https://pub.flutter-io.cn" source: hosted version: "0.1.6" @@ -926,23 +821,20 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 url: "https://pub.flutter-io.cn" source: hosted - version: "1.9.1" + version: "1.8.2" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 url: "https://pub.flutter-io.cn" source: hosted - version: "1.11.0" + version: "1.10.0" steel_crypt: dependency: "direct main" description: name: steel_crypt - sha256: "4f86a8ddc690ed1adff486faeb4ceece9e09f59cd90c8bd7e2ff48c42ca271dd" url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0+1" @@ -950,23 +842,20 @@ packages: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" + version: "1.1.0" syncfusion_flutter_core: dependency: transitive description: name: syncfusion_flutter_core - sha256: "9be1bb9bbdb42823439a18da71484f1964c14dbe1c255ab1b931932b12fa96e8" url: "https://pub.flutter-io.cn" source: hosted version: "19.4.56" @@ -974,7 +863,6 @@ packages: dependency: "direct main" description: name: syncfusion_flutter_datepicker - sha256: ff428c4e2ebd753c2f8f3b2aa60e96e014c9ca2653ce7007c7a603e560973f34 url: "https://pub.flutter-io.cn" source: hosted version: "19.4.56" @@ -982,7 +870,6 @@ packages: dependency: "direct main" description: name: table_calendar - sha256: "82dc932c6e07af6e7eeafb2c91e87969746f3b9b59ac222ecf8d75f51c3a4844" url: "https://pub.flutter-io.cn" source: hosted version: "2.3.3" @@ -990,23 +877,20 @@ packages: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.1" + version: "1.2.0" test_api: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.16" + version: "0.4.9" thumbnails: dependency: "direct main" description: name: thumbnails - sha256: "06b3f727362b3c08a222800e881258dd5d5d42775ad07b64efb60e583dd6de8d" url: "https://pub.flutter-io.cn" source: hosted version: "1.0.1" @@ -1014,7 +898,6 @@ packages: dependency: "direct main" description: name: tobias - sha256: "61b35145cdebde36da7a54d211d807a3cb1681c50456d40495fa7109dddd7a44" url: "https://pub.flutter-io.cn" source: hosted version: "2.4.1" @@ -1031,7 +914,6 @@ packages: dependency: transitive description: name: transformer_page_view - sha256: "2210531bc4148831061c575070173f32693415be8bbbf5bd2159a38f2adff61c" url: "https://pub.flutter-io.cn" source: hosted version: "0.1.6" @@ -1039,7 +921,6 @@ packages: dependency: transitive description: name: tuple - sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" @@ -1047,7 +928,6 @@ packages: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.flutter-io.cn" source: hosted version: "1.3.2" @@ -1055,7 +935,6 @@ packages: dependency: "direct main" description: name: umeng_common_sdk - sha256: fce28065224b0839ffc16b5003d2295dae8aabee290bf639f978536b32ed601d url: "https://pub.flutter-io.cn" source: hosted version: "1.2.6" @@ -1063,7 +942,6 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: e1e0c46fcd777c0f0bd7f4541b747c28ad4e925f93344cebf667ef76c695533a url: "https://pub.flutter-io.cn" source: hosted version: "5.7.10" @@ -1071,7 +949,6 @@ packages: dependency: transitive description: name: url_launcher_linux - sha256: c489023cdd864a19c0be63bb3796bec21ea4bc16bfe09568953f1828e02151c9 url: "https://pub.flutter-io.cn" source: hosted version: "0.0.1+4" @@ -1079,7 +956,6 @@ packages: dependency: transitive description: name: url_launcher_macos - sha256: be04eac5076414469027ce068c360478c3e56e43205bb7efaaa61cbdd3ba890d url: "https://pub.flutter-io.cn" source: hosted version: "0.0.1+9" @@ -1087,7 +963,6 @@ packages: dependency: transitive description: name: url_launcher_platform_interface - sha256: c6bd00f46e8c348703d0ae691850eb2052be8e1338dc3ae6f72af53b962da157 url: "https://pub.flutter-io.cn" source: hosted version: "1.0.9" @@ -1095,7 +970,6 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: eaa6de8ac353681794533edcedd69dd8b39ed987bf2360d172185eff8283dbc2 url: "https://pub.flutter-io.cn" source: hosted version: "0.1.5+3" @@ -1103,7 +977,6 @@ packages: dependency: transitive description: name: url_launcher_windows - sha256: "034479b1dafd8f01de81267d8117eb5ae019e0dddcc23f4b14ed31253a2635d9" url: "https://pub.flutter-io.cn" source: hosted version: "0.0.1+3" @@ -1111,15 +984,13 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.4" + version: "2.1.2" video_player: dependency: "direct main" description: name: video_player - sha256: "743b57d45251101344057d3b886a5f9a4fbb3eb3e275ac8bb64c3a7fa0c79d4c" url: "https://pub.flutter-io.cn" source: hosted version: "2.2.19" @@ -1127,7 +998,6 @@ packages: dependency: transitive description: name: video_player_android - sha256: b41889c6bc9eaf51790863885349fb5ff8edef2da940291a2da96b80dd649686 url: "https://pub.flutter-io.cn" source: hosted version: "2.3.4" @@ -1135,7 +1005,6 @@ packages: dependency: transitive description: name: video_player_avfoundation - sha256: "5df5411ff9d316f1dcbfee284e9838aa686e314f2a722b15c02cb7ce40ef9446" url: "https://pub.flutter-io.cn" source: hosted version: "2.3.9" @@ -1143,7 +1012,6 @@ packages: dependency: transitive description: name: video_player_platform_interface - sha256: a1d56477752271a7a0de872d8962bce1dd5fecf463beaf66da417ebebb9ba0f7 url: "https://pub.flutter-io.cn" source: hosted version: "4.2.0" @@ -1151,7 +1019,6 @@ packages: dependency: transitive description: name: video_player_web - sha256: fb3bbeaf0302cb0c31340ebd6075487939aa1fe3b379d1a8784ef852b679940e url: "https://pub.flutter-io.cn" source: hosted version: "2.0.15" @@ -1159,7 +1026,6 @@ packages: dependency: "direct main" description: name: visibility_detector - sha256: "15c54a459ec2c17b4705450483f3d5a2858e733aee893dcee9d75fd04814940d" url: "https://pub.flutter-io.cn" source: hosted version: "0.3.3" @@ -1167,7 +1033,6 @@ packages: dependency: transitive description: name: wakelock - sha256: "769ecf42eb2d07128407b50cb93d7c10bd2ee48f0276ef0119db1d25cc2f87db" url: "https://pub.flutter-io.cn" source: hosted version: "0.6.2" @@ -1175,7 +1040,6 @@ packages: dependency: transitive description: name: wakelock_macos - sha256: "047c6be2f88cb6b76d02553bca5a3a3b95323b15d30867eca53a19a0a319d4cd" url: "https://pub.flutter-io.cn" source: hosted version: "0.4.0" @@ -1183,7 +1047,6 @@ packages: dependency: transitive description: name: wakelock_platform_interface - sha256: "1f4aeb81fb592b863da83d2d0f7b8196067451e4df91046c26b54a403f9de621" url: "https://pub.flutter-io.cn" source: hosted version: "0.3.0" @@ -1191,7 +1054,6 @@ packages: dependency: transitive description: name: wakelock_web - sha256: "1b256b811ee3f0834888efddfe03da8d18d0819317f20f6193e2922b41a501b5" url: "https://pub.flutter-io.cn" source: hosted version: "0.4.0" @@ -1199,7 +1061,6 @@ packages: dependency: transitive description: name: wakelock_windows - sha256: "857f77b3fe6ae82dd045455baa626bc4b93cb9bb6c86bf3f27c182167c3a5567" url: "https://pub.flutter-io.cn" source: hosted version: "0.2.1" @@ -1207,7 +1068,6 @@ packages: dependency: transitive description: name: webview_flutter - sha256: "15900bc32e210fc5a87b08e65473c45ff4fa0ed707f05a84ea2547aaf1d2cfc7" url: "https://pub.flutter-io.cn" source: hosted version: "2.0.14" @@ -1215,7 +1075,6 @@ packages: dependency: "direct main" description: name: widgetpicker - sha256: "1ab0ef91a279d0dfbbddc6d2b0c2624ea02b8ab7030d51d27d97dad2a1233a15" url: "https://pub.flutter-io.cn" source: hosted version: "0.1.1" @@ -1223,7 +1082,6 @@ packages: dependency: transitive description: name: win32 - sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4 url: "https://pub.flutter-io.cn" source: hosted version: "3.1.4" @@ -1231,7 +1089,6 @@ packages: dependency: transitive description: name: xdg_directories - sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" @@ -1239,10 +1096,9 @@ packages: dependency: transitive description: name: xml - sha256: "80d494c09849dc3f899d227a78c30c5b949b985ededf884cb3f3bcd39f4b447a" url: "https://pub.flutter-io.cn" source: hosted version: "5.4.1" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=2.17.0 <3.0.0" flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index d199fc36..1a77c6ee 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -51,7 +51,8 @@ dependencies: rxdart: ^0.26.0 retrofit: ^1.3.4+1 json_annotation: ^3.1.1 - logger: ^1.0.0 + logger: ^2.0.2+1 + dio_log: ^1.3.5 pin_input_text_field: ^4.1.2 android_intent_plus: ^1.0.2