Browse Source

修改bug

null_safety
fmk 4 years ago
parent
commit
61900a8b41
  1. 12
      ios/Runner.xcodeproj/project.pbxproj
  2. 26
      lib/login/login_page.dart
  3. 6
      lib/main.dart
  4. 80
      lib/retrofit/data/activity.dart
  5. 44
      lib/retrofit/data/activity.g.dart
  6. 50
      lib/retrofit/data/address.dart
  7. 40
      lib/retrofit/data/address.g.dart
  8. 32
      lib/retrofit/data/banner.dart
  9. 38
      lib/retrofit/data/banner.g.dart
  10. 29
      lib/retrofit/data/base_data.dart
  11. 30
      lib/retrofit/data/base_data.g.dart
  12. 31
      lib/retrofit/data/brand_data.dart
  13. 33
      lib/retrofit/data/brand_data.g.dart
  14. 98
      lib/retrofit/data/coupon.dart
  15. 64
      lib/retrofit/data/coupon.g.dart
  16. 69
      lib/retrofit/data/coupon_vo.dart
  17. 67
      lib/retrofit/data/coupon_vo.g.dart
  18. 22
      lib/retrofit/data/data_type.dart
  19. 18
      lib/retrofit/data/data_type.g.dart
  20. 24
      lib/retrofit/data/delivery_info.dart
  21. 30
      lib/retrofit/data/delivery_info.g.dart
  22. 55
      lib/retrofit/data/exchange_order.dart
  23. 45
      lib/retrofit/data/exchange_order.g.dart
  24. 73
      lib/retrofit/data/exchange_order_goods.dart
  25. 53
      lib/retrofit/data/exchange_order_goods.g.dart
  26. 128
      lib/union/union_page.dart

12
ios/Runner.xcodeproj/project.pbxproj

@ -706,7 +706,7 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -739,7 +739,7 @@
"$(inherited)",
"$(PROJECT_DIR)/UniMPSDK/Libs",
);
MARKETING_VERSION = 1.0.3;
MARKETING_VERSION = 1.0.4;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",
@ -903,7 +903,7 @@
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -936,7 +936,7 @@
"$(inherited)",
"$(PROJECT_DIR)/UniMPSDK/Libs",
);
MARKETING_VERSION = 1.0.3;
MARKETING_VERSION = 1.0.4;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@ -995,7 +995,7 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -1028,7 +1028,7 @@
"$(inherited)",
"$(PROJECT_DIR)/UniMPSDK/Libs",
);
MARKETING_VERSION = 1.0.3;
MARKETING_VERSION = 1.0.4;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",

26
lib/login/login_page.dart

@ -468,7 +468,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
),
Container(
height: MediaQuery.of(context).size.height * 0.78,
margin: EdgeInsets.only(top: 56),
margin: EdgeInsets.only(top: 56.h),
alignment: Alignment.topCenter,
child: AspectRatio(
aspectRatio: 1.1,
@ -489,8 +489,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
children: [
Image.asset(
"assets/image/icon_login_logo.png",
width: 91,
height: 91,
width: 91.w,
height: 91.h,
),
SizedBox(
height: 0.596.sh,
@ -538,7 +538,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
top: MediaQuery.of(context).size.height * 0.1039,
bottom: 0,
child: Container(
padding: EdgeInsets.symmetric(horizontal: 40),
padding: EdgeInsets.symmetric(horizontal: 40.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -548,7 +548,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
child: Text(
"Hello,",
style: TextStyle(
fontSize: 23,
fontSize: 23.sp,
color: Color(0xFF32A060),
),
),
@ -559,15 +559,15 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
Opacity(
opacity: (255 - changeAlpha) / 255,
child: Text(
"欢迎来到一心回乡",
S.of(context).login_splash,
style: TextStyle(
fontSize: 18,
fontSize: 18.sp,
color: Color(0xFF32A060),
),
),
),
SizedBox(
height: 20,
height: 20.h,
),
Expanded(
child: inputWidgets(),
@ -596,7 +596,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
borderRadius: BorderRadius.circular(2),
),
child: Text(
"登录",
S.of(context).login,
style: TextStyle(fontSize: 18.sp, color: Colors.white),
),
),
@ -623,7 +623,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
),
),
),
bottom: 33,
bottom: 33.h,
left: 0,
right: 0,
)
@ -801,10 +801,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
borderWidth: 1.w,
radius: 2,
padding: EdgeInsets.only(
left: 6.sp,
right: 6.sp,
top: 6.sp,
bottom: 6.sp,
left: 6.w,
right: 6.w,
),
fontSize: 10.sp,
textColor: _sendCodeStatus == 0 ? Color(0xFF32A060) : Color(0xFFFF7A1A),

6
lib/main.dart

@ -52,7 +52,11 @@ void main() {
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Colors.transparent));
}
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
// DeviceOrientation.portraitDown
]);
runApp(MyApp());
}

80
lib/retrofit/data/activity.dart

@ -1,13 +1,8 @@
import 'package:json_annotation/json_annotation.dart';
part 'activity.g.dart';
@JsonSerializable()
class Activity {
Activity();
String id;
String createTime;
dynamic createUser;
@ -24,8 +19,77 @@ class Activity {
int isDelete;
String storeName;
factory Activity.fromJson(Map<String, dynamic> json) =>
_$ActivityFromJson(json);
Map<String, dynamic> toJson() => _$ActivityToJson(this);
factory Activity.fromJson(Map<String, dynamic> json) => Activity()
..id = json['id']
..createTime = json['createTime']
..createUser = json['createUser']
..updateTime = json['updateTime']
..updateUser = json['updateUser']
..storeId = json['storeId']
..mainTitle = json['mainTitle']
..viceTitle = json['viceTitle']
..content = json['content']
..coverImg = json['coverImg']
..startTime = json['startTime']
..endTime = json['endTime']
..state = json['state']
..isDelete = json['isDelete']
..storeName = json['storeName'];
Map<String, dynamic> toJson() => {
'id': this.id,
'createTime': this.createTime,
'createUser': this.createUser,
'updateTime': this.updateTime,
'updateUser': this.updateUser,
'storeId': this.storeId,
'mainTitle': this.mainTitle,
'viceTitle': this.viceTitle,
'content': this.content,
'coverImg': this.coverImg,
'startTime': this.startTime,
'endTime': this.endTime,
'state': this.state,
'isDelete': this.isDelete,
'storeName': this.storeName,
};
// Activity _$ActivityFromJson(Map<String, dynamic> json) {
// return Activity()
// ..id = json['id'] as String
// ..createTime = json['createTime'] as String
// ..createUser = json['createUser']
// ..updateTime = json['updateTime'] as String
// ..updateUser = json['updateUser']
// ..storeId = json['storeId'] as String
// ..mainTitle = json['mainTitle'] as String
// ..viceTitle = json['viceTitle'] as String
// ..content = json['content'] as String
// ..coverImg = json['coverImg'] as String
// ..startTime = json['startTime'] as String
// ..endTime = json['endTime'] as String
// ..state = json['state'] as int
// ..isDelete = json['isDelete'] as int
// ..storeName = json['storeName'] as String;
// }
// Map<String, dynamic> _$ActivityToJson(Activity instance) => <String, dynamic>{
// 'id': instance.id,
// 'createTime': instance.createTime,
// 'createUser': instance.createUser,
// 'updateTime': instance.updateTime,
// 'updateUser': instance.updateUser,
// 'storeId': instance.storeId,
// 'mainTitle': instance.mainTitle,
// 'viceTitle': instance.viceTitle,
// 'content': instance.content,
// 'coverImg': instance.coverImg,
// 'startTime': instance.startTime,
// 'endTime': instance.endTime,
// 'state': instance.state,
// 'isDelete': instance.isDelete,
// 'storeName': instance.storeName,
// };
}

44
lib/retrofit/data/activity.g.dart

@ -1,44 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'activity.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
Activity _$ActivityFromJson(Map<String, dynamic> json) {
return Activity()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser']
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser']
..storeId = json['storeId'] as String
..mainTitle = json['mainTitle'] as String
..viceTitle = json['viceTitle'] as String
..content = json['content'] as String
..coverImg = json['coverImg'] as String
..startTime = json['startTime'] as String
..endTime = json['endTime'] as String
..state = json['state'] as int
..isDelete = json['isDelete'] as int
..storeName = json['storeName'] as String;
}
Map<String, dynamic> _$ActivityToJson(Activity instance) => <String, dynamic>{
'id': instance.id,
'createTime': instance.createTime,
'createUser': instance.createUser,
'updateTime': instance.updateTime,
'updateUser': instance.updateUser,
'storeId': instance.storeId,
'mainTitle': instance.mainTitle,
'viceTitle': instance.viceTitle,
'content': instance.content,
'coverImg': instance.coverImg,
'startTime': instance.startTime,
'endTime': instance.endTime,
'state': instance.state,
'isDelete': instance.isDelete,
'storeName': instance.storeName,
};

50
lib/retrofit/data/address.dart

@ -1,22 +1,5 @@
import 'package:json_annotation/json_annotation.dart';
/// address : ""
/// area : ""
/// city : ""
/// cityInfo : ""
/// id : 0
/// isDefault : true
/// latitude : 0
/// longitude : 0
/// mid : 0
/// phone : ""
/// province : ""
/// tag : ""
/// username : ""
part 'address.g.dart';
@JsonSerializable()
class Address {
Address();
@ -34,7 +17,34 @@ class Address {
String tag;
String username;
factory Address.fromJson(Map<String, dynamic> json) =>
_$AddressFromJson(json);
Map<String, dynamic> toJson() => _$AddressToJson(this);
factory Address.fromJson(Map<String, dynamic> json) => Address()
..address = json['address'] as String
..area = json['area'] as String
..city = json['city'] as String
..cityInfo = json['cityInfo'] as String
..id = json['id'] as String
..isDefault = json['isDefault'] as bool
..latitude = json['latitude'] as String
..longitude = json['longitude'] as String
..mid = json['mid'] as String
..phone = json['phone'] as String
..province = json['province'] as String
..tag = json['tag'] as String
..username = json['username'] as String;
Map<String, dynamic> toJson() => {
'address': this.address,
'area': this.area,
'city': this.city,
'cityInfo': this.cityInfo,
'id': this.id,
'isDefault': this.isDefault,
'latitude': this.latitude,
'longitude': this.longitude,
'mid': this.mid,
'phone': this.phone,
'province': this.province,
'tag': this.tag,
'username': this.username,
};
}

40
lib/retrofit/data/address.g.dart

@ -1,40 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'address.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
Address _$AddressFromJson(Map<String, dynamic> json) {
return Address()
..address = json['address'] as String
..area = json['area'] as String
..city = json['city'] as String
..cityInfo = json['cityInfo'] as String
..id = json['id'] as String
..isDefault = json['isDefault'] as bool
..latitude = json['latitude'] as String
..longitude = json['longitude'] as String
..mid = json['mid'] as String
..phone = json['phone'] as String
..province = json['province'] as String
..tag = json['tag'] as String
..username = json['username'] as String;
}
Map<String, dynamic> _$AddressToJson(Address instance) => <String, dynamic>{
'address': instance.address,
'area': instance.area,
'city': instance.city,
'cityInfo': instance.cityInfo,
'id': instance.id,
'isDefault': instance.isDefault,
'latitude': instance.latitude,
'longitude': instance.longitude,
'mid': instance.mid,
'phone': instance.phone,
'province': instance.province,
'tag': instance.tag,
'username': instance.username,
};

32
lib/retrofit/data/banner.dart

@ -1,8 +1,4 @@
import 'package:json_annotation/json_annotation.dart';
part 'banner.g.dart';
@JsonSerializable()
class BannerData {
String content;
String createTime;
@ -18,8 +14,32 @@ class BannerData {
BannerData({this.content, this.createTime, this.createUser, this.id, this.imgUrl, this.isDelete, this.storeId, this.tenantCode, this.type, this.updateTime, this.updateUser});
factory BannerData.fromJson(Map<String, dynamic> json) => _$BannerDataFromJson(json);
factory BannerData.fromJson(Map<String, dynamic> json) => BannerData(
content: json['content'] as String,
createTime: json['createTime'] as String,
createUser: json['createUser'] as String,
id: json['id'] as String,
imgUrl: json['imgUrl'] as String,
isDelete: json['isDelete'] as bool,
storeId: json['storeId'] as String,
tenantCode: json['tenantCode'] as String,
type: json['type'] as String,
updateTime: json['updateTime'] as String,
updateUser: json['updateUser'] as String,
);
Map<String, dynamic> toJson() => _$BannerDataToJson(this);
Map<String, dynamic> toJson() => <String, dynamic>{
'content': this.content,
'createTime': this.createTime,
'createUser': this.createUser,
'id': this.id,
'imgUrl': this.imgUrl,
'isDelete': this.isDelete,
'storeId': this.storeId,
'tenantCode': this.tenantCode,
'type': this.type,
'updateTime': this.updateTime,
'updateUser': this.updateUser,
};
}

38
lib/retrofit/data/banner.g.dart

@ -1,38 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'banner.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
BannerData _$BannerDataFromJson(Map<String, dynamic> json) {
return BannerData(
content: json['content'] as String,
createTime: json['createTime'] as String,
createUser: json['createUser'] as String,
id: json['id'] as String,
imgUrl: json['imgUrl'] as String,
isDelete: json['isDelete'] as bool,
storeId: json['storeId'] as String,
tenantCode: json['tenantCode'] as String,
type: json['type'] as String,
updateTime: json['updateTime'] as String,
updateUser: json['updateUser'] as String,
);
}
Map<String, dynamic> _$BannerDataToJson(BannerData instance) =>
<String, dynamic>{
'content': instance.content,
'createTime': instance.createTime,
'createUser': instance.createUser,
'id': instance.id,
'imgUrl': instance.imgUrl,
'isDelete': instance.isDelete,
'storeId': instance.storeId,
'tenantCode': instance.tenantCode,
'type': instance.type,
'updateTime': instance.updateTime,
'updateUser': instance.updateUser,
};

29
lib/retrofit/data/base_data.dart

@ -1,9 +1,3 @@
import 'package:json_annotation/json_annotation.dart';
part 'base_data.g.dart';
@JsonSerializable()
class BaseData {
BaseData();
@ -16,7 +10,24 @@ class BaseData {
String path;
String timestamp;
factory BaseData.fromJson(Map<String, dynamic> json) =>
_$BaseDataFromJson(json);
Map<String, dynamic> toJson() => _$BaseDataToJson(this);
factory BaseData.fromJson(Map<String, dynamic> json) => BaseData()
..code = json['code'] as int
..data = json['data']
..extra = json['extra']
..isError = json['isError'] as bool
..isSuccess = json['isSuccess'] as bool
..msg = json['msg'] as String
..path = json['path'] as String
..timestamp = json['timestamp'] as String;
Map<String, dynamic> toJson() => <String, dynamic>{
'code': this.code,
'data': this.data,
'extra': this.extra,
'isError': this.isError,
'isSuccess': this.isSuccess,
'msg': this.msg,
'path': this.path,
'timestamp': this.timestamp,
};
}

30
lib/retrofit/data/base_data.g.dart

@ -1,30 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'base_data.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
BaseData _$BaseDataFromJson(Map<String, dynamic> json) {
return BaseData()
..code = json['code'] as int
..data = json['data']
..extra = json['extra']
..isError = json['isError'] as bool
..isSuccess = json['isSuccess'] as bool
..msg = json['msg'] as String
..path = json['path'] as String
..timestamp = json['timestamp'] as String;
}
Map<String, dynamic> _$BaseDataToJson(BaseData instance) => <String, dynamic>{
'code': instance.code,
'data': instance.data,
'extra': instance.extra,
'isError': instance.isError,
'isSuccess': instance.isSuccess,
'msg': instance.msg,
'path': instance.path,
'timestamp': instance.timestamp,
};

31
lib/retrofit/data/brand_data.dart

@ -1,13 +1,6 @@
import 'package:huixiang/retrofit/data/banner.dart';
import 'package:json_annotation/json_annotation.dart';
part 'brand_data.g.dart';
@JsonSerializable()
class BrandData {
BrandData();
@ -23,9 +16,27 @@ class BrandData {
dynamic ideals;
factory BrandData.fromJson(Map<String, dynamic> json) =>
_$BrandDataFromJson(json);
Map<String, dynamic> toJson() => _$BrandDataToJson(this);
factory BrandData.fromJson(Map<String, dynamic> json) => BrandData()
..bannerList = (json['bannerList'] as List)?.map((e) =>
e == null ? null : BannerData.fromJson(e as Map<String, dynamic>))?.toList()
..company = json['company'] as String
..companyDesc = json['companyDesc'] as String
..originAvatar = json['originAvatar'] as String
..originDesc = json['originDesc'] as String
..originator = json['originator'] as String
..contents = json['contents']
..ideals = json['ideals'];
Map<String, dynamic> toJson() => <String, dynamic>{
'bannerList': this.bannerList.map((e) => e.toJson()).toList(),
'company': this.company,
'companyDesc': this.companyDesc,
'originAvatar': this.originAvatar,
'originDesc': this.originDesc,
'originator': this.originator,
'contents': this.contents,
'ideals': this.ideals,
};
}

33
lib/retrofit/data/brand_data.g.dart

@ -1,33 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'brand_data.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
BrandData _$BrandDataFromJson(Map<String, dynamic> json) {
return BrandData()
..bannerList = (json['bannerList'] as List)
?.map((e) =>
e == null ? null : BannerData.fromJson(e as Map<String, dynamic>))
?.toList()
..company = json['company'] as String
..companyDesc = json['companyDesc'] as String
..originAvatar = json['originAvatar'] as String
..originDesc = json['originDesc'] as String
..originator = json['originator'] as String
..contents = json['contents']
..ideals = json['ideals'];
}
Map<String, dynamic> _$BrandDataToJson(BrandData instance) => <String, dynamic>{
'bannerList': instance.bannerList,
'company': instance.company,
'companyDesc': instance.companyDesc,
'originAvatar': instance.originAvatar,
'originDesc': instance.originDesc,
'originator': instance.originator,
'contents': instance.contents,
'ideals': instance.ideals,
};

98
lib/retrofit/data/coupon.dart

@ -1,45 +1,6 @@
import 'package:json_annotation/json_annotation.dart';
/// bizId : ""
/// bizType : 0
/// centreDisplay : true
/// createTime : ""
/// createUser : 0
/// discountAmount : 0
/// discountPercent : 0
/// fullAmount : 0
/// id : 0
/// isDelete : 0
/// memberCouponId : 0
/// promotionId : 0
/// publishEndTime : ""
/// publishStartTime : ""
/// receiveTime : ""
/// received : true
/// tenantCode : ""
/// updateTime : ""
/// updateUser : 0
/// useEndTime : ""
/// useStartTime : ""
/// useTime : ""
part 'coupon.g.dart';
///{"id":"1409793980522037248","createTime":"2021-06-29 16:40:52",
///"createUser":"1","updateTime":"2021-06-29 16:40:52","updateUser":"1",
///"bizType":5,"fullAmount":"0.00","discountAmount":"0.00","discountPercent":100,
///"bizId":"1409793980488482816","publishStartTime":"2021-06-29 16:39:14",
///"publishEndTime":"2021-06-29 16:39:14","useStartTime":"2021-06-29 16:39:14",
///"useEndTime":"2021-06-29 16:39:14","promotionId":"0","centreDisplay":false,
///"tenantCode":"admin","isDelete":0,"couponName":null,
///"memberCouponId":"1409806872449384448","receiveTime":"2021-06-29 17:32:06",
///"useTime":null,"status":1}
@JsonSerializable()
class Coupon {
Coupon();
String id;
String createTime;
String createUser;
@ -66,9 +27,58 @@ class Coupon {
dynamic useTime;
int status;
factory Coupon.fromJson(Map<String, dynamic> json) => Coupon()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser'] as String
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser'] as String
..bizType = json['bizType'] as int
..fullAmount = json['fullAmount'] as String
..discountAmount = json['discountAmount'] as String
..discountPercent = json['discountPercent'] as int
..bizId = json['bizId'] as String
..publishStartTime = json['publishStartTime'] as String
..publishEndTime = json['publishEndTime'] as String
..useStartTime = json['useStartTime'] as String
..useEndTime = json['useEndTime'] as String
..promotionId = json['promotionId'] as String
..centreDisplay = json['centreDisplay'] as bool
..tenantCode = json['tenantCode'] as String
..isDelete = json['isDelete'] as int
..couponName = json['couponName'] as String
..couponImg = json['couponImg'] as String
..couponDescription = json['couponDescription'] as String
..memberCouponId = json['memberCouponId'] as String
..receiveTime = json['receiveTime'] as String
..useTime = json['useTime']
..status = json['status'] as int;
factory Coupon.fromJson(Map<String, dynamic> json) =>
_$CouponFromJson(json);
Map<String, dynamic> toJson() => _$CouponToJson(this);
}
Map<String, dynamic> toJson() => <String, dynamic>{
'id': this.id,
'createTime': this.createTime,
'createUser': this.createUser,
'updateTime': this.updateTime,
'updateUser': this.updateUser,
'bizType': this.bizType,
'fullAmount': this.fullAmount,
'discountAmount': this.discountAmount,
'discountPercent': this.discountPercent,
'bizId': this.bizId,
'publishStartTime': this.publishStartTime,
'publishEndTime': this.publishEndTime,
'useStartTime': this.useStartTime,
'useEndTime': this.useEndTime,
'promotionId': this.promotionId,
'centreDisplay': this.centreDisplay,
'tenantCode': this.tenantCode,
'isDelete': this.isDelete,
'couponName': this.couponName,
'couponImg': this.couponImg,
'couponDescription': this.couponDescription,
'memberCouponId': this.memberCouponId,
'receiveTime': this.receiveTime,
'useTime': this.useTime,
'status': this.status,
};
}

64
lib/retrofit/data/coupon.g.dart

@ -1,64 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'coupon.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
Coupon _$CouponFromJson(Map<String, dynamic> json) {
return Coupon()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser'] as String
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser'] as String
..bizType = json['bizType'] as int
..fullAmount = json['fullAmount'] as String
..discountAmount = json['discountAmount'] as String
..discountPercent = json['discountPercent'] as int
..bizId = json['bizId'] as String
..publishStartTime = json['publishStartTime'] as String
..publishEndTime = json['publishEndTime'] as String
..useStartTime = json['useStartTime'] as String
..useEndTime = json['useEndTime'] as String
..promotionId = json['promotionId'] as String
..centreDisplay = json['centreDisplay'] as bool
..tenantCode = json['tenantCode'] as String
..isDelete = json['isDelete'] as int
..couponName = json['couponName'] as String
..couponImg = json['couponImg'] as String
..couponDescription = json['couponDescription'] as String
..memberCouponId = json['memberCouponId'] as String
..receiveTime = json['receiveTime'] as String
..useTime = json['useTime']
..status = json['status'] as int;
}
Map<String, dynamic> _$CouponToJson(Coupon instance) => <String, dynamic>{
'id': instance.id,
'createTime': instance.createTime,
'createUser': instance.createUser,
'updateTime': instance.updateTime,
'updateUser': instance.updateUser,
'bizType': instance.bizType,
'fullAmount': instance.fullAmount,
'discountAmount': instance.discountAmount,
'discountPercent': instance.discountPercent,
'bizId': instance.bizId,
'publishStartTime': instance.publishStartTime,
'publishEndTime': instance.publishEndTime,
'useStartTime': instance.useStartTime,
'useEndTime': instance.useEndTime,
'promotionId': instance.promotionId,
'centreDisplay': instance.centreDisplay,
'tenantCode': instance.tenantCode,
'isDelete': instance.isDelete,
'couponName': instance.couponName,
'couponImg': instance.couponImg,
'couponDescription': instance.couponDescription,
'memberCouponId': instance.memberCouponId,
'receiveTime': instance.receiveTime,
'useTime': instance.useTime,
'status': instance.status,
};

69
lib/retrofit/data/coupon_vo.dart

@ -1,8 +1,4 @@
import 'package:json_annotation/json_annotation.dart';
part 'coupon_vo.g.dart';
@JsonSerializable()
class CouponVo {
String bizId;
num bizType;
@ -33,15 +29,62 @@ class CouponVo {
CouponVo({this.bizId, this.bizType, this.centreDisplay, this.couponDescription, this.couponImg, this.couponName, this.createTime, this.createUser, this.discountAmount, this.discountPercent, this.fullAmount, this.id, this.isDelete, this.memberCouponId, this.promotionId, this.publishEndTime, this.publishStartTime, this.receiveTime, this.received, this.status, this.tenantCode, this.updateTime, this.updateUser, this.useEndTime, this.useStartTime, this.useTime});
//{"id":"1407301814381969408","createTime":"2021-06-22 19:37:54","createUser":"1336877238389309440",
// "updateTime":"2021-06-22 19:37:54","updateUser":"1336877238389309440","bizType":3,"fullAmo
//unt":"0.00","discountAmount":"0.00","discountPercent":100,"bizId":"","publishStartTime":"2021-06-08 12:00:00",
// "publishEndTime":"2021-07-30 12:00:00","useStartTime":"2021-06-09 12:00:00","useEndTime":"2021-06-26 12:00:00",
// "promotionId":"1407301660300017664","centreDisplay":true,"tenantCode":"1174","isDelete":0,"couponName":"兑换券",
// "couponImg":"https://pos.upload.gznl.top/1174/2021/06/0e80c809-4ea5-449d-a8b3-2c7b7e6dc9a7.jpg",
// "couponDescription":"11","memberCouponId":null,"receiveTime":null,"useTime":null,"status":0}
factory CouponVo.fromJson(Map<String, dynamic> json) => _$CouponVoFromJson(json);
factory CouponVo.fromJson(Map<String, dynamic> json) => CouponVo(
bizId: json['bizId'] as String,
bizType: json['bizType'] as num,
centreDisplay: json['centreDisplay'] as bool,
couponDescription: json['couponDescription'] as String,
couponImg: json['couponImg'] as String,
couponName: json['couponName'] as String,
createTime: json['createTime'] as String,
createUser: json['createUser'] as String,
discountAmount: json['discountAmount'] as String,
discountPercent: json['discountPercent'] as num,
fullAmount: json['fullAmount'] as String,
id: json['id'] as String,
isDelete: json['isDelete'] as num,
memberCouponId: json['memberCouponId'] as num,
promotionId: json['promotionId'] as String,
publishEndTime: json['publishEndTime'] as String,
publishStartTime: json['publishStartTime'] as String,
receiveTime: json['receiveTime'] as String,
received: json['received'] as bool,
status: json['status'] as num,
tenantCode: json['tenantCode'] as String,
updateTime: json['updateTime'] as String,
updateUser: json['updateUser'] as String,
useEndTime: json['useEndTime'] as String,
useStartTime: json['useStartTime'] as String,
useTime: json['useTime'] as String,
);
Map<String, dynamic> toJson() => _$CouponVoToJson(this);
Map<String, dynamic> toJson() => <String, dynamic>{
'bizId': this.bizId,
'bizType': this.bizType,
'centreDisplay': this.centreDisplay,
'couponDescription': this.couponDescription,
'couponImg': this.couponImg,
'couponName': this.couponName,
'createTime': this.createTime,
'createUser': this.createUser,
'discountAmount': this.discountAmount,
'discountPercent': this.discountPercent,
'fullAmount': this.fullAmount,
'id': this.id,
'isDelete': this.isDelete,
'memberCouponId': this.memberCouponId,
'promotionId': this.promotionId,
'publishEndTime': this.publishEndTime,
'publishStartTime': this.publishStartTime,
'receiveTime': this.receiveTime,
'received': this.received,
'status': this.status,
'tenantCode': this.tenantCode,
'updateTime': this.updateTime,
'updateUser': this.updateUser,
'useEndTime': this.useEndTime,
'useStartTime': this.useStartTime,
'useTime': this.useTime,
};
}

67
lib/retrofit/data/coupon_vo.g.dart

@ -1,67 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'coupon_vo.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
CouponVo _$CouponVoFromJson(Map<String, dynamic> json) {
return CouponVo(
bizId: json['bizId'] as String,
bizType: json['bizType'] as num,
centreDisplay: json['centreDisplay'] as bool,
couponDescription: json['couponDescription'] as String,
couponImg: json['couponImg'] as String,
couponName: json['couponName'] as String,
createTime: json['createTime'] as String,
createUser: json['createUser'] as String,
discountAmount: json['discountAmount'] as String,
discountPercent: json['discountPercent'] as num,
fullAmount: json['fullAmount'] as String,
id: json['id'] as String,
isDelete: json['isDelete'] as num,
memberCouponId: json['memberCouponId'] as num,
promotionId: json['promotionId'] as String,
publishEndTime: json['publishEndTime'] as String,
publishStartTime: json['publishStartTime'] as String,
receiveTime: json['receiveTime'] as String,
received: json['received'] as bool,
status: json['status'] as num,
tenantCode: json['tenantCode'] as String,
updateTime: json['updateTime'] as String,
updateUser: json['updateUser'] as String,
useEndTime: json['useEndTime'] as String,
useStartTime: json['useStartTime'] as String,
useTime: json['useTime'] as String,
);
}
Map<String, dynamic> _$CouponVoToJson(CouponVo instance) => <String, dynamic>{
'bizId': instance.bizId,
'bizType': instance.bizType,
'centreDisplay': instance.centreDisplay,
'couponDescription': instance.couponDescription,
'couponImg': instance.couponImg,
'couponName': instance.couponName,
'createTime': instance.createTime,
'createUser': instance.createUser,
'discountAmount': instance.discountAmount,
'discountPercent': instance.discountPercent,
'fullAmount': instance.fullAmount,
'id': instance.id,
'isDelete': instance.isDelete,
'memberCouponId': instance.memberCouponId,
'promotionId': instance.promotionId,
'publishEndTime': instance.publishEndTime,
'publishStartTime': instance.publishStartTime,
'receiveTime': instance.receiveTime,
'received': instance.received,
'status': instance.status,
'tenantCode': instance.tenantCode,
'updateTime': instance.updateTime,
'updateUser': instance.updateUser,
'useEndTime': instance.useEndTime,
'useStartTime': instance.useStartTime,
'useTime': instance.useTime,
};

22
lib/retrofit/data/data_type.dart

@ -1,16 +1,16 @@
import 'package:json_annotation/json_annotation.dart';
/// desc : "其他"
/// code : "OTHER"
part 'data_type.g.dart';
@JsonSerializable()
class DataType {
DataType();
String desc;
String code;
factory DataType.fromJson(Map<String, dynamic> json) =>
_$DataTypeFromJson(json);
Map<String, dynamic> toJson() => _$DataTypeToJson(this);
}
factory DataType.fromJson(Map<String, dynamic> json) => DataType()
..desc = json['desc'] as String
..code = json['code'] as String;
Map<String, dynamic> toJson() => <String, dynamic>{
'desc': this.desc,
'code': this.code,
};
}

18
lib/retrofit/data/data_type.g.dart

@ -1,18 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'data_type.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
DataType _$DataTypeFromJson(Map<String, dynamic> json) {
return DataType()
..desc = json['desc'] as String
..code = json['code'] as String;
}
Map<String, dynamic> _$DataTypeToJson(DataType instance) => <String, dynamic>{
'desc': instance.desc,
'code': instance.code,
};

24
lib/retrofit/data/delivery_info.dart

@ -1,8 +1,4 @@
import 'package:json_annotation/json_annotation.dart';
part 'delivery_info.g.dart';
@JsonSerializable()
class DeliveryInfo {
bool dadaRegStatus;
String dadaSourceId;
@ -14,8 +10,24 @@ class DeliveryInfo {
DeliveryInfo({this.dadaRegStatus, this.dadaSourceId, this.dadaStatus, this.dianwodaRegStatus, this.dianwodaStatus, this.meituanRegStatus, this.meituanStatus});
factory DeliveryInfo.fromJson(Map<String, dynamic> json) => _$DeliveryInfoFromJson(json);
factory DeliveryInfo.fromJson(Map<String, dynamic> json) => DeliveryInfo(
dadaRegStatus: json['dadaRegStatus'] as bool,
dadaSourceId: json['dadaSourceId'] as String,
dadaStatus: json['dadaStatus'] as bool,
dianwodaRegStatus: json['dianwodaRegStatus'] as bool,
dianwodaStatus: json['dianwodaStatus'] as bool,
meituanRegStatus: json['meituanRegStatus'] as bool,
meituanStatus: json['meituanStatus'] as bool,
);
Map<String, dynamic> toJson() => _$DeliveryInfoToJson(this);
Map<String, dynamic> toJson() => <String, dynamic>{
'dadaRegStatus': this.dadaRegStatus,
'dadaSourceId': this.dadaSourceId,
'dadaStatus': this.dadaStatus,
'dianwodaRegStatus': this.dianwodaRegStatus,
'dianwodaStatus': this.dianwodaStatus,
'meituanRegStatus': this.meituanRegStatus,
'meituanStatus': this.meituanStatus,
};
}

30
lib/retrofit/data/delivery_info.g.dart

@ -1,30 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'delivery_info.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
DeliveryInfo _$DeliveryInfoFromJson(Map<String, dynamic> json) {
return DeliveryInfo(
dadaRegStatus: json['dadaRegStatus'] as bool,
dadaSourceId: json['dadaSourceId'] as String,
dadaStatus: json['dadaStatus'] as bool,
dianwodaRegStatus: json['dianwodaRegStatus'] as bool,
dianwodaStatus: json['dianwodaStatus'] as bool,
meituanRegStatus: json['meituanRegStatus'] as bool,
meituanStatus: json['meituanStatus'] as bool,
);
}
Map<String, dynamic> _$DeliveryInfoToJson(DeliveryInfo instance) =>
<String, dynamic>{
'dadaRegStatus': instance.dadaRegStatus,
'dadaSourceId': instance.dadaSourceId,
'dadaStatus': instance.dadaStatus,
'dianwodaRegStatus': instance.dianwodaRegStatus,
'dianwodaStatus': instance.dianwodaStatus,
'meituanRegStatus': instance.meituanRegStatus,
'meituanStatus': instance.meituanStatus,
};

55
lib/retrofit/data/exchange_order.dart

@ -1,25 +1,8 @@
import 'package:huixiang/retrofit/data/exchange_order_goods.dart';
import 'package:json_annotation/json_annotation.dart';
/// id : "1408693824171016192"
/// createTime : "2021-06-26 15:49:15"
/// createUser : "1405494095400402944"
/// updateTime : "2021-06-26 15:49:15"
/// updateUser : "1405494095400402944"
/// storeId : "1174"
/// mid : "1405494095400402944"
/// orderCode : "JF202106261549141"
/// amount : "77"
/// state : 1
/// useTyped : 1
/// isDelete : 0
/// creditOrderDetailList : [{"id":"1408693824410091520","createTime":"2021-06-26 15:49:15","createUser":"1405494095400402944","updateTime":"2021-06-26 15:49:15","updateUser":"1405494095400402944","orderId":"1408693824171016192","goodsId":"1","categoryId":"1","name":"包包包1111","description":"包治百病","worth":"999.00","price":"77","couponId":"0","canPick":true,"canDelivery":false,"goodsMainImg":"https://pos.upload.gznl.top/0000/2020/10/e59fecd9-4533-463b-bef3-59f02b74e58f.jpg","goodsViceImg":"https://pos.upload.gznl.top/0000/2020/10/9c7beb43-9758-44d3-9cde-e09f979faeab.jpg","goodsNumber":1,"isDelete":0}]
part 'exchange_order.g.dart';
@JsonSerializable()
class ExchangeOrder {
ExchangeOrder();
String id;
String createTime;
String createUser;
@ -34,8 +17,38 @@ class ExchangeOrder {
int isDelete;
List<ExchangeOrderGoods> creditOrderDetailList;
factory ExchangeOrder.fromJson(Map<String, dynamic> json) =>
_$ExchangeOrderFromJson(json);
Map<String, dynamic> toJson() => _$ExchangeOrderToJson(this);
factory ExchangeOrder.fromJson(Map<String, dynamic> json) => ExchangeOrder()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser'] as String
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser'] as String
..storeId = json['storeId'] as String
..mid = json['mid'] as String
..orderCode = json['orderCode'] as String
..amount = json['amount'] as String
..state = json['state'] as int
..useTyped = json['useTyped'] as int
..isDelete = json['isDelete'] as int
..creditOrderDetailList = (json['creditOrderDetailList'] as List)
?.map((e) => e == null
? null
: ExchangeOrderGoods.fromJson(e as Map<String, dynamic>))
?.toList();
Map<String, dynamic> toJson() => <String, dynamic>{
'id': this.id,
'createTime': this.createTime,
'createUser': this.createUser,
'updateTime': this.updateTime,
'updateUser': this.updateUser,
'storeId': this.storeId,
'mid': this.mid,
'orderCode': this.orderCode,
'amount': this.amount,
'state': this.state,
'useTyped': this.useTyped,
'isDelete': this.isDelete,
'creditOrderDetailList': this.creditOrderDetailList.map((e) => e.toJson()).toList(),
};
}

45
lib/retrofit/data/exchange_order.g.dart

@ -1,45 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'exchange_order.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
ExchangeOrder _$ExchangeOrderFromJson(Map<String, dynamic> json) {
return ExchangeOrder()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser'] as String
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser'] as String
..storeId = json['storeId'] as String
..mid = json['mid'] as String
..orderCode = json['orderCode'] as String
..amount = json['amount'] as String
..state = json['state'] as int
..useTyped = json['useTyped'] as int
..isDelete = json['isDelete'] as int
..creditOrderDetailList = (json['creditOrderDetailList'] as List)
?.map((e) => e == null
? null
: ExchangeOrderGoods.fromJson(e as Map<String, dynamic>))
?.toList();
}
Map<String, dynamic> _$ExchangeOrderToJson(ExchangeOrder instance) =>
<String, dynamic>{
'id': instance.id,
'createTime': instance.createTime,
'createUser': instance.createUser,
'updateTime': instance.updateTime,
'updateUser': instance.updateUser,
'storeId': instance.storeId,
'mid': instance.mid,
'orderCode': instance.orderCode,
'amount': instance.amount,
'state': instance.state,
'useTyped': instance.useTyped,
'isDelete': instance.isDelete,
'creditOrderDetailList': instance.creditOrderDetailList,
};

73
lib/retrofit/data/exchange_order_goods.dart

@ -1,31 +1,7 @@
import 'package:json_annotation/json_annotation.dart';
/// id : "1408693824410091520"
/// createTime : "2021-06-26 15:49:15"
/// createUser : "1405494095400402944"
/// updateTime : "2021-06-26 15:49:15"
/// updateUser : "1405494095400402944"
/// orderId : "1408693824171016192"
/// goodsId : "1"
/// categoryId : "1"
/// name : "包包包1111"
/// description : "包治百病"
/// worth : "999.00"
/// price : "77"
/// couponId : "0"
/// canPick : true
/// canDelivery : false
/// goodsMainImg : "https://pos.upload.gznl.top/0000/2020/10/e59fecd9-4533-463b-bef3-59f02b74e58f.jpg"
/// goodsViceImg : "https://pos.upload.gznl.top/0000/2020/10/9c7beb43-9758-44d3-9cde-e09f979faeab.jpg"
/// goodsNumber : 1
/// isDelete : 0
part 'exchange_order_goods.g.dart';
@JsonSerializable()
class ExchangeOrderGoods {
ExchangeOrderGoods();
String id;
String createTime;
String createUser;
@ -46,10 +22,47 @@ class ExchangeOrderGoods {
int goodsNumber;
int isDelete;
factory ExchangeOrderGoods.fromJson(Map<String, dynamic> json) =>
_$ExchangeOrderGoodsFromJson(json);
Map<String, dynamic> toJson() => _$ExchangeOrderGoodsToJson(this);
ExchangeOrderGoods()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser'] as String
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser'] as String
..orderId = json['orderId'] as String
..goodsId = json['goodsId'] as String
..categoryId = json['categoryId'] as String
..name = json['name'] as String
..description = json['description'] as String
..worth = json['worth'] as String
..price = json['price'] as String
..couponId = json['couponId'] as String
..canPick = json['canPick'] as bool
..canDelivery = json['canDelivery'] as bool
..goodsMainImg = json['goodsMainImg'] as String
..goodsViceImg = json['goodsViceImg'] as String
..goodsNumber = json['goodsNumber'] as int
..isDelete = json['isDelete'] as int;
}
Map<String, dynamic> toJson() => <String, dynamic>{
'id': this.id,
'createTime': this.createTime,
'createUser': this.createUser,
'updateTime': this.updateTime,
'updateUser': this.updateUser,
'orderId': this.orderId,
'goodsId': this.goodsId,
'categoryId': this.categoryId,
'name': this.name,
'description': this.description,
'worth': this.worth,
'price': this.price,
'couponId': this.couponId,
'canPick': this.canPick,
'canDelivery': this.canDelivery,
'goodsMainImg': this.goodsMainImg,
'goodsViceImg': this.goodsViceImg,
'goodsNumber': this.goodsNumber,
'isDelete': this.isDelete,
};
}

53
lib/retrofit/data/exchange_order_goods.g.dart

@ -1,53 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'exchange_order_goods.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
ExchangeOrderGoods _$ExchangeOrderGoodsFromJson(Map<String, dynamic> json) {
return ExchangeOrderGoods()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser'] as String
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser'] as String
..orderId = json['orderId'] as String
..goodsId = json['goodsId'] as String
..categoryId = json['categoryId'] as String
..name = json['name'] as String
..description = json['description'] as String
..worth = json['worth'] as String
..price = json['price'] as String
..couponId = json['couponId'] as String
..canPick = json['canPick'] as bool
..canDelivery = json['canDelivery'] as bool
..goodsMainImg = json['goodsMainImg'] as String
..goodsViceImg = json['goodsViceImg'] as String
..goodsNumber = json['goodsNumber'] as int
..isDelete = json['isDelete'] as int;
}
Map<String, dynamic> _$ExchangeOrderGoodsToJson(ExchangeOrderGoods instance) =>
<String, dynamic>{
'id': instance.id,
'createTime': instance.createTime,
'createUser': instance.createUser,
'updateTime': instance.updateTime,
'updateUser': instance.updateUser,
'orderId': instance.orderId,
'goodsId': instance.goodsId,
'categoryId': instance.categoryId,
'name': instance.name,
'description': instance.description,
'worth': instance.worth,
'price': instance.price,
'couponId': instance.couponId,
'canPick': instance.canPick,
'canDelivery': instance.canDelivery,
'goodsMainImg': instance.goodsMainImg,
'goodsViceImg': instance.goodsViceImg,
'goodsNumber': instance.goodsNumber,
'isDelete': instance.isDelete,
};

128
lib/union/union_page.dart

@ -257,55 +257,74 @@ class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin {
child: Scaffold(
resizeToAvoidBottomInset: true,
body: NestedScrollView(
physics: BouncingScrollPhysics(),
physics: PageScrollPhysics(),
headerSliverBuilder: (context, inner) {
return [
buildSliverAppBar(AMapWidget(
initialCameraPosition: CameraPosition(
target: LatLng(30.553111, 114.342366),
zoom: 12.0,
),
onMapCreated: onMapCreated,
apiKey: aMapApiKeys,
touchPoiEnabled: true,
markers: markers.toSet(),
scrollGesturesEnabled: true,
customStyleOptions: _customStyleOptions,
onPoiTouched: (poiTouch) {
FocusScope.of(context).requestFocus(FocusNode());
},
gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>[
Factory<OneSequenceGestureRecognizer>(
() => EagerGestureRecognizer()),
].toSet(),
)),
SliverOverlapAbsorber(
sliver: buildSliverAppBar(AMapWidget(
initialCameraPosition: CameraPosition(
target: LatLng(30.553111, 114.342366),
zoom: 12.0,
),
onMapCreated: onMapCreated,
apiKey: aMapApiKeys,
touchPoiEnabled: true,
markers: markers.toSet(),
scrollGesturesEnabled: true,
customStyleOptions: _customStyleOptions,
onPoiTouched: (poiTouch) {
FocusScope.of(context).requestFocus(FocusNode());
},
gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>[
Factory<OneSequenceGestureRecognizer>(
() => EagerGestureRecognizer()),
].toSet(),
)),
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
)
];
},
body: Container(
child: SmartRefresher(
controller: refreshController,
enablePullUp: false,
enablePullDown: true,
physics: BouncingScrollPhysics(),
header: MyHeader(),
onRefresh: () {
startLocation();
},
child: ListView.builder(
itemCount: storeList == null ? 0 : storeList.length,
padding: EdgeInsets.only(top: 8.h, bottom: 84.h),
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
Navigator.of(context).pushNamed(
'/router/union_detail_page',
arguments: {"id": storeList[position].id});
},
child: buildStoreItem(storeList[position], position),
);
}),
),
),
body: Builder(
builder: (context) {
return CustomScrollView(
physics: NeverScrollableScrollPhysics(),
slivers: [
SliverOverlapInjector(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
),
SliverToBoxAdapter(
child: Container(
height: MediaQuery.of(context).size.height - 102.h - MediaQuery.of(context).padding.top,
child: SmartRefresher(
controller: refreshController,
enablePullUp: false,
enablePullDown: true,
physics: BouncingScrollPhysics(),
header: MyHeader(),
onRefresh: () {
startLocation();
},
child: ListView.builder(
itemCount: storeList == null ? 0 : storeList.length,
padding: EdgeInsets.only(top: 8.h, bottom: 84.h + (375.h - 88.h) + 4.h),
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
Navigator.of(context).pushNamed(
'/router/union_detail_page',
arguments: {"id": storeList[position].id});
},
child: buildStoreItem(storeList[position], position),
);
}),
),
),
),
],
);
},
)
),
),
);
@ -319,18 +338,6 @@ class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin {
return;
}
}
// bool isShown = await Permission.location.shouldShowRequestRationale;
// if (isShown) {
// Fluttertoast.showToast(
// msg: "shouldShowRequestRationale",
// toastLength: Toast.LENGTH_SHORT,
// gravity: ToastGravity.CENTER,
// timeInSecForIosWeb: 1,
// backgroundColor: Colors.red,
// textColor: Colors.white,
// fontSize: 16.0.sp,
// );
// }
if (await Permission.location.isPermanentlyDenied) {
requestDialog();
refreshController.refreshCompleted();
@ -397,15 +404,16 @@ class _UnionPage extends State<UnionPage> with AutomaticKeepAliveClientMixin {
Widget buildSliverAppBar(AMapWidget map) {
return SliverAppBar(
//
// floating: true,
// snap: true,
pinned: true,
floating: true,
snap: true,
backgroundColor: Color(0xFFFAFAFA),
elevation: 0,
automaticallyImplyLeading: false,
title: Container(
height: 36.h,
margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h),
margin: EdgeInsets.fromLTRB(16.w,0, 16.w, 0),
padding: EdgeInsets.fromLTRB(13.w, 6.h, 16.w, 6.h),
decoration: BoxDecoration(
color: Colors.white,

Loading…
Cancel
Save