Commit b6eb5736aa7339d446685ce479371cde03bbcc46

Authored by wdn127929
1 parent a4f1ea8a

dart3.0 大升级

Showing 54 changed files with 1148 additions and 1086 deletions

Too many changes to show.

To preserve performance only 54 of 54+ files are displayed.

... ... @@ -46,6 +46,8 @@ apply plugin: 'com.huawei.agconnect'
android {
compileSdkVersion 34
// namespace 'com.naji.one_key'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
... ... @@ -73,7 +75,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.naji.one_key"
minSdkVersion 21
minSdkVersion 24
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
... ... @@ -167,12 +169,12 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'com.tencent.tpns:huawei:1.2.0.3-release'// 华为推送
implementation 'com.tencent.tpns:xiaomi:1.2.0.3-release' // 小米推送
implementation 'com.tencent.tpns:oppo:1.2.0.3-release' // OPPO 推送
implementation 'com.tencent.tpns:vivo:1.2.0.3-release' // vivo 推送
implementation 'com.tencent.tpns:huawei:1.4.4.2-release'// 华为推送
implementation 'com.tencent.tpns:xiaomi:1.4.4.2-release' // 小米推送
implementation 'com.tencent.tpns:oppo:1.4.4.2-release' // OPPO 推送
implementation 'com.tencent.tpns:vivo:1.4.4.2-release' // vivo 推送
implementation 'com.amap.api:location:4.7.0'
implementation 'com.zhihu.android:matisse:0.5.3-beta3'
// implementation 'com.zhihu.android:matisse:0.5.3-beta3'
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
}
... ...
... ... @@ -9,6 +9,11 @@
-keep class com.tencent.bigdata.baseapi.** {*;}
-keep class com.tencent.bigdata.mqttchannel.** {*;}
-keep class com.tencent.tpns.baseapi.** {*;}
#-ignorewarning
-keepattributes *Annotation*
-keepattributes Exceptions
... ...
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.naji.one_key">
package="com.naji.one_key"
>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
... ...
... ... @@ -11,6 +11,7 @@ ext.kotlin_version = '1.8.22'
repositories {
google()
jcenter()
mavenCentral()
maven{
... ... @@ -77,6 +78,6 @@ subprojects {
}
}
task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
... ...
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart' hide Router;
import 'package:get_it/get_it.dart';
... ... @@ -5,14 +7,15 @@ import 'package:shared_preferences/shared_preferences.dart';
import 'route/navigate_service.dart';
class App {
static FluroRouter router;
static late FluroRouter router;
static GlobalKey<NavigatorState> key = GlobalKey();
static SharedPreferences sp;
static double screenWidth;
static double screenHeight;
static double statusBarHeight;
static double bottomBarHeight;
static SharedPreferences? sp;
static double? screenWidth;
static double? screenHeight;
static late double statusBarHeight;
static double? bottomBarHeight;
// static GetIt getIt = GetIt.instance;
static bool isInstallWx = false;
static bool isInstallWWork = false;
... ...
... ... @@ -22,7 +22,9 @@ Map<String, LibraryLoader> _deferredLibraries = {
'en': () => new Future.value(null),
};
MessageLookupByLibrary _findExact(String localeName) {
MessageLookupByLibrary? _findExact(String localeName) {
switch (localeName) {
case 'en':
return messages_en.messages;
... ... @@ -55,7 +57,7 @@ bool _messagesExistFor(String locale) {
}
}
MessageLookupByLibrary _findGeneratedMessagesFor(String locale) {
MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor,
onFailure: (_) => null);
if (actualLocale == null) return null;
... ...
... ... @@ -19,7 +19,7 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args);
class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'en';
final messages = _notInlinedMessages(_notInlinedMessages);
final Map<String, dynamic> messages = _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => <String, Function> {
};
... ...
// GENERATED CODE - DO NOT MODIFY BY HAND
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'intl/messages_all.dart';
... ... @@ -15,7 +18,7 @@ import 'intl/messages_all.dart';
class S {
S();
static S current;
static late S current;
static const AppLocalizationDelegate delegate =
AppLocalizationDelegate();
... ... @@ -31,7 +34,7 @@ class S {
});
}
static S of(BuildContext context) {
static S? of(BuildContext context) {
return Localizations.of<S>(context, S);
}
... ...
import 'dart:async';
import 'dart:io';
import 'package:amap_map_fluttify/amap_map_fluttify.dart';
... ... @@ -69,7 +70,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
// print(results.toString());
// }
Future<void> main() async {
FutureOr<void> main() async {
FlutterBugly.postCatchedException(() async {
WidgetsFlutterBinding.ensureInitialized();
FluroRouter router = FluroRouter();
... ... @@ -234,7 +235,7 @@ class MyAppState extends State<MyApp> {
//第一次打开应用
_isFirst() async {
isFirst = App.sp.getBool("isFirst") ?? true;
isFirst = App.sp!.getBool("isFirst") ?? true;
if (!isFirst) {
await _ontherInit();
... ... @@ -260,7 +261,7 @@ class MyAppState extends State<MyApp> {
_isLogin() {
// UserModel userModel = Provider.of<UserModel>(context, listen: false);
// userModel.initUser();
isLogin = App.sp.getBool("isLogin") ?? false;
isLogin = App.sp!.getBool("isLogin") ?? false;
}
@override
... ... @@ -291,11 +292,12 @@ class MyAppState extends State<MyApp> {
Locale('en', 'US'),
],
theme: ThemeData(
useMaterial3: false,
brightness: Brightness.light,
primaryColor: Colors.white,
splashColor: Colors.transparent,
textTheme: TextTheme(
overline: TextStyle(decoration: TextDecoration.none)),
labelSmall: TextStyle(decoration: TextDecoration.none)),
tooltipTheme: TooltipThemeData(verticalOffset: -100000)),
home: isFirst
? FirstPage()
... ...
import 'package:common_utils/common_utils.dart';
import '../utils/utils.dart';
class GetBanquetByTimeModel {
int ret;
List<GetBanquetByTimeSunModel> data;
String msg;
int? ret;
List<GetBanquetByTimeSunModel>? data;
String? msg;
GetBanquetByTimeModel({this.ret, this.data, this.msg});
... ... @@ -14,7 +15,7 @@ class GetBanquetByTimeModel {
if (json['data'] != null) {
data = <GetBanquetByTimeSunModel>[];
json['data'].forEach((v) {
data.add(new GetBanquetByTimeSunModel.fromJson(v));
data!.add(new GetBanquetByTimeSunModel.fromJson(v));
});
}
msg = json['msg'];
... ... @@ -24,7 +25,7 @@ class GetBanquetByTimeModel {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ret'] = this.ret;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
data['msg'] = this.msg;
return data;
... ... @@ -32,21 +33,21 @@ class GetBanquetByTimeModel {
}
class GetBanquetByTimeSunModel {
String id;
String rname;
String sex;
String phone;
String staffId;
String ddate;
String classifyId;
String className;
String nickName;
String account;
List<SessionByTime> list;
String? id;
String? rname;
String? sex;
String? phone;
String? staffId;
String? ddate;
String? classifyId;
String? className;
String? nickName;
String? account;
List<SessionByTime>? list;
String get ddateStr {
DateTime dateTime =
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000);
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000);
return '${dateTime.month}月${dateTime.day}日';
}
... ... @@ -77,7 +78,7 @@ class GetBanquetByTimeSunModel {
if (json['list'] != null) {
list = <SessionByTime>[];
json['list'].forEach((v) {
list.add(new SessionByTime.fromJson(v));
list!.add(new SessionByTime.fromJson(v));
});
}
}
... ... @@ -95,30 +96,30 @@ class GetBanquetByTimeSunModel {
data['nick_name'] = this.nickName;
data['account'] = this.account;
if (this.list != null) {
data['list'] = this.list.map((v) => v.toJson()).toList();
data['list'] = this.list!.map((v) => v.toJson()).toList();
}
return data;
}
}
class SessionByTime {
String reserveOrder;
String ddateInterval;
String rdate;
String edate;
String tids;
List<String> tableName;
String? reserveOrder;
String? ddateInterval;
String? rdate;
String? edate;
String? tids;
List<String>? tableName;
String get ddateStr {
if (rdate.length > 11) {
if (rdate!.length > 11) {
return '';
}
if (ddateInterval == '0') {
//不带餐
DateTime dateS =
DateTime.fromMillisecondsSinceEpoch(int.parse(rdate) * 1000);
DateTime.fromMillisecondsSinceEpoch(int.parse(rdate!) * 1000);
DateTime dateE =
DateTime.fromMillisecondsSinceEpoch(int.parse(edate) * 1000);
DateTime.fromMillisecondsSinceEpoch(int.parse(edate!) * 1000);
String ymd = DateUtil.formatDate(dateS, format: DateFormats.y_mo_d);
String start = '${Utils.addZeroNumber(dateS.hour)}:${Utils.addZeroNumber(dateS.minute)}';
String end = '${Utils.addZeroNumber(dateE.hour)}:${Utils.addZeroNumber(dateE.minute)}';
... ... @@ -126,7 +127,7 @@ class SessionByTime {
return ymd + ' ' + start + '-' + end;
} else {
DateTime dateS =
DateTime.fromMillisecondsSinceEpoch(int.parse(rdate) * 1000);
DateTime.fromMillisecondsSinceEpoch(int.parse(rdate!) * 1000);
// DateTime dateE =
// DateTime.fromMillisecondsSinceEpoch(int.parse(temp[1]) * 1000);
String ymd = DateUtil.formatDate(dateS, format: DateFormats.y_mo_d);
... ...
import 'dart:convert' as convert;
class GetDzSellerConfModel {
int ret;
GetDzSellerConfSunModel data;
String msg;
int? ret;
GetDzSellerConfSunModel? data;
String? msg;
GetDzSellerConfModel({this.ret, this.data, this.msg});
... ... @@ -19,7 +20,7 @@ class GetDzSellerConfModel {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ret'] = this.ret;
if (this.data != null) {
data['data'] = this.data.toJson();
data['data'] = this.data!.toJson();
}
data['msg'] = this.msg;
return data;
... ... @@ -27,56 +28,56 @@ class GetDzSellerConfModel {
}
class GetDzSellerConfSunModel {
String id;
String sid;
String isSms;
String templateId;
String isOpenOrder;
String isOpenWine;
String dzVersion;
String isCheckedCall;
String isCheckedApp;
String isCheckedLite;
String reserveMode;
String isDisplayDish;
String isNewTemplate;
AllCookStyle cookStyle;
String cdate;
String isStoreSms;
String storeDate;
String isShowPrice;
String isOpenCancel;
String isNotice;
String isMarketing;
String saiyouyun;
Bookinginfo bookinginfo;
String isAllowUpdate;
List<String> isShowRnamePhone;
String isShowNoticeDeposit;
String depositPrice;
String liteStyle;
String liteStyleTitle;
String storePushMeg;
String storePushSms;
String pcNotPhone;
String pcNotName;
String isCustomerCancel;
String isAddOver; //是否允许新建过去订单
String isSetOver; //是否允许修改过去订单
String isReserveOver; //是否允许变更订单到过去餐段
String cancelDay;
String cancelShopowner;
String cancelManager;
String cancelOther;
String? id;
String? sid;
String? isSms;
String? templateId;
String? isOpenOrder;
String? isOpenWine;
String? dzVersion;
String? isCheckedCall;
String? isCheckedApp;
String? isCheckedLite;
String? reserveMode;
String? isDisplayDish;
String? isNewTemplate;
AllCookStyle? cookStyle;
String? cdate;
String? isStoreSms;
String? storeDate;
String? isShowPrice;
String? isOpenCancel;
String? isNotice;
String? isMarketing;
String? saiyouyun;
Bookinginfo? bookinginfo;
String? isAllowUpdate;
List<String>? isShowRnamePhone;
String? isShowNoticeDeposit;
String? depositPrice;
String? liteStyle;
String? liteStyleTitle;
String? storePushMeg;
String? storePushSms;
String? pcNotPhone;
String? pcNotName;
String? isCustomerCancel;
String? isAddOver; //是否允许新建过去订单
String? isSetOver; //是否允许修改过去订单
String? isReserveOver; //是否允许变更订单到过去餐段
String? cancelDay;
String? cancelShopowner;
String? cancelManager;
String? cancelOther;
GetDzSellerConfSunModel(
{this.id,
... ... @@ -156,7 +157,7 @@ class GetDzSellerConfSunModel {
if (json['is_show_ranme_phone'] != null &&
json['is_show_ranme_phone'] != '') {
convert.json.decode(json['is_show_ranme_phone']).forEach((v) {
isShowRnamePhone.add(v);
isShowRnamePhone!.add(v);
});
}
isShowNoticeDeposit = json['is_show_notice_deposit'];
... ... @@ -204,7 +205,7 @@ class GetDzSellerConfSunModel {
data['is_seller_marketing'] = this.isMarketing;
data['saiyouyun'] = this.saiyouyun;
if (this.bookinginfo != null) {
data['bookinginfo'] = this.bookinginfo.toJson();
data['bookinginfo'] = this.bookinginfo!.toJson();
}
data['is_allow_update'] = this.isAllowUpdate;
data['is_show_ranme_phone'] = this.isShowRnamePhone;
... ... @@ -232,9 +233,9 @@ class GetDzSellerConfSunModel {
}
class InputSetting {
String uid;
String isShowName;
String isShowPhone;
String? uid;
String? isShowName;
String? isShowPhone;
InputSetting({this.uid, this.isShowName, this.isShowPhone});
... ... @@ -254,10 +255,10 @@ class InputSetting {
}
class Bookinginfo {
String id;
String sid;
String smsCode;
String content;
String? id;
String? sid;
String? smsCode;
String? content;
Bookinginfo({this.id, this.sid, this.smsCode, this.content});
... ... @@ -279,8 +280,8 @@ class Bookinginfo {
}
class AllCookStyle {
String menuThemeColor;
String index;
String? menuThemeColor;
String? index;
AllCookStyle({
this.menuThemeColor,
... ...
import 'dart:convert';
import 'package:common_utils/common_utils.dart';
import 'package:one_key/models/coupon_model.dart';
class IsExamineModel {
int ret;
List<IsExamineSunModel> data;
String msg;
int? ret;
List<IsExamineSunModel>? data;
String? msg;
IsExamineModel({this.ret, this.data, this.msg});
... ... @@ -15,7 +16,7 @@ class IsExamineModel {
if (json['data'] != null) {
data = [];
json['data'].forEach((v) {
data.add(new IsExamineSunModel.fromJson(v));
data!.add(new IsExamineSunModel.fromJson(v));
});
}
msg = json['msg'];
... ... @@ -25,7 +26,7 @@ class IsExamineModel {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ret'] = this.ret;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
data['msg'] = this.msg;
return data;
... ... @@ -33,35 +34,35 @@ class IsExamineModel {
}
class IsExamineSunModel {
String id;
String status;
String rechargeId;
String rechargeName;
String price;
String sellerid;
String sellername;
String openid;
String orderNo;
String combineOutTradeNo;
String outTradeNo;
String? id;
String? status;
String? rechargeId;
String? rechargeName;
String? price;
String? sellerid;
String? sellername;
String? openid;
String? orderNo;
String? combineOutTradeNo;
String? outTradeNo;
dynamic outRefundNo;
ExpDate expDate;
String stime;
String etime;
String transactionId;
ExpDate? expDate;
String? stime;
String? etime;
String? transactionId;
dynamic refundId;
dynamic reOutTradeNo;
String tradeState;
String? tradeState;
dynamic tradeStateDesc;
String qrcode;
String isExamine;
String? qrcode;
String? isExamine;
dynamic examineName;
dynamic examineTime;
String isComment;
String type;
String cdate;
String desc;
String explain;
String? isComment;
String? type;
String? cdate;
String? desc;
String? explain;
String get examineTimeStr {
if (examineTime == null) {
... ...
import 'package:json_annotation/json_annotation.dart';
part 'add_forward_model.g.dart';
... ... @@ -5,13 +6,13 @@ part 'add_forward_model.g.dart';
@JsonSerializable()
class AddForwardModel extends Object {
@JsonKey(name: 'ret')
int ret;
int? ret;
@JsonKey(name: 'data')
AddForwardSunModel data;
AddForwardSunModel? data;
@JsonKey(name: 'msg')
String msg;
String? msg;
AddForwardModel(
this.ret,
... ... @@ -28,19 +29,19 @@ class AddForwardModel extends Object {
@JsonSerializable()
class AddForwardSunModel extends Object {
@JsonKey(name: 'uid')
int uid;
int? uid;
@JsonKey(name: 'rid')
int rid;
int? rid;
@JsonKey(name: 'sid')
int sid;
int? sid;
@JsonKey(name: 'cdate')
int cdate;
int? cdate;
@JsonKey(name: 'id')
String id;
String? id;
AddForwardSunModel(
this.uid,
... ...
... ... @@ -8,11 +8,11 @@ part of 'add_forward_model.dart';
AddForwardModel _$AddForwardModelFromJson(Map<String, dynamic> json) {
return AddForwardModel(
json['ret'] as int,
json['ret'] as int?,
json['data'] == null
? null
: AddForwardSunModel.fromJson(json['data'] as Map<String, dynamic>),
json['msg'] as String,
json['msg'] as String?,
);
}
... ... @@ -25,11 +25,11 @@ Map<String, dynamic> _$AddForwardModelToJson(AddForwardModel instance) =>
AddForwardSunModel _$AddForwardSunModelFromJson(Map<String, dynamic> json) {
return AddForwardSunModel(
json['uid'] as int,
json['rid'] as int,
json['sid'] as int,
json['cdate'] as int,
json['id'] as String,
json['uid'] as int?,
json['rid'] as int?,
json['sid'] as int?,
json['cdate'] as int?,
json['id'] as String?,
);
}
... ...
import 'package:flutter/material.dart';
import 'package:one_key/models/upload_img_model.dart';
class AdditionModel {
String content;
String type; // 1图片 2文本
String? content;
String? type; // 1图片 2文本
// int order; //顺序
UploadImgModel image;
late UploadImgModel image;
TextEditingController infoC = TextEditingController();
AdditionModel();
... ...
class AllCuisineModel {
int ret;
List<AllCuisineSunModel> data;
String msg;
int? ret;
List<AllCuisineSunModel>? data;
String? msg;
AllCuisineModel({this.ret, this.data, this.msg});
AllCuisineModel.fromJson(Map<String, dynamic> json) {
ret = json['ret'];
if (json['data'] != null) {
data = new List<AllCuisineSunModel>();
data = [];
json['data'].forEach((v) {
data.add(new AllCuisineSunModel.fromJson(v));
data!.add(new AllCuisineSunModel.fromJson(v));
});
}
msg = json['msg'];
... ... @@ -20,7 +22,7 @@ class AllCuisineModel {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ret'] = this.ret;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
data['msg'] = this.msg;
return data;
... ... @@ -28,10 +30,10 @@ class AllCuisineModel {
}
class AllCuisineSunModel {
String id;
String name;
String icon;
String weight;
String? id;
String? name;
String? icon;
String? weight;
bool select = false;
AllCuisineSunModel({this.id, this.name, this.icon, this.weight});
... ...
///桌位区域
class Area {
String name;
int count;
String rid;
String orderId;
String? name;
int? count;
String? rid;
String? orderId;
Area();
... ...
import 'package:json_annotation/json_annotation.dart';
part 'area_model.g.dart';
... ... @@ -7,13 +8,13 @@ part 'area_model.g.dart';
class AreaModel extends Object {
@JsonKey(name: 'ret')
int ret;
int? ret;
@JsonKey(name: 'data')
List<AreaSunModel> data;
List<AreaSunModel?>? data;
@JsonKey(name: 'msg')
String msg;
String? msg;
AreaModel(this.ret,this.data,this.msg,);
... ... @@ -28,22 +29,22 @@ part 'area_model.g.dart';
class AreaSunModel extends Object {
@JsonKey(name: 'id')
String id;
String? id;
@JsonKey(name: 'sellerid')
String sellerid;
String? sellerid;
@JsonKey(name: 'name')
String name;
String? name;
@JsonKey(name: 'order_o')
String orderO;
String? orderO;
@JsonKey(name: 'status')
String status;
String? status;
@JsonKey(name: 'cdate')
String cdate;
String? cdate;
AreaSunModel(this.id,this.sellerid,this.name,this.orderO,this.status,this.cdate,);
... ...
... ... @@ -8,12 +8,12 @@ part of 'area_model.dart';
AreaModel _$AreaModelFromJson(Map<String, dynamic> json) {
return AreaModel(
json['ret'] as int,
(json['data'][0] as List)
json['ret'] as int?,
(json['data'][0] as List?)
?.map((e) =>
e == null ? null : AreaSunModel.fromJson(e as Map<String, dynamic>))
?.toList(),
json['msg'] as String,
.toList(),
json['msg'] as String?,
);
}
... ... @@ -25,12 +25,12 @@ Map<String, dynamic> _$AreaModelToJson(AreaModel instance) => <String, dynamic>{
AreaSunModel _$AreaSunModelFromJson(Map<String, dynamic> json) {
return AreaSunModel(
json['id'] as String,
json['sellerid'] as String,
json['name'] as String,
json['order_o'] as String,
json['status'] as String,
json['cdate'] as String,
json['id'] as String?,
json['sellerid'] as String?,
json['name'] as String?,
json['order_o'] as String?,
json['status'] as String?,
json['cdate'] as String?,
);
}
... ...
import 'package:json_annotation/json_annotation.dart';
part 'base_info_model.g.dart';
... ... @@ -5,13 +6,13 @@ part 'base_info_model.g.dart';
@JsonSerializable()
class BaseInfoModel extends Object {
@JsonKey(name: 'ret')
int ret;
int? ret;
@JsonKey(name: 'data')
BaseInfoSunModel data;
BaseInfoSunModel? data;
@JsonKey(name: 'msg')
String msg;
String? msg;
BaseInfoModel(
this.ret,
... ... @@ -28,31 +29,31 @@ class BaseInfoModel extends Object {
@JsonSerializable()
class BaseInfoSunModel extends Object {
@JsonKey(name: 'id')
String id;
String? id;
@JsonKey(name: 'sellerid')
String sellerid;
String? sellerid;
@JsonKey(name: 'uid')
String uid;
String? uid;
@JsonKey(name: 'photo')
String photo;
String? photo;
@JsonKey(name: 'name')
String name;
String? name;
@JsonKey(name: 'phone')
String phone;
String? phone;
@JsonKey(name: 'position')
String position;
String? position;
@JsonKey(name: 'qrcode')
String qrcode;
String? qrcode;
@JsonKey(name: 'wechat')
String wechat;
String? wechat;
BaseInfoSunModel(
this.id,
... ...
... ... @@ -8,11 +8,11 @@ part of 'base_info_model.dart';
BaseInfoModel _$BaseInfoModelFromJson(Map<String, dynamic> json) {
return BaseInfoModel(
json['ret'] as int,
json['ret'] as int?,
json['data'] == null
? null
: BaseInfoSunModel.fromJson(json['data'] as Map<String, dynamic>),
json['msg'] as String);
json['msg'] as String?);
}
Map<String, dynamic> _$BaseInfoModelToJson(BaseInfoModel instance) =>
... ... @@ -24,15 +24,15 @@ Map<String, dynamic> _$BaseInfoModelToJson(BaseInfoModel instance) =>
BaseInfoSunModel _$BaseInfoSunModelFromJson(Map<String, dynamic> json) {
return BaseInfoSunModel(
json['id'] as String,
json['sellerid'] as String,
json['uid'] as String,
json['photo'] as String,
json['name'] as String,
json['phone'] as String,
json['position'] as String,
json['qrcode'] as String,
json['wechat'] as String,
json['id'] as String?,
json['sellerid'] as String?,
json['uid'] as String?,
json['photo'] as String?,
json['name'] as String?,
json['phone'] as String?,
json['position'] as String?,
json['qrcode'] as String?,
json['wechat'] as String?,
);
}
... ...
import 'package:common_utils/common_utils.dart';
class BookDepositModel {
int ret;
List<BookDepositSunModel> data;
String msg;
int? ret;
List<BookDepositSunModel>? data;
String? msg;
BookDepositModel({this.ret, this.data, this.msg});
... ... @@ -12,7 +13,7 @@ class BookDepositModel {
if (json['data'] != null) {
data = <BookDepositSunModel>[];
json['data'].forEach((v) {
data.add(new BookDepositSunModel.fromJson(v));
data!.add(new BookDepositSunModel.fromJson(v));
});
}
msg = json['msg'];
... ... @@ -22,7 +23,7 @@ class BookDepositModel {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ret'] = this.ret;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
data['msg'] = this.msg;
return data;
... ... @@ -30,17 +31,17 @@ class BookDepositModel {
}
class BookDepositSunModel {
String id;
String sid;
String rid;
String price;
String rname;
String collectionUid;
String rtime;
String pay;
String depositId;
String no;
String nickName;
String? id;
String? sid;
String? rid;
String? price;
String? rname;
String? collectionUid;
String? rtime;
String? pay;
String? depositId;
String? no;
String? nickName;
// String dname;
String get ddateStr {
... ...
import 'package:json_annotation/json_annotation.dart';
part 'check_seller_acc_model.g.dart';
... ... @@ -5,13 +6,13 @@ part 'check_seller_acc_model.g.dart';
@JsonSerializable()
class CheckSellerAccModel extends Object {
@JsonKey(name: 'ret')
int ret;
int? ret;
@JsonKey(name: 'data')
List<CheckSellerAccSunModel> data;
List<CheckSellerAccSunModel?>? data;
@JsonKey(name: 'msg')
String msg;
String? msg;
CheckSellerAccModel(
this.ret,
... ... @@ -28,169 +29,169 @@ class CheckSellerAccModel extends Object {
@JsonSerializable()
class CheckSellerAccSunModel extends Object {
@JsonKey(name: 'id')
String id;
String? id;
@JsonKey(name: 'uid')
String uid;
String? uid;
@JsonKey(name: 'seat_openid')
String seatOpenid;
String? seatOpenid;
@JsonKey(name: 'nick_name')
String nickName;
String? nickName;
@JsonKey(name: 'auth_user_id')
String authUserId;
String? authUserId;
@JsonKey(name: 'seller_code')
String sellerCode;
String? sellerCode;
@JsonKey(name: 'account')
String account;
String? account;
@JsonKey(name: 'user_token')
String userToken;
String? userToken;
@JsonKey(name: 'registrationId')
String registrationId;
String? registrationId;
@JsonKey(name: 'connection_id')
String connectionId;
String? connectionId;
@JsonKey(name: 'alias')
String alias;
String? alias;
@JsonKey(name: 'password')
String password;
String? password;
@JsonKey(name: 'sellerid')
String sellerid;
String? sellerid;
@JsonKey(name: 'phone')
String phone;
String? phone;
@JsonKey(name: 'role_id')
String roleId;
String? roleId;
@JsonKey(name: 'role_name')
String roleName;
String? roleName;
@JsonKey(name: 'pid')
String pid;
String? pid;
@JsonKey(name: 'openid')
String openid;
String? openid;
@JsonKey(name: 'sellername')
String sellername;
String? sellername;
@JsonKey(name: 'selleralias')
String selleralias;
String? selleralias;
@JsonKey(name: 'slogan')
String slogan;
String? slogan;
@JsonKey(name: 'sellerdesc')
String sellerdesc;
String? sellerdesc;
@JsonKey(name: 'seller_logo')
String sellerLogo;
String? sellerLogo;
@JsonKey(name: 'seller_image')
String sellerImage;
String? sellerImage;
@JsonKey(name: 'seller_tel')
String sellerTel;
String? sellerTel;
@JsonKey(name: 'map_address')
String mapAddress;
String? mapAddress;
@JsonKey(name: 'long')
String long;
String? long;
@JsonKey(name: 'lat')
String lat;
String? lat;
@JsonKey(name: 'discount_type')
String discountType;
String? discountType;
@JsonKey(name: 'last_num')
String lastNum;
String? lastNum;
@JsonKey(name: 'ispass')
String ispass;
String? ispass;
@JsonKey(name: 'dis_ispass')
String disIspass;
String? disIspass;
@JsonKey(name: 'account_money')
String accountMoney;
String? accountMoney;
@JsonKey(name: 'isopen_dc')
String isopenDc;
String? isopenDc;
@JsonKey(name: 'isopen_md')
String isopenMd;
String? isopenMd;
@JsonKey(name: 'dc_adduser_code')
String dcAdduserCode;
String? dcAdduserCode;
@JsonKey(name: 'average')
String average;
String? average;
@JsonKey(name: 'is_online_reserve')
String isOnlineReserve;
String? isOnlineReserve;
@JsonKey(name: 'is_tele')
String isTele;
String? isTele;
@JsonKey(name: 'daily')
String daily;
String? daily;
@JsonKey(name: 'daily_time')
String dailyTime;
String? dailyTime;
@JsonKey(name: 'scale')
String scale;
String? scale;
@JsonKey(name: 'score')
String score;
String? score;
@JsonKey(name: 'is_belt_wine')
String isBeltWine;
String? isBeltWine;
@JsonKey(name: 'is_auth')
String isAuth;
String? isAuth;
@JsonKey(name: 'is_call_tel')
String isCallTel;
String? isCallTel;
@JsonKey(name: 'rec_stime')
String recStime;
String? recStime;
@JsonKey(name: 'rec_etime')
String recEtime;
String? recEtime;
@JsonKey(name: 'status')
String status;
String? status;
@JsonKey(name: 'is_recom')
String isRecom;
String? isRecom;
@JsonKey(name: 'cdate')
String cdate;
String? cdate;
@JsonKey(name: 'applyment_sub_mchid')
String applymentSubMchid;
String? applymentSubMchid;
@JsonKey(name: 'pro_code')
String proCode;
String? proCode;
@JsonKey(name: 'city_code')
String cityCode;
String? cityCode;
@JsonKey(name: 'dis_code')
String disCode;
String? disCode;
CheckSellerAccSunModel(
this.id,
... ...
... ... @@ -8,13 +8,13 @@ part of 'check_seller_acc_model.dart';
CheckSellerAccModel _$CheckSellerAccModelFromJson(Map<String, dynamic> json) {
return CheckSellerAccModel(
json['ret'] as int,
(json['data'] as List)
json['ret'] as int?,
(json['data'] as List?)
?.map((e) => e == null
? null
: CheckSellerAccSunModel.fromJson(e as Map<String, dynamic>))
?.toList(),
json['msg'] as String);
.toList(),
json['msg'] as String?);
}
Map<String, dynamic> _$CheckSellerAccModelToJson(
... ... @@ -28,61 +28,61 @@ Map<String, dynamic> _$CheckSellerAccModelToJson(
CheckSellerAccSunModel _$CheckSellerAccSunModelFromJson(
Map<String, dynamic> json) {
return CheckSellerAccSunModel(
json['id'] as String,
json['uid'] as String,
json['seat_openid'] as String,
json['nick_name'] as String,
json['auth_user_id'] as String,
json['seller_code'] as String,
json['account'] as String,
json['user_token'] as String,
json['registrationId'] as String,
json['connection_id'] as String,
json['alias'] as String,
json['password'] as String,
json['sellerid'] as String,
json['phone'] as String,
json['role_id'] as String,
json['role_name'] as String,
json['pid'] as String,
json['openid'] as String,
json['sellername'] as String,
json['selleralias'] as String,
json['slogan'] as String,
json['sellerdesc'] as String,
json['seller_logo'] as String,
json['seller_image'] as String,
json['seller_tel'] as String,
json['map_address'] as String,
json['long'] as String,
json['lat'] as String,
json['discount_type'] as String,
json['last_num'] as String,
json['ispass'] as String,
json['dis_ispass'] as String,
json['account_money'] as String,
json['isopen_dc'] as String,
json['isopen_md'] as String,
json['dc_adduser_code'] as String,
json['average'] as String,
json['is_online_reserve'] as String,
json['is_tele'] as String,
json['daily'] as String,
json['daily_time'] as String,
json['scale'] as String,
json['score'] as String,
json['is_belt_wine'] as String,
json['is_auth'] as String,
json['is_call_tel'] as String,
json['rec_stime'] as String,
json['rec_etime'] as String,
json['status'] as String,
json['is_recom'] as String,
json['cdate'] as String,
json['applyment_sub_mchid'] as String,
json['pro_code'] as String,
json['city_code'] as String,
json['dis_code'] as String);
json['id'] as String?,
json['uid'] as String?,
json['seat_openid'] as String?,
json['nick_name'] as String?,
json['auth_user_id'] as String?,
json['seller_code'] as String?,
json['account'] as String?,
json['user_token'] as String?,
json['registrationId'] as String?,
json['connection_id'] as String?,
json['alias'] as String?,
json['password'] as String?,
json['sellerid'] as String?,
json['phone'] as String?,
json['role_id'] as String?,
json['role_name'] as String?,
json['pid'] as String?,
json['openid'] as String?,
json['sellername'] as String?,
json['selleralias'] as String?,
json['slogan'] as String?,
json['sellerdesc'] as String?,
json['seller_logo'] as String?,
json['seller_image'] as String?,
json['seller_tel'] as String?,
json['map_address'] as String?,
json['long'] as String?,
json['lat'] as String?,
json['discount_type'] as String?,
json['last_num'] as String?,
json['ispass'] as String?,
json['dis_ispass'] as String?,
json['account_money'] as String?,
json['isopen_dc'] as String?,
json['isopen_md'] as String?,
json['dc_adduser_code'] as String?,
json['average'] as String?,
json['is_online_reserve'] as String?,
json['is_tele'] as String?,
json['daily'] as String?,
json['daily_time'] as String?,
json['scale'] as String?,
json['score'] as String?,
json['is_belt_wine'] as String?,
json['is_auth'] as String?,
json['is_call_tel'] as String?,
json['rec_stime'] as String?,
json['rec_etime'] as String?,
json['status'] as String?,
json['is_recom'] as String?,
json['cdate'] as String?,
json['applyment_sub_mchid'] as String?,
json['pro_code'] as String?,
json['city_code'] as String?,
json['dis_code'] as String?);
}
Map<String, dynamic> _$CheckSellerAccSunModelToJson(
... ...
import 'package:json_annotation/json_annotation.dart';
part 'checkbind_phone_model.g.dart';
... ... @@ -7,13 +8,13 @@ part 'checkbind_phone_model.g.dart';
class CheckbindPhoneModel extends Object {
@JsonKey(name: 'ret')
int ret;
int? ret;
@JsonKey(name: 'data')
CheckbindPhoneSunModel data;
CheckbindPhoneSunModel? data;
@JsonKey(name: 'msg')
String msg;
String? msg;
CheckbindPhoneModel(this.ret,this.data,this.msg,);
... ... @@ -28,52 +29,52 @@ part 'checkbind_phone_model.g.dart';
class CheckbindPhoneSunModel extends Object {
@JsonKey(name: 'id')
String id;
String? id;
@JsonKey(name: 'nick_name')
String nickName;
String? nickName;
@JsonKey(name: 'role_id')
String roleId;
String? roleId;
@JsonKey(name: 'auth_user_id')
String authUserId;
String? authUserId;
@JsonKey(name: 'seat_openid')
String seatOpenid;
String? seatOpenid;
@JsonKey(name: 'sellerid')
String sellerid;
String? sellerid;
@JsonKey(name: 'seller_code')
String sellerCode;
String? sellerCode;
@JsonKey(name: 'account')
String account;
String? account;
@JsonKey(name: 'phone')
String phone;
String? phone;
@JsonKey(name: 'user_token')
String userToken;
String? userToken;
@JsonKey(name: 'registrationId')
String registrationId;
String? registrationId;
@JsonKey(name: 'connection_id')
String connectionId;
String? connectionId;
@JsonKey(name: 'alias')
String alias;
String? alias;
@JsonKey(name: 'password')
String password;
String? password;
@JsonKey(name: 'is_on_call')
String isOnCall;
String? isOnCall;
@JsonKey(name: 'cdate')
String cdate;
String? cdate;
CheckbindPhoneSunModel(this.id,this.nickName,this.roleId,this.authUserId,this.seatOpenid,this.sellerid,this.sellerCode,this.account,this.phone,this.userToken,this.registrationId,this.connectionId,this.alias,this.password,this.isOnCall,this.cdate,);
... ...
... ... @@ -8,12 +8,12 @@ part of 'checkbind_phone_model.dart';
CheckbindPhoneModel _$CheckbindPhoneModelFromJson(Map<String, dynamic> json) {
return CheckbindPhoneModel(
json['ret'] as int,
json['ret'] as int?,
json['data'] == null
? null
: CheckbindPhoneSunModel.fromJson(
json['data'] as Map<String, dynamic>),
json['msg'] as String);
json['msg'] as String?);
}
Map<String, dynamic> _$CheckbindPhoneModelToJson(
... ... @@ -27,22 +27,22 @@ Map<String, dynamic> _$CheckbindPhoneModelToJson(
CheckbindPhoneSunModel _$CheckbindPhoneSunModelFromJson(
Map<String, dynamic> json) {
return CheckbindPhoneSunModel(
json['id'] as String,
json['nick_name'] as String,
json['role_id'] as String,
json['auth_user_id'] as String,
json['seat_openid'] as String,
json['sellerid'] as String,
json['seller_code'] as String,
json['account'] as String,
json['phone'] as String,
json['user_token'] as String,
json['registrationId'] as String,
json['connection_id'] as String,
json['alias'] as String,
json['password'] as String,
json['is_on_call'] as String,
json['cdate'] as String);
json['id'] as String?,
json['nick_name'] as String?,
json['role_id'] as String?,
json['auth_user_id'] as String?,
json['seat_openid'] as String?,
json['sellerid'] as String?,
json['seller_code'] as String?,
json['account'] as String?,
json['phone'] as String?,
json['user_token'] as String?,
json['registrationId'] as String?,
json['connection_id'] as String?,
json['alias'] as String?,
json['password'] as String?,
json['is_on_call'] as String?,
json['cdate'] as String?);
}
Map<String, dynamic> _$CheckbindPhoneSunModelToJson(
... ...
class ClassifyModel {
int ret;
List<ClassifySunModel> data;
String msg;
int? ret;
List<ClassifySunModel>? data;
String? msg;
ClassifyModel({this.ret, this.data, this.msg});
... ... @@ -10,7 +11,7 @@ class ClassifyModel {
if (json['data'] != null) {
data = <ClassifySunModel>[];
json['data'].forEach((v) {
data.add(new ClassifySunModel.fromJson(v));
data!.add(new ClassifySunModel.fromJson(v));
});
}
msg = json['msg'];
... ... @@ -20,7 +21,7 @@ class ClassifyModel {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ret'] = this.ret;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
data['msg'] = this.msg;
return data;
... ... @@ -28,12 +29,12 @@ class ClassifyModel {
}
class ClassifySunModel {
String id;
String sid;
String className;
String status;
String? id;
String? sid;
String? className;
String? status;
dynamic cdate;
String isDefault;
String? isDefault;
ClassifySunModel(
{this.id,
... ...
class CommentsLabelModel {
int ret;
List<CommentsLabelSunModel> data;
String msg;
int? ret;
List<CommentsLabelSunModel>? data;
String? msg;
CommentsLabelModel({this.ret, this.data, this.msg});
... ... @@ -10,7 +11,7 @@ class CommentsLabelModel {
if (json['data'] != null) {
data = <CommentsLabelSunModel>[];
json['data'].forEach((v) {
data.add(new CommentsLabelSunModel.fromJson(v));
data!.add(new CommentsLabelSunModel.fromJson(v));
});
}
msg = json['msg'];
... ... @@ -20,7 +21,7 @@ class CommentsLabelModel {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ret'] = this.ret;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
data['msg'] = this.msg;
return data;
... ... @@ -28,8 +29,8 @@ class CommentsLabelModel {
}
class CommentsLabelSunModel {
String name;
String total;
String? name;
String? total;
bool select = false;
CommentsLabelSunModel({this.name, this.total});
... ...
import 'dart:convert';
import 'package:common_utils/common_utils.dart';
class CommentsModel {
int ret;
List<CommentsSunModel> data;
String msg;
int? ret;
List<CommentsSunModel>? data;
String? msg;
CommentsModel({this.ret, this.data, this.msg});
... ... @@ -15,7 +16,7 @@ class CommentsModel {
if (json['data'] != null) {
data = <CommentsSunModel>[];
json['data'].forEach((v) {
data.add(new CommentsSunModel.fromJson(v));
data!.add(new CommentsSunModel.fromJson(v));
});
}
msg = json['msg'];
... ... @@ -25,7 +26,7 @@ class CommentsModel {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ret'] = this.ret;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
data['msg'] = this.msg;
return data;
... ... @@ -33,24 +34,24 @@ class CommentsModel {
}
class CommentsSunModel {
String id;
String pid;
String sid;
String rid;
String author;
String authorImage;
String grade;
String status;
String evalLabel;
String text;
String createTime;
List<CommentsImageModel> enclosure;
String isnoshow;
Reply reply;
String ddate;
String ddateSolt;
String tableinfo;
String? id;
String? pid;
String? sid;
String? rid;
String? author;
String? authorImage;
String? grade;
String? status;
String? evalLabel;
String? text;
String? createTime;
List<CommentsImageModel>? enclosure;
String? isnoshow;
Reply? reply;
String? ddate;
String? ddateSolt;
String? tableinfo;
String get createTimeStr {
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(
... ... @@ -94,7 +95,7 @@ class CommentsSunModel {
if (jsonDecode(json['enclosure']) is List) {
List temp = jsonDecode(json['enclosure']);
temp.forEach((element) {
enclosure.add(CommentsImageModel.fromJson(element));
enclosure!.add(CommentsImageModel.fromJson(element));
});
}
}
... ... @@ -123,7 +124,7 @@ class CommentsSunModel {
data['enclosure'] = this.enclosure;
data['isnoshow'] = this.isnoshow;
if (this.reply != null) {
data['reply'] = this.reply.toJson();
data['reply'] = this.reply!.toJson();
}
if (this.enclosure != null) {
data['enclosure'] = jsonEncode(this.enclosure);
... ... @@ -137,18 +138,18 @@ class CommentsSunModel {
}
class Reply {
String id;
String pid;
String sid;
String rid;
String author;
String authorImage;
String grade;
String status;
String evalLabel;
String text;
String createTime;
String enclosure;
String? id;
String? pid;
String? sid;
String? rid;
String? author;
String? authorImage;
String? grade;
String? status;
String? evalLabel;
String? text;
String? createTime;
String? enclosure;
dynamic isnoshow;
Reply(
... ... @@ -202,15 +203,15 @@ class Reply {
}
class CommentsImageModel {
String key;
String bucket;
String mimeType;
String fsize;
String? key;
String? bucket;
String? mimeType;
String? fsize;
dynamic exif;
ImageInfo imageInfo;
ImageAve imageAve;
String url;
String avinfo;
ImageInfo? imageInfo;
ImageAve? imageAve;
String? url;
String? avinfo;
CommentsImageModel(
... ... @@ -252,10 +253,10 @@ class CommentsImageModel {
data['fsize'] = this.fsize;
data['exif'] = this.exif;
if (this.imageInfo != null) {
data['imageInfo'] = this.imageInfo.toJson();
data['imageInfo'] = this.imageInfo!.toJson();
}
if (this.imageAve != null) {
data['imageAve'] = this.imageAve.toJson();
data['imageAve'] = this.imageAve!.toJson();
}
data['url'] = this.url;
... ... @@ -265,11 +266,11 @@ class CommentsImageModel {
}
class ImageInfo {
String colorModel;
String format;
int height;
int size;
int width;
String? colorModel;
String? format;
int? height;
int? size;
int? width;
ImageInfo({this.colorModel, this.format, this.height, this.size, this.width});
... ... @@ -293,7 +294,7 @@ class ImageInfo {
}
class ImageAve {
String rGB;
String? rGB;
ImageAve({this.rGB});
... ...
import 'package:json_annotation/json_annotation.dart';
part 'cookbook_category_model.g.dart';
... ... @@ -5,13 +6,13 @@ part 'cookbook_category_model.g.dart';
@JsonSerializable()
class CookbookCategoryModel extends Object {
@JsonKey(name: 'ret')
int ret;
int? ret;
@JsonKey(name: 'data')
List<CookbookCategorySunModel> data;
List<CookbookCategorySunModel?>? data;
@JsonKey(name: 'msg')
String msg;
String? msg;
CookbookCategoryModel(
this.ret,
... ... @@ -28,22 +29,22 @@ class CookbookCategoryModel extends Object {
@JsonSerializable()
class CookbookCategorySunModel extends Object {
@JsonKey(name: 'id')
String id;
String? id;
@JsonKey(name: 'sellerid')
String sellerid;
String? sellerid;
@JsonKey(name: 'class_name')
String className;
String? className;
@JsonKey(name: 'order')
String order;
String? order;
@JsonKey(name: 'status')
String status;
String? status;
@JsonKey(name: 'class_type')
String classType;
String? classType;
CookbookCategorySunModel(
this.id,
... ...
... ... @@ -9,13 +9,13 @@ part of 'cookbook_category_model.dart';
CookbookCategoryModel _$CookbookCategoryModelFromJson(
Map<String, dynamic> json) {
return CookbookCategoryModel(
json['ret'] as int,
(json['data'][0] as List)
json['ret'] as int?,
(json['data'][0] as List?)
?.map((e) => e == null
? null
: CookbookCategorySunModel.fromJson(e as Map<String, dynamic>))
?.toList(),
json['msg'] as String,
.toList(),
json['msg'] as String?,
);
}
... ... @@ -30,12 +30,12 @@ Map<String, dynamic> _$CookbookCategoryModelToJson(
CookbookCategorySunModel _$CookbookCategorySunModelFromJson(
Map<String, dynamic> json) {
return CookbookCategorySunModel(
json['id'] as String,
json['sellerid'] as String,
json['class_name'] as String,
json['order'] as String,
json['status'] as String,
json['class_type'] as String,
json['id'] as String?,
json['sellerid'] as String?,
json['class_name'] as String?,
json['order'] as String?,
json['status'] as String?,
json['class_type'] as String?,
);
}
... ...
import 'package:flutter/material.dart';
import 'package:one_key/models/radio_model.dart';
import 'package:one_key/utils/utils.dart';
... ... @@ -7,19 +8,19 @@ import 'dart:convert' as convert;
///菜单
class MenuModel {
String id;
String sellerid;
String className;
String? id;
String? sellerid;
String? className;
dynamic classLabel;
String order;
String status;
String classType;
List<MenuSunModel> cookbooklist;
int allSum; //总共选中菜数量
String? order;
String? status;
String? classType;
List<MenuSunModel>? cookbooklist;
int? allSum; //总共选中菜数量
bool isChange = false; //是否发生数量变化
List<dynamic> cookbooklistShow;
int outAllNum;
late List<dynamic> cookbooklistShow;
int? outAllNum;
int allsumPreviewShow = 0;
MenuModel(
... ... @@ -45,7 +46,7 @@ class MenuModel {
if (json['cookbooklist'] != null) {
cookbooklist = [];
json['cookbooklist'][0].forEach((v) {
cookbooklist.add(new MenuSunModel.fromJson(v));
cookbooklist!.add(new MenuSunModel.fromJson(v));
});
}
}
... ... @@ -62,7 +63,7 @@ class MenuModel {
if (json['cookbooklist'] != null) {
cookbooklist = [];
json['cookbooklist'].forEach((v) {
cookbooklist.add(new MenuSunModel.fromJson2(v));
cookbooklist!.add(new MenuSunModel.fromJson2(v));
});
}
}
... ... @@ -81,7 +82,7 @@ class MenuModel {
cookbooklist = [];
json['cookbooklist'].forEach((v) {
v['out_all_num'] = outAllNum;
cookbooklist.add(new MenuSunModel.fromJson4(v));
cookbooklist!.add(new MenuSunModel.fromJson4(v));
});
}
}
... ... @@ -99,7 +100,7 @@ class MenuModel {
cookbooklist = [];
json['cookbooklist'].forEach((v) {
v['out_all_num'] = outAllNum;
cookbooklist.add(new MenuSunModel.fromJson5(v));
cookbooklist!.add(new MenuSunModel.fromJson5(v));
});
}
outAllNum = json['out_all_num'] ?? 1;
... ... @@ -116,7 +117,7 @@ class MenuModel {
data['class_type'] = this.classType;
data['allSum'] = this.allSum;
if (this.cookbooklist != null) {
data['cookbooklist'] = this.cookbooklist.map((v) => v.toJson()).toList();
data['cookbooklist'] = this.cookbooklist!.map((v) => v.toJson()).toList();
}
data['out_all_num'] = this.outAllNum;
return data;
... ... @@ -124,67 +125,67 @@ class MenuModel {
}
class MenuSunModel {
String id;
String sellerid;
String mid;
String cid;
String lid;
String unit;
String name;
String price;
String member_price;
String first_name;
String search_code;
String channel;
String dishesvideo;
String dishesgif;
String status;
String setup;
String give;
String clear_num;
String record_num;
String image;
String is_weigh;
String desc;
String order_o;
String cdate;
List<SpecModel> spec;
List<SpecModel> specCan;
int isSpec;
List<PracticeModel> practice;
List<MenuModel> cookList;
int amount; //菜品数量
List<AmountHasOrder> amountHasOrderList = [];
TextEditingController amountC = TextEditingController();
int moreSum = 0; //排菜编辑页展示选中总数
String? id;
String? sellerid;
String? mid;
String? cid;
String? lid;
String? unit;
String? name;
String? price;
String? member_price;
String? first_name;
String? search_code;
String? channel;
String? dishesvideo;
String? dishesgif;
String? status;
String? setup;
String? give;
String? clear_num;
String? record_num;
String? image;
String? is_weigh;
String? desc;
String? order_o;
String? cdate;
List<SpecModel>? spec;
List<SpecModel>? specCan;
int? isSpec;
List<PracticeModel>? practice;
List<MenuModel>? cookList;
int? amount; //菜品数量
List<AmountHasOrder>? amountHasOrderList = [];
TextEditingController? amountC = TextEditingController();
int? moreSum = 0; //排菜编辑页展示选中总数
// String nameType = '3'; //1左侧,2右侧,3顶部分开
// String imageType = '1'; //1大图,2小图
int sort;
int indexNew;
int? sort;
int? indexNew;
String taste;
String cooks;
DishCookStyle cookStyle;
String? taste;
String? cooks;
DishCookStyle? cookStyle;
//名称样式选择数组
List<RadioModel> get nameTypeList {
RadioModel radioModel1 = RadioModel();
radioModel1.title = '菜品名称(味型/烹调)及价格在顶部左侧';
radioModel1.code = '1';
radioModel1.select = cookStyle.nameType == radioModel1.code ? true : false;
radioModel1.select = cookStyle!.nameType == radioModel1.code ? true : false;
RadioModel radioModel2 = RadioModel();
radioModel2.title = '菜品名称(味型/烹调)及价格在顶部右侧';
radioModel2.code = '2';
radioModel2.select = cookStyle.nameType == radioModel2.code ? true : false;
radioModel2.select = cookStyle!.nameType == radioModel2.code ? true : false;
RadioModel radioModel3 = RadioModel();
radioModel3.title = '菜品名称(味型/烹调)及价格在顶部分开';
radioModel3.code = '3';
radioModel3.select = cookStyle.nameType == radioModel3.code ? true : false;
radioModel3.select = cookStyle!.nameType == radioModel3.code ? true : false;
return [radioModel1, radioModel2, radioModel3];
}
... ... @@ -193,11 +194,11 @@ class MenuSunModel {
RadioModel radioModel1 = RadioModel();
radioModel1.title = '大图展示菜品';
radioModel1.code = '1';
radioModel1.select = cookStyle.imageType == radioModel1.code ? true : false;
radioModel1.select = cookStyle!.imageType == radioModel1.code ? true : false;
RadioModel radioModel2 = RadioModel();
radioModel2.title = '小图展示菜品';
radioModel2.code = '2';
radioModel2.select = cookStyle.imageType == radioModel2.code ? true : false;
radioModel2.select = cookStyle!.imageType == radioModel2.code ? true : false;
return [radioModel1, radioModel2];
}
... ... @@ -303,14 +304,14 @@ class MenuSunModel {
if (json['spec'] != null) {
spec = [];
json['spec'].forEach((v) {
spec.add(new SpecModel.fromJson(v));
spec!.add(new SpecModel.fromJson(v));
});
}
if (spec != null) {
specCan = [];
spec.forEach((v) {
spec!.forEach((v) {
if (v.status == '1') {
specCan.add(v);
specCan!.add(v);
}
});
}
... ... @@ -322,16 +323,16 @@ class MenuSunModel {
// } else {
json['practice'].forEach((v) {
if (v is Map) {
practice.add(new PracticeModel.fromJson(v));
practice!.add(new PracticeModel.fromJson(v as Map<String, dynamic>));
} else if (v is PracticeModel) {
practice.add(v);
practice!.add(v);
}
});
// }
}
amount = 0;
amountC.text = '0';
amountC!.text = '0';
amountHasOrderList = [];
if (json['amountHasOrderList'] != null) {
// amountHasOrderList = [];
... ... @@ -339,9 +340,9 @@ class MenuSunModel {
// } else {
json['amountHasOrderList'].forEach((v) {
if (v is Map) {
amountHasOrderList.add(new AmountHasOrder.fromJson(v));
amountHasOrderList!.add(new AmountHasOrder.fromJson(v as Map<String, dynamic>));
} else if (v is AmountHasOrder) {
amountHasOrderList.add(v);
amountHasOrderList!.add(v);
}
});
// }
... ... @@ -349,7 +350,7 @@ class MenuSunModel {
if (json['cookList'] != null) {
cookList = [];
json['cookList'].forEach((v) {
cookList.add(new MenuModel.fromJson2(v));
cookList!.add(new MenuModel.fromJson2(v));
});
}
// imageType = Utils.randomGet(1, 3) ?? '1';
... ... @@ -399,14 +400,14 @@ class MenuSunModel {
if (json['spec'] != null) {
spec = [];
json['spec'].forEach((v) {
spec.add(new SpecModel.fromJson(v));
spec!.add(new SpecModel.fromJson(v));
});
}
if (spec != null) {
specCan = [];
spec.forEach((v) {
spec!.forEach((v) {
if (v.status == '1') {
specCan.add(v);
specCan!.add(v);
}
});
}
... ... @@ -418,15 +419,15 @@ class MenuSunModel {
// } else {
json['practice'].forEach((v) {
if (v is Map) {
practice.add(new PracticeModel.fromJson(v));
practice!.add(new PracticeModel.fromJson(v as Map<String, dynamic>));
} else if (v is PracticeModel) {
practice.add(v);
practice!.add(v);
}
});
// }
}
amount = 0;
amountC.text = '0';
amountC!.text = '0';
amountHasOrderList = [];
if (json['amountHasOrderList'] != null) {
// amountHasOrderList = [];
... ... @@ -434,9 +435,9 @@ class MenuSunModel {
// } else {
json['amountHasOrderList'].forEach((v) {
if (v is Map) {
amountHasOrderList.add(new AmountHasOrder.fromJson(v));
amountHasOrderList!.add(new AmountHasOrder.fromJson(v as Map<String, dynamic>));
} else if (v is AmountHasOrder) {
amountHasOrderList.add(v);
amountHasOrderList!.add(v);
}
});
// }
... ... @@ -444,7 +445,7 @@ class MenuSunModel {
if (json['cookList'] != null) {
cookList = [];
json['cookList'].forEach((v) {
cookList.add(v);
cookList!.add(v);
});
}
taste = json['taste'];
... ... @@ -488,17 +489,17 @@ class MenuSunModel {
spec = [];
json['spec'].forEach((v) {
if (v is Map) {
spec.add(new SpecModel.fromJson(v));
spec!.add(new SpecModel.fromJson(v as Map<String, dynamic>));
} else if (v is SpecModel) {
spec.add(v);
spec!.add(v);
}
});
}
if (spec != null) {
specCan = [];
spec.forEach((v) {
spec!.forEach((v) {
if (v.status == '1') {
specCan.add(v);
specCan!.add(v);
}
});
}
... ... @@ -510,15 +511,15 @@ class MenuSunModel {
// } else {
json['practice'].forEach((v) {
if (v is Map) {
practice.add(new PracticeModel.fromJson(v));
practice!.add(new PracticeModel.fromJson(v as Map<String, dynamic>));
} else if (v is PracticeModel) {
practice.add(v);
practice!.add(v);
}
});
// }
}
amount = json['amount'] ?? 0;
amountC.text = amount.toString();
amountC!.text = amount.toString();
// int amounttemp = 0;
if (json['amountHasOrderList'] != null) {
amountHasOrderList = [];
... ... @@ -527,10 +528,10 @@ class MenuSunModel {
json['amountHasOrderList'].forEach((v) {
if (v is Map) {
// amounttemp += v['amount'];
amountHasOrderList.add(new AmountHasOrder.fromJson(v));
amountHasOrderList!.add(new AmountHasOrder.fromJson(v as Map<String, dynamic>));
} else if (v is AmountHasOrder) {
// amounttemp += v.amount;
amountHasOrderList.add(v);
amountHasOrderList!.add(v);
}
// amount = amounttemp;
});
... ... @@ -540,7 +541,7 @@ class MenuSunModel {
if (json['cookList'] != null) {
cookList = [];
json['cookList'].forEach((v) {
cookList.add(new MenuModel.fromJson2(v));
cookList!.add(new MenuModel.fromJson2(v));
});
}
taste = json['taste'];
... ... @@ -586,17 +587,17 @@ class MenuSunModel {
spec = [];
json['spec'].forEach((v) {
if (v is Map) {
spec.add(new SpecModel.fromJson(v));
spec!.add(new SpecModel.fromJson(v as Map<String, dynamic>));
} else if (v is SpecModel) {
spec.add(v);
spec!.add(v);
}
});
}
if (spec != null) {
specCan = [];
spec.forEach((v) {
spec!.forEach((v) {
if (v.status == '1') {
specCan.add(v);
specCan!.add(v);
}
});
}
... ... @@ -608,15 +609,15 @@ class MenuSunModel {
// } else {
json['practice'].forEach((v) {
if (v is Map) {
practice.add(new PracticeModel.fromJson(v));
practice!.add(new PracticeModel.fromJson(v as Map<String, dynamic>));
} else if (v is PracticeModel) {
practice.add(v);
practice!.add(v);
}
});
// }
}
amount = json['amount'] ?? 0;
amountC.text = amount.toString();
amountC!.text = amount.toString();
int amounttemp = 0;
if (json['amountHasOrderList'] != null) {
amountHasOrderList = [];
... ... @@ -624,13 +625,13 @@ class MenuSunModel {
// } else {
json['amountHasOrderList'].forEach((v) {
if (v is Map) {
amounttemp += v['amount'];
amountHasOrderList.add(new AmountHasOrder.fromJson(v));
amounttemp += int.parse(v['amount']);
amountHasOrderList!.add(new AmountHasOrder.fromJson(v as Map<String, dynamic>));
} else if (v is AmountHasOrder) {
amounttemp += v.amount;
amountHasOrderList.add(v);
amounttemp += v.amount!;
amountHasOrderList!.add(v);
}
amount = amounttemp * (json['out_all_num'] ?? 1);
amount = amounttemp * (json['out_all_num'] ?? 1) as int?;
});
// }
... ... @@ -638,7 +639,7 @@ class MenuSunModel {
if (json['cookList'] != null) {
cookList = [];
json['cookList'].forEach((v) {
cookList.add(new MenuModel.fromJson2(v));
cookList!.add(new MenuModel.fromJson2(v));
});
}
taste = json['taste'];
... ... @@ -685,17 +686,17 @@ class MenuSunModel {
spec = [];
json['spec'].forEach((v) {
if (v is Map) {
spec.add(new SpecModel.fromJson(v));
spec!.add(new SpecModel.fromJson(v as Map<String, dynamic>));
} else if (v is SpecModel) {
spec.add(v);
spec!.add(v);
}
});
}
if (spec != null) {
specCan = [];
spec.forEach((v) {
spec!.forEach((v) {
if (v.status == '1') {
specCan.add(v);
specCan!.add(v);
}
});
}
... ... @@ -707,15 +708,15 @@ class MenuSunModel {
// } else {
json['practice'].forEach((v) {
if (v is Map) {
practice.add(new PracticeModel.fromJson(v));
practice!.add(new PracticeModel.fromJson(v as Map<String, dynamic>));
} else if (v is PracticeModel) {
practice.add(v);
practice!.add(v);
}
});
// }
}
amount = json['amount'] ?? 0;
amountC.text = amount.toString();
amountC!.text = amount.toString();
int amounttemp = 0;
if (json['amountHasOrderList'] != null) {
amountHasOrderList = [];
... ... @@ -724,10 +725,10 @@ class MenuSunModel {
json['amountHasOrderList'].forEach((v) {
if (v is Map) {
// amounttemp += v['amount'];
amountHasOrderList.add(new AmountHasOrder.fromJson(v));
amountHasOrderList!.add(new AmountHasOrder.fromJson(v as Map<String, dynamic>));
} else if (v is AmountHasOrder) {
// amounttemp += v.amount;
amountHasOrderList.add(v);
amountHasOrderList!.add(v);
}
// amount = amounttemp;
// amount = amounttemp * json['out_all_num'];
... ... @@ -738,7 +739,7 @@ class MenuSunModel {
if (json['cookList'] != null) {
cookList = [];
json['cookList'].forEach((v) {
cookList.add(new MenuModel.fromJson2(v));
cookList!.add(new MenuModel.fromJson2(v));
});
}
taste = json['taste'];
... ... @@ -799,9 +800,9 @@ class MenuSunModel {
}
class AmountHasOrder {
int amount;
SpecModel specModel; //规格(价格+单位)
PracticeModel practiceModel; //做法
int? amount;
SpecModel? specModel; //规格(价格+单位)
PracticeModel? practiceModel; //做法
TextEditingController amountClist = TextEditingController();
AmountHasOrder({
... ... @@ -832,14 +833,14 @@ class AmountHasOrder {
}
class SpecModel {
String id;
String cid;
String specid;
String specs;
String price;
String memberPrice;
String? id;
String? cid;
String? specid;
String? specs;
String? price;
String? memberPrice;
Null clearNum;
String status;
String? status;
bool select = false;
SpecModel(
... ... @@ -878,12 +879,12 @@ class SpecModel {
}
class PracticeModel {
String id;
String cid;
String practice;
String name;
String price;
String memberPrice;
String? id;
String? cid;
String? practice;
String? name;
String? price;
String? memberPrice;
bool select = false;
PracticeModel(
... ... @@ -916,8 +917,8 @@ class PracticeModel {
}
class DishCookStyle {
String imageType; //1大图,2小图
String nameType; //1左侧,2右侧,3顶部分开
String? imageType; //1大图,2小图
String? nameType; //1左侧,2右侧,3顶部分开
DishCookStyle({this.imageType, this.nameType});
... ...
import 'package:json_annotation/json_annotation.dart';
import 'package:one_key/models/cookbook_model.dart';
import 'dart:convert' as convert;
... ... @@ -7,13 +8,13 @@ part 'cookbook_one_model.g.dart';
@JsonSerializable()
class CookbookOneModel extends Object {
@JsonKey(name: 'ret')
int ret;
int? ret;
@JsonKey(name: 'data')
Data data;
Data? data;
@JsonKey(name: 'msg')
String msg;
String? msg;
CookbookOneModel(
this.ret,
... ... @@ -30,7 +31,7 @@ class CookbookOneModel extends Object {
@JsonSerializable()
class Data extends Object {
@JsonKey(name: 'data')
CookbookOneSunModel data;
CookbookOneSunModel? data;
Data(
this.data,
... ... @@ -45,73 +46,73 @@ class Data extends Object {
@JsonSerializable()
class CookbookOneSunModel extends Object {
@JsonKey(name: 'id')
String id;
String? id;
@JsonKey(name: 'sellerid')
String sellerid;
String? sellerid;
@JsonKey(name: 'cid')
String cid;
String? cid;
@JsonKey(name: 'unit')
String unit;
String? unit;
@JsonKey(name: 'name')
String name;
String? name;
@JsonKey(name: 'price')
String price;
String? price;
@JsonKey(name: 'first_name')
String firstName;
String? firstName;
@JsonKey(name: 'channel')
String channel;
String? channel;
@JsonKey(name: 'status')
String status;
String? status;
@JsonKey(name: 'give')
String give;
String? give;
@JsonKey(name: 'image')
String image;
String? image;
@JsonKey(name: 'order_o')
String orderO;
String? orderO;
@JsonKey(name: 'cdate')
String cdate;
String? cdate;
@JsonKey(name: 'class_name')
String className;
String? className;
@JsonKey(name: 'class_order')
String classOrder;
String? classOrder;
@JsonKey(name: 'attr')
List<dynamic> attr;
List<dynamic>? attr;
@JsonKey(name: 'spec')
List<SpecModel> spec;
List<SpecModel?>? spec;
@JsonKey(name: 'practice')
List<PracticeModel> practice;
List<PracticeModel?>? practice;
// @JsonKey(name: 'template')
// Template template;
@JsonKey(name: 'taste')
String taste;
String? taste;
@JsonKey(name: 'cooks')
String cooks;
String? cooks;
@JsonKey(name: 'cook_style')
DishCookStyle cookStyle;
DishCookStyle? cookStyle;
@JsonKey(name: 'desc')
String desc;
String? desc;
CookbookOneSunModel(
this.id,
... ...
... ... @@ -8,11 +8,11 @@ part of 'cookbook_one_model.dart';
CookbookOneModel _$CookbookOneModelFromJson(Map<String, dynamic> json) {
return CookbookOneModel(
json['ret'] as int,
json['ret'] as int?,
json['data'] == null
? null
: Data.fromJson(json['data'] as Map<String, dynamic>),
json['msg'] as String,
json['msg'] as String?,
);
}
... ... @@ -37,37 +37,37 @@ Map<String, dynamic> _$DataToJson(Data instance) => <String, dynamic>{
CookbookOneSunModel _$CookbookOneSunModelFromJson(Map<String, dynamic> json) {
return CookbookOneSunModel(
json['id'] as String,
json['sellerid'] as String,
json['cid'] as String,
json['unit'] as String,
json['name'] as String,
json['price'] as String,
json['first_name'] as String,
json['channel'] as String,
json['status'] as String,
json['give'] as String,
json['image'] as String,
json['order_o'] as String,
json['cdate'] as String,
json['class_name'] as String,
json['class_order'] as String,
json['attr'] as List,
(json['spec'] as List)
json['id'] as String?,
json['sellerid'] as String?,
json['cid'] as String?,
json['unit'] as String?,
json['name'] as String?,
json['price'] as String?,
json['first_name'] as String?,
json['channel'] as String?,
json['status'] as String?,
json['give'] as String?,
json['image'] as String?,
json['order_o'] as String?,
json['cdate'] as String?,
json['class_name'] as String?,
json['class_order'] as String?,
json['attr'] as List?,
(json['spec'] as List?)
?.map((e) =>
e == null ? null : SpecModel.fromJson(e as Map<String, dynamic>))
?.toList(),
(json['practice'] as List)
.toList(),
(json['practice'] as List?)
?.map((e) => e == null
? null
: PracticeModel.fromJson(e as Map<String, dynamic>))
?.toList(),
json['taste'] as String,
json['cooks'] as String,
.toList(),
json['taste'] as String?,
json['cooks'] as String?,
json['cook_style'] == null
? null
: DishCookStyle.fromJson(convert.json.decode(json['cook_style'])),
json['desc'] as String,
json['desc'] as String?,
);
}
... ...
class CookbookPracticeModel {
int ret;
List<CookbookPracticeSunModel> data;
String msg;
int? ret;
List<CookbookPracticeSunModel>? data;
String? msg;
CookbookPracticeModel({this.ret, this.data, this.msg});
... ... @@ -10,7 +11,7 @@ class CookbookPracticeModel {
if (json['data'] != null) {
data = [];
json['data'][0].forEach((v) {
data.add(new CookbookPracticeSunModel.fromJson(v));
data!.add(new CookbookPracticeSunModel.fromJson(v));
});
}
msg = json['msg'];
... ... @@ -20,7 +21,7 @@ class CookbookPracticeModel {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ret'] = this.ret;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
data['msg'] = this.msg;
return data;
... ... @@ -28,10 +29,10 @@ class CookbookPracticeModel {
}
class CookbookPracticeSunModel {
String id;
String sellerid;
String name;
String cdate;
String? id;
String? sellerid;
String? name;
String? cdate;
bool select = false;
CookbookPracticeSunModel({this.id, this.sellerid, this.name, this.cdate});
... ...
import 'package:json_annotation/json_annotation.dart';
part 'cookbook_spec_model.g.dart';
... ... @@ -5,13 +6,13 @@ part 'cookbook_spec_model.g.dart';
@JsonSerializable()
class CookbookSpecModel extends Object {
@JsonKey(name: 'ret')
int ret;
int? ret;
@JsonKey(name: 'data')
List<CookbookSpecSunModel> data;
List<CookbookSpecSunModel?>? data;
@JsonKey(name: 'msg')
String msg;
String? msg;
CookbookSpecModel(
this.ret,
... ... @@ -28,16 +29,16 @@ class CookbookSpecModel extends Object {
@JsonSerializable()
class CookbookSpecSunModel extends Object {
@JsonKey(name: 'id')
String id;
String? id;
@JsonKey(name: 'sellerid')
String sellerid;
String? sellerid;
@JsonKey(name: 'name')
String name;
String? name;
@JsonKey(name: 'cdate')
String cdate;
String? cdate;
bool select = false;
... ...
... ... @@ -8,13 +8,13 @@ part of 'cookbook_spec_model.dart';
CookbookSpecModel _$CookbookSpecModelFromJson(Map<String, dynamic> json) {
return CookbookSpecModel(
json['ret'] as int,
(json['data'][0] as List)
json['ret'] as int?,
(json['data'][0] as List?)
?.map((e) => e == null
? null
: CookbookSpecSunModel.fromJson(e as Map<String, dynamic>))
?.toList(),
json['msg'] as String,
.toList(),
json['msg'] as String?,
);
}
... ... @@ -27,10 +27,10 @@ Map<String, dynamic> _$CookbookSpecModelToJson(CookbookSpecModel instance) =>
CookbookSpecSunModel _$CookbookSpecSunModelFromJson(Map<String, dynamic> json) {
return CookbookSpecSunModel(
json['id'] as String,
json['sellerid'] as String,
json['name'] as String,
json['cdate'] as String,
json['id'] as String?,
json['sellerid'] as String?,
json['name'] as String?,
json['cdate'] as String?,
);
}
... ...
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart';
... ... @@ -11,13 +12,13 @@ part 'coupon_model.g.dart';
@JsonSerializable()
class CouponModel extends Object {
@JsonKey(name: 'ret')
int ret;
int? ret;
@JsonKey(name: 'data')
List<CouponSunModel> data;
List<CouponSunModel?>? data;
@JsonKey(name: 'msg')
String msg;
String? msg;
CouponModel(
this.ret,
... ... @@ -34,50 +35,50 @@ class CouponModel extends Object {
@JsonSerializable()
class CouponSunModel extends Object {
@JsonKey(name: 'id')
String id;
String? id;
@JsonKey(name: 'uid')
String uid;
String? uid;
@JsonKey(name: 'aname')
String aname;
String? aname;
@JsonKey(name: 'desc')
String desc;
String? desc;
@JsonKey(name: 'stime')
String stime;
String? stime;
@JsonKey(name: 'etime')
String etime;
String? etime;
@JsonKey(name: 'explain')
String explain;
String? explain;
@JsonKey(name: 'status')
String status;
String? status;
@JsonKey(name: 'cdate')
String cdate;
String? cdate;
@JsonKey(name: 'receive_num')
String receiveNum;
String? receiveNum;
@JsonKey(name: 'use_num')
String useNum;
String? useNum;
@JsonKey(name: 'nickname')
String nickname;
String? nickname;
@JsonKey(name: 'uid_list')
String uidList;
String? uidList;
@JsonKey(name: 'is_examine')
String isExamine;
String? isExamine;
@JsonKey(name: 'is_type')
String isType;
String? isType;
@JsonKey(name: 'is_open')
String isOpen;
String? isOpen;
@JsonKey(name: 'is_open')
bool isOpenBool = false;
... ... @@ -86,22 +87,22 @@ class CouponSunModel extends Object {
dynamic price;
@JsonKey(name: 'use')
CouponUse use;
CouponUse? use;
@JsonKey(name: 'exp_date')
ExpDate expDate;
ExpDate? expDate;
@JsonKey(name: 'nick_name')
String nickNameShow;
String? nickNameShow;
@JsonKey(name: 'grant_num')
String grantNum;
String? grantNum;
@JsonKey(name: 'urllink')
String urllink;
String? urllink;
@JsonKey(name: 'lite_qrcode')
String liteQrcode;
String? liteQrcode;
bool isCheck = false;
bool showText = false;
... ... @@ -151,13 +152,13 @@ class CouponUse extends Object {
bool isDish;
@JsonKey(name: 'cash')
String cash;
String? cash;
@JsonKey(name: 'discount')
String discount;
String? discount;
@JsonKey(name: 'dish')
String dish;
String? dish;
@JsonKey(name: 'images')
List<String> images;
... ... @@ -183,7 +184,7 @@ class ExpDate extends Object {
bool isBirthday;
@JsonKey(name: 'week_show')
String weekShow;
String? weekShow;
@JsonKey(name: 'week_data')
List<FilterBtnModel> weekData;
... ...
... ... @@ -8,13 +8,13 @@ part of 'coupon_model.dart';
CouponModel _$CouponModelFromJson(Map<String, dynamic> json) {
return CouponModel(
json['ret'] as int,
(json['data'] as List)
json['ret'] as int?,
(json['data'] as List?)
?.map((e) => e == null
? null
: CouponSunModel.fromJson(e as Map<String, dynamic>))
?.toList(),
json['msg'] as String);
.toList(),
json['msg'] as String?);
}
Map<String, dynamic> _$CouponModelToJson(CouponModel instance) =>
... ... @@ -26,24 +26,24 @@ Map<String, dynamic> _$CouponModelToJson(CouponModel instance) =>
CouponSunModel _$CouponSunModelFromJson(Map<String, dynamic> json) {
return CouponSunModel(
json['id'] as String,
json['uid'] as String,
json['aname'] as String,
json['desc'] as String,
json['stime'] as String,
json['etime'] as String,
json['explain'] as String,
json['status'] as String,
json['cdate'] as String,
json['receive_num'] as String,
json['use_num'] as String,
json['nickname'] as String,
json['uid_list'] as String,
json['is_examine'] as String,
json['is_type'] as String,
json['is_open'] as String,
json['id'] as String?,
json['uid'] as String?,
json['aname'] as String?,
json['desc'] as String?,
json['stime'] as String?,
json['etime'] as String?,
json['explain'] as String?,
json['status'] as String?,
json['cdate'] as String?,
json['receive_num'] as String?,
json['use_num'] as String?,
json['nickname'] as String?,
json['uid_list'] as String?,
json['is_examine'] as String?,
json['is_type'] as String?,
json['is_open'] as String?,
json['is_open'] == "1" ? true : false,
json['price'] as String,
json['price'] as String?,
json['use'] == null
? null
: (json['use'] is String)
... ... @@ -58,10 +58,10 @@ CouponSunModel _$CouponSunModelFromJson(Map<String, dynamic> json) {
: (json['exp_date'] is Map)
? ExpDate.fromJson(json['exp_date'])
: null,
json['nick_name'] as String,
json['grant_num'] as String,
json['urllink'] as String,
json['lite_qrcode'] as String,
json['nick_name'] as String?,
json['grant_num'] as String?,
json['urllink'] as String?,
json['lite_qrcode'] as String?,
);
}
... ... @@ -133,8 +133,8 @@ CouponUse _$CouponUseFromJson(Map<String, dynamic> json) {
}
}
return CouponUse(iscash, isdiscount, isdish, json['cash'] as String,
json['discount'] as String, json['dish'] as String, img);
return CouponUse(iscash, isdiscount, isdish, json['cash'] as String?,
json['discount'] as String?, json['dish'] as String?, img);
}
Map<String, dynamic> _$CouponUseToJson(CouponUse instance) => <String, dynamic>{
... ... @@ -175,7 +175,7 @@ ExpDate _$ExpDateFromJson(Map<String, dynamic> json) {
isbirthday = json['is_birthday'] ? true : false;
}
return ExpDate(
isnone, isweek, isbirthday, json['week_show'] as String, weekdata);
isnone, isweek, isbirthday, json['week_show'] as String?, weekdata);
}
Map<String, dynamic> _$ExpDateToJson(ExpDate instance) => <String, dynamic>{
... ...
import 'package:json_annotation/json_annotation.dart';
part 'created_order_model.g.dart';
... ... @@ -5,13 +6,13 @@ part 'created_order_model.g.dart';
@JsonSerializable()
class CreatedOrderModel extends Object {
@JsonKey(name: 'ret')
int ret;
int? ret;
@JsonKey(name: 'data')
CreatedOrderSunModel data;
CreatedOrderSunModel? data;
@JsonKey(name: 'msg')
String msg;
String? msg;
CreatedOrderModel(
this.ret,
... ... @@ -28,48 +29,48 @@ class CreatedOrderModel extends Object {
@JsonSerializable()
class CreatedOrderSunModel extends Object {
@JsonKey(name: 'id')
String id;
String? id;
@JsonKey(name: 'rid')
String rid;
String? rid;
@JsonKey(name: 'ddate')
String ddate;
String? ddate;
@JsonKey(name: 'no')
String no;
String? no;
@JsonKey(name: 'row_num')
String rowNum;
String? rowNum;
@JsonKey(name: 'pnum')
String pnum;
String? pnum;
@JsonKey(name: 'sellerid')
String sellerid;
String? sellerid;
@JsonKey(name: 'openid')
String openid;
String? openid;
@JsonKey(name: 'price')
int price;
int? price;
@JsonKey(name: 'type')
String type;
String? type;
@JsonKey(name: 'behavior')
String behavior;
String? behavior;
@JsonKey(name: 'cdate')
String cdate;
String? cdate;
@JsonKey(name: 'remark')
String remark;
String? remark;
@JsonKey(name: 'cookbooklist')
List<Cookbooklist> cookbooklist;
List<Cookbooklist?>? cookbooklist;
@JsonKey(name: 'seller')
Seller seller;
Seller? seller;
CreatedOrderSunModel(
this.id,
... ... @@ -97,67 +98,67 @@ class CreatedOrderSunModel extends Object {
@JsonSerializable()
class Cookbooklist extends Object {
@JsonKey(name: 'id')
String id;
String? id;
@JsonKey(name: 'orderid')
String orderid;
String? orderid;
@JsonKey(name: 'openid')
String openid;
String? openid;
@JsonKey(name: 'cookbookid')
String cookbookid;
String? cookbookid;
@JsonKey(name: 'total')
String total;
String? total;
@JsonKey(name: 'price')
String price;
String? price;
@JsonKey(name: 'cookname')
String cookname;
String? cookname;
@JsonKey(name: 'cookunit')
String cookunit;
String? cookunit;
@JsonKey(name: 'cookimage')
String cookimage;
String? cookimage;
@JsonKey(name: 'class_name')
String className;
String? className;
@JsonKey(name: 'classid')
String classid;
String? classid;
@JsonKey(name: 'class_order')
String classOrder;
String? classOrder;
@JsonKey(name: 'source')
String source;
String? source;
@JsonKey(name: 'status')
String status;
String? status;
@JsonKey(name: 'identity')
String identity;
String? identity;
@JsonKey(name: 'cdate')
String cdate;
String? cdate;
@JsonKey(name: 'num')
String number;
String? number;
@JsonKey(name: 'practice_name')
String practiceName;
String? practiceName;
@JsonKey(name: 'spec_price')
String specPrice;
String? specPrice;
@JsonKey(name: 'spec_member_price')
String specMemberPrice;
String? specMemberPrice;
@JsonKey(name: 'spec_name')
String specName;
String? specName;
Cookbooklist(
this.id,
... ... @@ -192,31 +193,31 @@ class Cookbooklist extends Object {
@JsonSerializable()
class Seller extends Object {
@JsonKey(name: 'id')
String id;
String? id;
@JsonKey(name: 'sellername')
String sellername;
String? sellername;
@JsonKey(name: 'seller_image')
String sellerImage;
String? sellerImage;
@JsonKey(name: 'phone')
String phone;
String? phone;
@JsonKey(name: 'map_address')
String mapAddress;
String? mapAddress;
@JsonKey(name: 'last_num')
String lastNum;
String? lastNum;
@JsonKey(name: 'long')
String long;
String? long;
@JsonKey(name: 'lat')
String lat;
String? lat;
@JsonKey(name: 'daily')
String daily;
String? daily;
Seller(
this.id,
... ...
... ... @@ -8,11 +8,11 @@ part of 'created_order_model.dart';
CreatedOrderModel _$CreatedOrderModelFromJson(Map<String, dynamic> json) {
return CreatedOrderModel(
json['ret'] as int,
json['ret'] as int?,
json['data'] == null
? null
: CreatedOrderSunModel.fromJson(json['data'] as Map<String, dynamic>),
json['msg'] as String);
json['msg'] as String?);
}
Map<String, dynamic> _$CreatedOrderModelToJson(CreatedOrderModel instance) =>
... ... @@ -24,27 +24,27 @@ Map<String, dynamic> _$CreatedOrderModelToJson(CreatedOrderModel instance) =>
CreatedOrderSunModel _$CreatedOrderSunModelFromJson(Map<String, dynamic> json) {
return CreatedOrderSunModel(
json['id'] as String,
json['rid'] as String,
json['ddate'] as String,
json['no'] as String,
json['row_num'] as String,
json['pnum'] as String,
json['sellerid'] as String,
json['openid'] as String,
json['price'] as int,
json['type'] as String,
json['behavior'] as String,
json['cdate'] as String,
(json['cookbooklist'] as List)
json['id'] as String?,
json['rid'] as String?,
json['ddate'] as String?,
json['no'] as String?,
json['row_num'] as String?,
json['pnum'] as String?,
json['sellerid'] as String?,
json['openid'] as String?,
json['price'] as int?,
json['type'] as String?,
json['behavior'] as String?,
json['cdate'] as String?,
(json['cookbooklist'] as List?)
?.map((e) => e == null
? null
: Cookbooklist.fromJson(e as Map<String, dynamic>))
?.toList(),
.toList(),
json['seller'] == null
? null
: Seller.fromJson(json['seller'] as Map<String, dynamic>),
json['remark'] as String);
json['remark'] as String?);
}
Map<String, dynamic> _$CreatedOrderSunModelToJson(
... ... @@ -69,27 +69,27 @@ Map<String, dynamic> _$CreatedOrderSunModelToJson(
Cookbooklist _$CookbooklistFromJson(Map<String, dynamic> json) {
return Cookbooklist(
json['id'] as String,
json['orderid'] as String,
json['openid'] as String,
json['cookbookid'] as String,
json['total'] as String,
json['price'] as String,
json['cookname'] as String,
json['cookunit'] as String,
json['cookimage'] as String,
json['class_name'] as String,
json['classid'] as String,
json['class_order'] as String,
json['source'] as String,
json['status'] as String,
json['identity'] as String,
json['cdate'] as String,
json['num'] as String,
json['practice_name'] as String,
json['spec_price'] as String,
json['spec_member_price'] as String,
json['spec_name'] as String,
json['id'] as String?,
json['orderid'] as String?,
json['openid'] as String?,
json['cookbookid'] as String?,
json['total'] as String?,
json['price'] as String?,
json['cookname'] as String?,
json['cookunit'] as String?,
json['cookimage'] as String?,
json['class_name'] as String?,
json['classid'] as String?,
json['class_order'] as String?,
json['source'] as String?,
json['status'] as String?,
json['identity'] as String?,
json['cdate'] as String?,
json['num'] as String?,
json['practice_name'] as String?,
json['spec_price'] as String?,
json['spec_member_price'] as String?,
json['spec_name'] as String?,
);
}
... ... @@ -117,15 +117,15 @@ Map<String, dynamic> _$CookbooklistToJson(Cookbooklist instance) =>
Seller _$SellerFromJson(Map<String, dynamic> json) {
return Seller(
json['id'] as String,
json['sellername'] as String,
json['seller_image'] as String,
json['phone'] as String,
json['map_address'] as String,
json['last_num'] as String,
json['long'] as String,
json['lat'] as String,
json['daily'] as String);
json['id'] as String?,
json['sellername'] as String?,
json['seller_image'] as String?,
json['phone'] as String?,
json['map_address'] as String?,
json['last_num'] as String?,
json['long'] as String?,
json['lat'] as String?,
json['daily'] as String?);
}
Map<String, dynamic> _$SellerToJson(Seller instance) => <String, dynamic>{
... ...
import 'package:azlistview/azlistview.dart';
import 'package:azlistview_plus/azlistview_plus.dart';
import 'package:json_annotation/json_annotation.dart';
part 'customer_by_seller_model.g.dart';
... ... @@ -6,13 +6,13 @@ part 'customer_by_seller_model.g.dart';
@JsonSerializable()
class CustomerBySellerModel extends Object {
@JsonKey(name: 'ret')
int ret;
int? ret;
@JsonKey(name: 'data')
List<CustomerBySellerSunModel> data;
List<CustomerBySellerSunModel?>? data;
@JsonKey(name: 'msg')
String msg;
String? msg;
CustomerBySellerModel(
this.ret,
... ... @@ -27,48 +27,50 @@ class CustomerBySellerModel extends Object {
}
@JsonSerializable()
class CustomerBySellerSunModel extends Object with ISuspensionBean {
class CustomerBySellerSunModel extends Object
with ISuspensionBean
{
@JsonKey(name: 'rname')
String rname;
String? rname;
@JsonKey(name: 'sex')
String sex;
String? sex;
@JsonKey(name: 'phone')
String phone;
String? phone;
@JsonKey(name: 'sellerid')
String sellerid;
String? sellerid;
@JsonKey(name: 'month_count')
String monthCount;
String? monthCount;
@JsonKey(name: 'leiji')
String leiji;
String? leiji;
@JsonKey(name: 'attr')
String attr;
String? attr;
@JsonKey(name: 'ddate')
String ddate;
String? ddate;
@JsonKey(name: 'ddate_solt')
String ddateSolt;
String? ddateSolt;
@JsonKey(name: 'uid')
String uid;
String? uid;
@JsonKey(name: 'nick_name')
String nickName;
String? nickName;
@JsonKey(name: 'gid')
String gid;
String? gid;
@JsonKey(name: 'label')
String label;
String? label;
@JsonKey(name: 'is_member')
String isMember;
String? isMember;
@JsonKey(name: 'con_amount')
dynamic conAmount;
... ... @@ -78,9 +80,9 @@ class CustomerBySellerSunModel extends Object with ISuspensionBean {
bool select = false;
String pinyin;
String tagIndex; //abcdefg
String get rnameStr {
String? pinyin;
late String tagIndex; //abcdefg
String? get rnameStr {
if (rname == null || rname == '' || rname == ' ') return "";
return rname;
}
... ... @@ -102,6 +104,9 @@ class CustomerBySellerSunModel extends Object with ISuspensionBean {
case "4": //贵宾
case "贵宾":
return "贵宾";
default:
return '';
}
}
... ...
... ... @@ -9,13 +9,13 @@ part of 'customer_by_seller_model.dart';
CustomerBySellerModel _$CustomerBySellerModelFromJson(
Map<String, dynamic> json) {
return CustomerBySellerModel(
json['ret'] as int,
(json['data'] as List)
json['ret'] as int?,
(json['data'] as List?)
?.map((e) => e == null
? null
: CustomerBySellerSunModel.fromJson(e as Map<String, dynamic>))
?.toList(),
json['msg'] as String,
.toList(),
json['msg'] as String?,
);
}
... ... @@ -30,20 +30,20 @@ Map<String, dynamic> _$CustomerBySellerModelToJson(
CustomerBySellerSunModel _$CustomerBySellerSunModelFromJson(
Map<String, dynamic> json) {
return CustomerBySellerSunModel(
json['rname'] as String,
json['sex'] as String,
json['phone'] as String,
json['sellerid'] as String,
json['month_count'] as String,
json['leiji'] as String,
json['attr'] as String,
json['ddate'] as String,
json['ddate_solt'] as String,
json['uid'] as String,
json['nick_name'] as String,
json['gid'] as String,
json['label'] as String,
json['is_member'] as String,
json['rname'] as String?,
json['sex'] as String?,
json['phone'] as String?,
json['sellerid'] as String?,
json['month_count'] as String?,
json['leiji'] as String?,
json['attr'] as String?,
json['ddate'] as String?,
json['ddate_solt'] as String?,
json['uid'] as String?,
json['nick_name'] as String?,
json['gid'] as String?,
json['label'] as String?,
json['is_member'] as String?,
json['con_amount'] as dynamic,
json['store_day'] as dynamic,
);
... ...
import 'package:json_annotation/json_annotation.dart';
part 'customer_label_model.g.dart';
... ... @@ -5,13 +6,13 @@ part 'customer_label_model.g.dart';
@JsonSerializable()
class CustomerLabelModel extends Object {
@JsonKey(name: 'ret')
int ret;
int? ret;
@JsonKey(name: 'data')
List<CustomerLabelSunModel> data;
List<CustomerLabelSunModel?>? data;
@JsonKey(name: 'msg')
String msg;
String? msg;
CustomerLabelModel(
this.ret,
... ... @@ -28,16 +29,16 @@ class CustomerLabelModel extends Object {
@JsonSerializable()
class CustomerLabelSunModel extends Object {
@JsonKey(name: 'id')
String id;
String? id;
@JsonKey(name: 'sellerid')
String sellerid;
String? sellerid;
@JsonKey(name: 'label')
String label;
String? label;
@JsonKey(name: 'cdate')
String cdate;
String? cdate;
bool select = false;
CustomerLabelSunModel(
... ...
... ... @@ -8,13 +8,13 @@ part of 'customer_label_model.dart';
CustomerLabelModel _$CustomerLabelModelFromJson(Map<String, dynamic> json) {
return CustomerLabelModel(
json['ret'] as int,
(json['data'] as List)
json['ret'] as int?,
(json['data'] as List?)
?.map((e) => e == null
? null
: CustomerLabelSunModel.fromJson(e as Map<String, dynamic>))
?.toList(),
json['msg'] as String,
.toList(),
json['msg'] as String?,
);
}
... ... @@ -28,10 +28,10 @@ Map<String, dynamic> _$CustomerLabelModelToJson(CustomerLabelModel instance) =>
CustomerLabelSunModel _$CustomerLabelSunModelFromJson(
Map<String, dynamic> json) {
return CustomerLabelSunModel(
json['id'] as String,
json['sellerid'] as String,
json['label'] as String,
json['cdate'] as String,
json['id'] as String?,
json['sellerid'] as String?,
json['label'] as String?,
json['cdate'] as String?,
);
}
... ...
import 'package:azlistview/azlistview.dart';
import 'package:azlistview_plus/azlistview_plus.dart';
import 'package:json_annotation/json_annotation.dart';
part 'customer_list_model.g.dart';
... ... @@ -6,13 +7,13 @@ part 'customer_list_model.g.dart';
@JsonSerializable()
class CustomerListModel extends Object {
@JsonKey(name: 'ret')
int ret;
int? ret;
@JsonKey(name: 'data')
List<CustomerListSunModel> data;
List<CustomerListSunModel?>? data;
@JsonKey(name: 'msg')
String msg;
String? msg;
CustomerListModel(
this.ret,
... ... @@ -27,68 +28,70 @@ class CustomerListModel extends Object {
}
@JsonSerializable()
class CustomerListSunModel extends Object with ISuspensionBean {
class CustomerListSunModel extends Object
with ISuspensionBean
{
@JsonKey(name: 'id')
String id;
String? id;
@JsonKey(name: 'sellerid')
String sellerid;
String? sellerid;
@JsonKey(name: 'uid')
String uid;
String? uid;
@JsonKey(name: 'rname')
String rname;
String? rname;
@JsonKey(name: 'sex')
String sex;
String? sex;
@JsonKey(name: 'phone')
String phone;
String? phone;
@JsonKey(name: 'cdate')
String cdate;
String? cdate;
@JsonKey(name: 'leiji')
String leiji;
String? leiji;
@JsonKey(name: 'attr')
String attr;
String? attr;
@JsonKey(name: 'ddate')
String ddate;
String? ddate;
@JsonKey(name: 'ddate_solt')
String ddateSolt;
String? ddateSolt;
@JsonKey(name: 'company')
String company;
String? company;
@JsonKey(name: 'section')
String section;
String? section;
@JsonKey(name: 'position')
String position;
String? position;
@JsonKey(name: 'taboos')
String taboos;
String? taboos;
@JsonKey(name: 'like')
String like;
String? like;
@JsonKey(name: 'serve')
String serve;
String? serve;
@JsonKey(name: 'c_day')
String cDay;
String? cDay;
@JsonKey(name: 'udate')
String udate;
String? udate;
@JsonKey(name: 'month_count')
String monthCount;
String? monthCount;
@JsonKey(name: 'label')
String label;
String? label;
@JsonKey(name: 'nick_name')
String nickName;
String? nickName;
@JsonKey(name: 'gid')
String gid;
String? gid;
@JsonKey(name: 'is_member')
String isMember;
String? isMember;
@JsonKey(name: 'con_amount')
dynamic conAmount;
... ... @@ -98,11 +101,11 @@ class CustomerListSunModel extends Object with ISuspensionBean {
bool select = false;
List<String> pinyinList; //全拼数组
String pinyin; //全拼字母
String pinyinFirst; //首字母
String tagIndex; //abcdefg
String get rnameStr {
List<String>? pinyinList; //全拼数组
String? pinyin; //全拼字母
String? pinyinFirst; //首字母
late String tagIndex; //abcdefg
String? get rnameStr {
if (rname == null || rname == '' || rname == ' ') return "";
return rname;
}
... ... @@ -124,6 +127,8 @@ class CustomerListSunModel extends Object with ISuspensionBean {
case "4": //贵宾
case "贵宾":
return "贵宾";
default:
return "";
}
}
... ...
... ... @@ -8,13 +8,13 @@ part of 'customer_list_model.dart';
CustomerListModel _$CustomerListModelFromJson(Map<String, dynamic> json) {
return CustomerListModel(
json['ret'] as int,
(json['data'] as List)
json['ret'] as int?,
(json['data'] as List?)
?.map((e) => e == null
? null
: CustomerListSunModel.fromJson(e as Map<String, dynamic>))
?.toList(),
json['msg'] as String,
.toList(),
json['msg'] as String?,
);
}
... ... @@ -27,30 +27,30 @@ Map<String, dynamic> _$CustomerListModelToJson(CustomerListModel instance) =>
CustomerListSunModel _$CustomerListSunModelFromJson(Map<String, dynamic> json) {
return CustomerListSunModel(
json['id'] as String,
json['sellerid'] as String,
json['uid'] as String,
json['rname'] as String,
json['sex'] as String,
json['phone'] as String,
json['cdate'] as String,
json['leiji'] as String,
json['attr'] as String,
json['ddate'] as String,
json['ddate_solt'] as String,
json['company'] as String,
json['section'] as String,
json['position'] as String,
json['taboos'] as String,
json['like'] as String,
json['serve'] as String,
json['c_day'] as String,
json['udate'] as String,
json['month_count'] as String,
json['label'] as String,
json['nick_name'] as String,
json['gid'] as String,
json['is_member'] as String,
json['id'] as String?,
json['sellerid'] as String?,
json['uid'] as String?,
json['rname'] as String?,
json['sex'] as String?,
json['phone'] as String?,
json['cdate'] as String?,
json['leiji'] as String?,
json['attr'] as String?,
json['ddate'] as String?,
json['ddate_solt'] as String?,
json['company'] as String?,
json['section'] as String?,
json['position'] as String?,
json['taboos'] as String?,
json['like'] as String?,
json['serve'] as String?,
json['c_day'] as String?,
json['udate'] as String?,
json['month_count'] as String?,
json['label'] as String?,
json['nick_name'] as String?,
json['gid'] as String?,
json['is_member'] as String?,
json['con_amount'] as dynamic,
json['store_day'] as dynamic,
);
... ...
import 'dart:convert' as convert;
import 'package:common_utils/common_utils.dart';
import 'package:one_key/models/table_list.dart' as t;
class DayStaticsModel {
int ret;
DayStaticsSunModel data;
String msg;
int? ret;
DayStaticsSunModel? data;
String? msg;
DayStaticsModel({this.ret, this.data, this.msg});
... ... @@ -21,7 +22,7 @@ class DayStaticsModel {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ret'] = this.ret;
if (this.data != null) {
data['data'] = this.data.toJson();
data['data'] = this.data!.toJson();
}
data['msg'] = this.msg;
return data;
... ... @@ -44,7 +45,7 @@ class DayStaticsSunModel {
dynamic order;
dynamic plancook;
dynamic agvTable;
Map<String, ItemData> daydata;
Map<String, ItemData>? daydata;
DayStaticsSunModel(
{this.ddateSolt,
... ... @@ -126,7 +127,7 @@ class DayStaticsSunModel {
class ItemData {
bool expansion = true;
List<DsoltListModel> dsoltListModelItem;
late List<DsoltListModel> dsoltListModelItem;
}
class DsoltListModel {
... ... @@ -164,7 +165,7 @@ class DsoltListModel {
return _nameStr;
}
String get rnameStr {
String? get rnameStr {
if (rname == null || rname == '' || rname == ' ') return "";
switch (sex.toString()) {
case "1": //先生
... ...
import 'package:one_key/models/reserveA_action_log_modol.dart';
import 'package:one_key/models/reserve_deposit_model.dart';
import 'package:one_key/models/reserve_recheck_model.dart';
... ... @@ -5,9 +6,9 @@ import 'package:one_key/models/reserve_recheck_model.dart';
import '../utils/utils.dart';
class DetailModelAllModel {
int ret;
DetailModelAllSunModel data;
String msg;
int? ret;
DetailModelAllSunModel? data;
String? msg;
DetailModelAllModel({this.ret, this.data, this.msg});
... ... @@ -37,54 +38,54 @@ class DetailModelAllModel {
}
class DetailModelAllSunModel {
String id;
String sid;
String uid;
String serveUid;
String tid;
String? id;
String? sid;
String? uid;
String? serveUid;
String? tid;
dynamic reserveType;
String pnum;
String rname;
String sex;
String phone;
String cusdem;
String ddate;
String isSetDdate;
String ddateSolt;
String status;
String abolition;
String type;
String cdate;
String noteName;
String? pnum;
String? rname;
String? sex;
String? phone;
String? cusdem;
String? ddate;
String? isSetDdate;
String? ddateSolt;
String? status;
String? abolition;
String? type;
String? cdate;
String? noteName;
dynamic actualPum;
dynamic conAmount;
dynamic photoNote;
String rdate;
String tableinfo;
String upDate;
String cause;
String roleName;
String nickName;
String placeOrderName;
String serveName;
String logPhoto;
String guestUid;
String gid;
String sellerUserPhone;
int isUserComments;
Cancel cancel;
String? rdate;
String? tableinfo;
String? upDate;
String? cause;
String? roleName;
String? nickName;
String? placeOrderName;
String? serveName;
String? logPhoto;
String? guestUid;
String? gid;
String? sellerUserPhone;
int? isUserComments;
Cancel? cancel;
dynamic depositCancel;
int cookbooklist;
Invoice invoice;
String advanceOrderPrice;
List<Demands> demands;
int? cookbooklist;
Invoice? invoice;
String? advanceOrderPrice;
List<Demands>? demands;
List<TablePhotos> tablePhoto;
List<TablePhotos>? tablePhoto;
dynamic orderInfoStatus;
List<String> reserveTypeField;
List<ReserveActionLogSunModol> reserveActionInfo;
List<ReserveDepositSunModel> reserveDepositInfo;
List<ReserveRecheckSunModel> reserveRecheckInfo;
List<String>? reserveTypeField;
List<ReserveActionLogSunModol>? reserveActionInfo;
List<ReserveDepositSunModel>? reserveDepositInfo;
List<ReserveRecheckSunModel>? reserveRecheckInfo;
String get statuImgAssets {
switch (status) {
... ... @@ -104,20 +105,22 @@ class DetailModelAllSunModel {
return "assets/statu_canceled.png";
case "6":
return "assets/statu_refuse.png";
default:
return "assets/statu_booked.png";
}
}
String get demandStr {
String demand = "";
for (Demands table in demands) {
demand += table.name + ",";
for (Demands table in demands!) {
demand += table.name! + ",";
}
return demand.substring(0, demand.length - 1);
}
String get ddateymd {
DateTime dateTime =
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000);
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000);
String md = "${dateTime.year}-" +
Utils.addZeroNumber(dateTime.month) +
"-" +
... ... @@ -138,7 +141,7 @@ class DetailModelAllSunModel {
String get ddateMd {
DateTime dateTime =
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000);
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000);
String md = "${dateTime.year}年 " +
Utils.addZeroNumber(dateTime.month) +
"月" +
... ... @@ -160,7 +163,7 @@ class DetailModelAllSunModel {
//2020-09-09
String get ddateYMD {
DateTime day = DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000);
DateTime day = DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000);
String ymd = "${day.year}-" +
Utils.addZeroNumber(day.month) +
"-" +
... ... @@ -170,13 +173,13 @@ class DetailModelAllSunModel {
String get ddateF {
DateTime dateTime =
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000);
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000);
return _returnDate(dateTime);
}
DateTime get ddateFhms {
DateTime dateTime =
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000);
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000);
return dateTime;
}
... ... @@ -215,7 +218,7 @@ class DetailModelAllSunModel {
}
date += "周${Utils.formatWeekDayNum(day.weekday)}";
String time = Utils.lunarCalendarHolidays(day);
String? time = Utils.lunarCalendarHolidays(day);
date += ' ${time}';
date += ')';
return date;
... ... @@ -224,7 +227,7 @@ class DetailModelAllSunModel {
String get ddateHm {
if (type == "0" || (type == "1" && isSetDdate == "1")) {
DateTime dateTime =
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000);
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000);
String hm = Utils.addZeroNumber(dateTime.hour) +
":" +
Utils.addZeroNumber(dateTime.minute);
... ... @@ -254,7 +257,7 @@ class DetailModelAllSunModel {
// }
// } else {
DateTime dateTime =
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000);
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000);
ddateStr = Utils.addZeroNumber(dateTime.hour) +
":" +
Utils.addZeroNumber(dateTime.minute);
... ... @@ -262,7 +265,7 @@ class DetailModelAllSunModel {
return ddateStr;
}
String get rnameStr {
String? get rnameStr {
if (rname == null || rname == '' || rname == ' ') {
if (sex == '4') {
return "贵宾";
... ... @@ -273,13 +276,13 @@ class DetailModelAllSunModel {
switch (sex) {
case "1": //先生
return rname + "先生";
return rname! + "先生";
case "2": //女士
return rname + "女士";
return rname! + "女士";
case "3": //公司
return rname + "公司";
return rname! + "公司";
case "4": //贵宾
return rname + "贵宾";
return rname! + "贵宾";
}
return rname;
}
... ... @@ -288,13 +291,13 @@ class DetailModelAllSunModel {
if (tableinfo == '' || tableinfo == null) {
return [];
} else {
List temp = tableinfo.split(',');
List temp = tableinfo!.split(',');
return temp;
}
}
String get tableinfoStr {
List temp = tableinfo.split(',');
String? get tableinfoStr {
List temp = tableinfo!.split(',');
return temp[0].name +
"\n" +
... ... @@ -582,10 +585,10 @@ class DetailModelAllSunModel {
}
class TablePhotos {
String id;
String? id;
String name;
String url;
String? name;
String? url;
TablePhotos({
this.id,
... ... @@ -618,16 +621,16 @@ class TablePhotos {
}
class Demands {
String id;
String sellerid;
String tableid;
String name;
String max;
String low;
String standard;
String status;
String surplus;
String cdate;
String? id;
String? sellerid;
String? tableid;
String? name;
String? max;
String? low;
String? standard;
String? status;
String? surplus;
String? cdate;
Demands(
{this.id,
... ... @@ -691,17 +694,17 @@ class Demands {
}
class Invoice {
String id;
String rid;
String openid;
String type;
String title;
String taxnumber;
String companyaddress;
String telephone;
String bankname;
String bankaccount;
String cdate;
String? id;
String? rid;
String? openid;
String? type;
String? title;
String? taxnumber;
String? companyaddress;
String? telephone;
String? bankname;
String? bankaccount;
String? cdate;
Invoice(
{this.id,
... ... @@ -770,18 +773,18 @@ class Invoice {
}
class Cancel {
String id;
String uid;
String uname;
String openid;
String desc;
String upRid;
String actionType;
String? id;
String? uid;
String? uname;
String? openid;
String? desc;
String? upRid;
String? actionType;
dynamic logPhoto;
String cdate;
String? cdate;
String get cdateStr {
DateTime dateTime =
DateTime.fromMillisecondsSinceEpoch(int.parse(cdate) * 1000);
DateTime.fromMillisecondsSinceEpoch(int.parse(cdate!) * 1000);
return dateTime.year.toString() +
"-" +
Utils.addZeroNumber(dateTime.month) +
... ...
class DsoltXt {
String id;
String title = '请选择';
String? id;
String? title = '请选择';
}
... ...
///桌位区域
class FeastMenuModel {
String name;
bool save;
bool select;
String? name;
bool? save;
bool? select;
FeastMenuModel();
... ...
class FeastMenuSetModel {
String id;
String cname;
String? id;
String? cname;
}
... ...
///title 和select
class FilterBtnModel {
String id;
String title;
bool select = false;
String roleName;
String phone;
String account;
bool selectMor = false;
bool selectNoon = false;
bool selectNig = false;
String? id;
String? title;
bool? select = false;
String? roleName;
String? phone;
String? account;
bool? selectMor = false;
bool? selectNoon = false;
bool? selectNig = false;
FilterBtnModel();
... ...
import 'package:common_utils/common_utils.dart';
class GetBanquetBeFollowModel {
int ret;
List<GetBanquetBeFollowSunModel> data;
String msg;
int? ret;
List<GetBanquetBeFollowSunModel>? data;
String? msg;
GetBanquetBeFollowModel({this.ret, this.data, this.msg});
... ... @@ -12,7 +13,7 @@ class GetBanquetBeFollowModel {
if (json['data'] != null) {
data = <GetBanquetBeFollowSunModel>[];
json['data'].forEach((v) {
data.add(new GetBanquetBeFollowSunModel.fromJson(v));
data!.add(new GetBanquetBeFollowSunModel.fromJson(v));
});
}
msg = json['msg'];
... ... @@ -22,7 +23,7 @@ class GetBanquetBeFollowModel {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ret'] = this.ret;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
data['msg'] = this.msg;
return data;
... ... @@ -30,17 +31,17 @@ class GetBanquetBeFollowModel {
}
class GetBanquetBeFollowSunModel {
String id;
String rname;
String sex;
String staffId;
String ddate;
String classifyId;
String? id;
String? rname;
String? sex;
String? staffId;
String? ddate;
String? classifyId;
dynamic contractFinalPrice;
String warrantId;
String className;
String nickName;
String account;
String? warrantId;
String? className;
String? nickName;
String? account;
dynamic isDeposit;
dynamic isTids;
dynamic isSetmeal;
... ...