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' | @@ -46,6 +46,8 @@ apply plugin: 'com.huawei.agconnect' | ||
| 46 | android { | 46 | android { |
| 47 | compileSdkVersion 34 | 47 | compileSdkVersion 34 |
| 48 | 48 | ||
| 49 | + // namespace 'com.naji.one_key' | ||
| 50 | + | ||
| 49 | compileOptions { | 51 | compileOptions { |
| 50 | sourceCompatibility JavaVersion.VERSION_1_8 | 52 | sourceCompatibility JavaVersion.VERSION_1_8 |
| 51 | targetCompatibility JavaVersion.VERSION_1_8 | 53 | targetCompatibility JavaVersion.VERSION_1_8 |
| @@ -73,7 +75,7 @@ android { | @@ -73,7 +75,7 @@ android { | ||
| 73 | defaultConfig { | 75 | defaultConfig { |
| 74 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | 76 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). |
| 75 | applicationId "com.naji.one_key" | 77 | applicationId "com.naji.one_key" |
| 76 | - minSdkVersion 21 | 78 | + minSdkVersion 24 |
| 77 | targetSdkVersion 30 | 79 | targetSdkVersion 30 |
| 78 | versionCode flutterVersionCode.toInteger() | 80 | versionCode flutterVersionCode.toInteger() |
| 79 | versionName flutterVersionName | 81 | versionName flutterVersionName |
| @@ -167,12 +169,12 @@ dependencies { | @@ -167,12 +169,12 @@ dependencies { | ||
| 167 | testImplementation 'junit:junit:4.12' | 169 | testImplementation 'junit:junit:4.12' |
| 168 | androidTestImplementation 'androidx.test:runner:1.1.1' | 170 | androidTestImplementation 'androidx.test:runner:1.1.1' |
| 169 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' | 171 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' |
| 170 | - implementation 'com.tencent.tpns:huawei:1.2.0.3-release'// 华为推送 | ||
| 171 | - implementation 'com.tencent.tpns:xiaomi:1.2.0.3-release' // 小米推送 | ||
| 172 | - implementation 'com.tencent.tpns:oppo:1.2.0.3-release' // OPPO 推送 | ||
| 173 | - implementation 'com.tencent.tpns:vivo:1.2.0.3-release' // vivo 推送 | 172 | + implementation 'com.tencent.tpns:huawei:1.4.4.2-release'// 华为推送 |
| 173 | + implementation 'com.tencent.tpns:xiaomi:1.4.4.2-release' // 小米推送 | ||
| 174 | + implementation 'com.tencent.tpns:oppo:1.4.4.2-release' // OPPO 推送 | ||
| 175 | + implementation 'com.tencent.tpns:vivo:1.4.4.2-release' // vivo 推送 | ||
| 174 | implementation 'com.amap.api:location:4.7.0' | 176 | implementation 'com.amap.api:location:4.7.0' |
| 175 | - implementation 'com.zhihu.android:matisse:0.5.3-beta3' | 177 | + // implementation 'com.zhihu.android:matisse:0.5.3-beta3' |
| 176 | implementation 'com.github.bumptech.glide:glide:4.11.0' | 178 | implementation 'com.github.bumptech.glide:glide:4.11.0' |
| 177 | annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0' | 179 | annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0' |
| 178 | } | 180 | } |
| @@ -9,6 +9,11 @@ | @@ -9,6 +9,11 @@ | ||
| 9 | -keep class com.tencent.bigdata.baseapi.** {*;} | 9 | -keep class com.tencent.bigdata.baseapi.** {*;} |
| 10 | -keep class com.tencent.bigdata.mqttchannel.** {*;} | 10 | -keep class com.tencent.bigdata.mqttchannel.** {*;} |
| 11 | 11 | ||
| 12 | +-keep class com.tencent.tpns.baseapi.** {*;} | ||
| 13 | + | ||
| 14 | + | ||
| 15 | + | ||
| 16 | + | ||
| 12 | #-ignorewarning | 17 | #-ignorewarning |
| 13 | -keepattributes *Annotation* | 18 | -keepattributes *Annotation* |
| 14 | -keepattributes Exceptions | 19 | -keepattributes Exceptions |
| 1 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" | 1 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
| 2 | xmlns:tools="http://schemas.android.com/tools" | 2 | xmlns:tools="http://schemas.android.com/tools" |
| 3 | - package="com.naji.one_key"> | 3 | + package="com.naji.one_key" |
| 4 | + > | ||
| 4 | <!-- io.flutter.app.FlutterApplication is an android.app.Application that | 5 | <!-- io.flutter.app.FlutterApplication is an android.app.Application that |
| 5 | calls FlutterMain.startInitialization(this); in its onCreate method. | 6 | calls FlutterMain.startInitialization(this); in its onCreate method. |
| 6 | In most cases you can leave this as-is, but you if you want to provide | 7 | 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' | @@ -11,6 +11,7 @@ ext.kotlin_version = '1.8.22' | ||
| 11 | repositories { | 11 | repositories { |
| 12 | google() | 12 | google() |
| 13 | jcenter() | 13 | jcenter() |
| 14 | + mavenCentral() | ||
| 14 | 15 | ||
| 15 | 16 | ||
| 16 | maven{ | 17 | maven{ |
| @@ -77,6 +78,6 @@ subprojects { | @@ -77,6 +78,6 @@ subprojects { | ||
| 77 | } | 78 | } |
| 78 | } | 79 | } |
| 79 | 80 | ||
| 80 | -task clean(type: Delete) { | 81 | +tasks.register("clean", Delete) { |
| 81 | delete rootProject.buildDir | 82 | delete rootProject.buildDir |
| 82 | } | 83 | } |
| 1 | + | ||
| 2 | + | ||
| 1 | import 'package:fluro/fluro.dart'; | 3 | import 'package:fluro/fluro.dart'; |
| 2 | import 'package:flutter/material.dart' hide Router; | 4 | import 'package:flutter/material.dart' hide Router; |
| 3 | import 'package:get_it/get_it.dart'; | 5 | import 'package:get_it/get_it.dart'; |
| @@ -5,14 +7,15 @@ import 'package:shared_preferences/shared_preferences.dart'; | @@ -5,14 +7,15 @@ import 'package:shared_preferences/shared_preferences.dart'; | ||
| 5 | 7 | ||
| 6 | import 'route/navigate_service.dart'; | 8 | import 'route/navigate_service.dart'; |
| 7 | 9 | ||
| 10 | + | ||
| 8 | class App { | 11 | class App { |
| 9 | - static FluroRouter router; | 12 | + static late FluroRouter router; |
| 10 | static GlobalKey<NavigatorState> key = GlobalKey(); | 13 | static GlobalKey<NavigatorState> key = GlobalKey(); |
| 11 | - static SharedPreferences sp; | ||
| 12 | - static double screenWidth; | ||
| 13 | - static double screenHeight; | ||
| 14 | - static double statusBarHeight; | ||
| 15 | - static double bottomBarHeight; | 14 | + static SharedPreferences? sp; |
| 15 | + static double? screenWidth; | ||
| 16 | + static double? screenHeight; | ||
| 17 | + static late double statusBarHeight; | ||
| 18 | + static double? bottomBarHeight; | ||
| 16 | // static GetIt getIt = GetIt.instance; | 19 | // static GetIt getIt = GetIt.instance; |
| 17 | static bool isInstallWx = false; | 20 | static bool isInstallWx = false; |
| 18 | static bool isInstallWWork = false; | 21 | static bool isInstallWWork = false; |
| @@ -22,7 +22,9 @@ Map<String, LibraryLoader> _deferredLibraries = { | @@ -22,7 +22,9 @@ Map<String, LibraryLoader> _deferredLibraries = { | ||
| 22 | 'en': () => new Future.value(null), | 22 | 'en': () => new Future.value(null), |
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | -MessageLookupByLibrary _findExact(String localeName) { | 25 | + |
| 26 | + | ||
| 27 | +MessageLookupByLibrary? _findExact(String localeName) { | ||
| 26 | switch (localeName) { | 28 | switch (localeName) { |
| 27 | case 'en': | 29 | case 'en': |
| 28 | return messages_en.messages; | 30 | return messages_en.messages; |
| @@ -55,7 +57,7 @@ bool _messagesExistFor(String locale) { | @@ -55,7 +57,7 @@ bool _messagesExistFor(String locale) { | ||
| 55 | } | 57 | } |
| 56 | } | 58 | } |
| 57 | 59 | ||
| 58 | -MessageLookupByLibrary _findGeneratedMessagesFor(String locale) { | 60 | +MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) { |
| 59 | var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor, | 61 | var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor, |
| 60 | onFailure: (_) => null); | 62 | onFailure: (_) => null); |
| 61 | if (actualLocale == null) return null; | 63 | if (actualLocale == null) return null; |
| @@ -19,7 +19,7 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args); | @@ -19,7 +19,7 @@ typedef String MessageIfAbsent(String messageStr, List<dynamic> args); | ||
| 19 | class MessageLookup extends MessageLookupByLibrary { | 19 | class MessageLookup extends MessageLookupByLibrary { |
| 20 | String get localeName => 'en'; | 20 | String get localeName => 'en'; |
| 21 | 21 | ||
| 22 | - final messages = _notInlinedMessages(_notInlinedMessages); | 22 | + final Map<String, dynamic> messages = _notInlinedMessages(_notInlinedMessages); |
| 23 | static _notInlinedMessages(_) => <String, Function> { | 23 | static _notInlinedMessages(_) => <String, Function> { |
| 24 | 24 | ||
| 25 | }; | 25 | }; |
| 1 | // GENERATED CODE - DO NOT MODIFY BY HAND | 1 | // GENERATED CODE - DO NOT MODIFY BY HAND |
| 2 | + | ||
| 3 | +import 'dart:async'; | ||
| 4 | + | ||
| 2 | import 'package:flutter/material.dart'; | 5 | import 'package:flutter/material.dart'; |
| 3 | import 'package:intl/intl.dart'; | 6 | import 'package:intl/intl.dart'; |
| 4 | import 'intl/messages_all.dart'; | 7 | import 'intl/messages_all.dart'; |
| @@ -15,7 +18,7 @@ import 'intl/messages_all.dart'; | @@ -15,7 +18,7 @@ import 'intl/messages_all.dart'; | ||
| 15 | class S { | 18 | class S { |
| 16 | S(); | 19 | S(); |
| 17 | 20 | ||
| 18 | - static S current; | 21 | + static late S current; |
| 19 | 22 | ||
| 20 | static const AppLocalizationDelegate delegate = | 23 | static const AppLocalizationDelegate delegate = |
| 21 | AppLocalizationDelegate(); | 24 | AppLocalizationDelegate(); |
| @@ -31,7 +34,7 @@ class S { | @@ -31,7 +34,7 @@ class S { | ||
| 31 | }); | 34 | }); |
| 32 | } | 35 | } |
| 33 | 36 | ||
| 34 | - static S of(BuildContext context) { | 37 | + static S? of(BuildContext context) { |
| 35 | return Localizations.of<S>(context, S); | 38 | return Localizations.of<S>(context, S); |
| 36 | } | 39 | } |
| 37 | 40 |
| 1 | +import 'dart:async'; | ||
| 1 | import 'dart:io'; | 2 | import 'dart:io'; |
| 2 | 3 | ||
| 3 | import 'package:amap_map_fluttify/amap_map_fluttify.dart'; | 4 | import 'package:amap_map_fluttify/amap_map_fluttify.dart'; |
| @@ -69,7 +70,7 @@ import 'package:flutter_localizations/flutter_localizations.dart'; | @@ -69,7 +70,7 @@ import 'package:flutter_localizations/flutter_localizations.dart'; | ||
| 69 | // print(results.toString()); | 70 | // print(results.toString()); |
| 70 | // } | 71 | // } |
| 71 | 72 | ||
| 72 | -Future<void> main() async { | 73 | +FutureOr<void> main() async { |
| 73 | FlutterBugly.postCatchedException(() async { | 74 | FlutterBugly.postCatchedException(() async { |
| 74 | WidgetsFlutterBinding.ensureInitialized(); | 75 | WidgetsFlutterBinding.ensureInitialized(); |
| 75 | FluroRouter router = FluroRouter(); | 76 | FluroRouter router = FluroRouter(); |
| @@ -234,7 +235,7 @@ class MyAppState extends State<MyApp> { | @@ -234,7 +235,7 @@ class MyAppState extends State<MyApp> { | ||
| 234 | 235 | ||
| 235 | //第一次打开应用 | 236 | //第一次打开应用 |
| 236 | _isFirst() async { | 237 | _isFirst() async { |
| 237 | - isFirst = App.sp.getBool("isFirst") ?? true; | 238 | + isFirst = App.sp!.getBool("isFirst") ?? true; |
| 238 | 239 | ||
| 239 | if (!isFirst) { | 240 | if (!isFirst) { |
| 240 | await _ontherInit(); | 241 | await _ontherInit(); |
| @@ -260,7 +261,7 @@ class MyAppState extends State<MyApp> { | @@ -260,7 +261,7 @@ class MyAppState extends State<MyApp> { | ||
| 260 | _isLogin() { | 261 | _isLogin() { |
| 261 | // UserModel userModel = Provider.of<UserModel>(context, listen: false); | 262 | // UserModel userModel = Provider.of<UserModel>(context, listen: false); |
| 262 | // userModel.initUser(); | 263 | // userModel.initUser(); |
| 263 | - isLogin = App.sp.getBool("isLogin") ?? false; | 264 | + isLogin = App.sp!.getBool("isLogin") ?? false; |
| 264 | } | 265 | } |
| 265 | 266 | ||
| 266 | @override | 267 | @override |
| @@ -291,11 +292,12 @@ class MyAppState extends State<MyApp> { | @@ -291,11 +292,12 @@ class MyAppState extends State<MyApp> { | ||
| 291 | Locale('en', 'US'), | 292 | Locale('en', 'US'), |
| 292 | ], | 293 | ], |
| 293 | theme: ThemeData( | 294 | theme: ThemeData( |
| 295 | + useMaterial3: false, | ||
| 294 | brightness: Brightness.light, | 296 | brightness: Brightness.light, |
| 295 | primaryColor: Colors.white, | 297 | primaryColor: Colors.white, |
| 296 | splashColor: Colors.transparent, | 298 | splashColor: Colors.transparent, |
| 297 | textTheme: TextTheme( | 299 | textTheme: TextTheme( |
| 298 | - overline: TextStyle(decoration: TextDecoration.none)), | 300 | + labelSmall: TextStyle(decoration: TextDecoration.none)), |
| 299 | tooltipTheme: TooltipThemeData(verticalOffset: -100000)), | 301 | tooltipTheme: TooltipThemeData(verticalOffset: -100000)), |
| 300 | home: isFirst | 302 | home: isFirst |
| 301 | ? FirstPage() | 303 | ? FirstPage() |
| 1 | + | ||
| 1 | import 'package:common_utils/common_utils.dart'; | 2 | import 'package:common_utils/common_utils.dart'; |
| 2 | 3 | ||
| 3 | import '../utils/utils.dart'; | 4 | import '../utils/utils.dart'; |
| 4 | 5 | ||
| 5 | class GetBanquetByTimeModel { | 6 | class GetBanquetByTimeModel { |
| 6 | - int ret; | ||
| 7 | - List<GetBanquetByTimeSunModel> data; | ||
| 8 | - String msg; | 7 | + int? ret; |
| 8 | + List<GetBanquetByTimeSunModel>? data; | ||
| 9 | + String? msg; | ||
| 9 | 10 | ||
| 10 | GetBanquetByTimeModel({this.ret, this.data, this.msg}); | 11 | GetBanquetByTimeModel({this.ret, this.data, this.msg}); |
| 11 | 12 | ||
| @@ -14,7 +15,7 @@ class GetBanquetByTimeModel { | @@ -14,7 +15,7 @@ class GetBanquetByTimeModel { | ||
| 14 | if (json['data'] != null) { | 15 | if (json['data'] != null) { |
| 15 | data = <GetBanquetByTimeSunModel>[]; | 16 | data = <GetBanquetByTimeSunModel>[]; |
| 16 | json['data'].forEach((v) { | 17 | json['data'].forEach((v) { |
| 17 | - data.add(new GetBanquetByTimeSunModel.fromJson(v)); | 18 | + data!.add(new GetBanquetByTimeSunModel.fromJson(v)); |
| 18 | }); | 19 | }); |
| 19 | } | 20 | } |
| 20 | msg = json['msg']; | 21 | msg = json['msg']; |
| @@ -24,7 +25,7 @@ class GetBanquetByTimeModel { | @@ -24,7 +25,7 @@ class GetBanquetByTimeModel { | ||
| 24 | final Map<String, dynamic> data = new Map<String, dynamic>(); | 25 | final Map<String, dynamic> data = new Map<String, dynamic>(); |
| 25 | data['ret'] = this.ret; | 26 | data['ret'] = this.ret; |
| 26 | if (this.data != null) { | 27 | if (this.data != null) { |
| 27 | - data['data'] = this.data.map((v) => v.toJson()).toList(); | 28 | + data['data'] = this.data!.map((v) => v.toJson()).toList(); |
| 28 | } | 29 | } |
| 29 | data['msg'] = this.msg; | 30 | data['msg'] = this.msg; |
| 30 | return data; | 31 | return data; |
| @@ -32,21 +33,21 @@ class GetBanquetByTimeModel { | @@ -32,21 +33,21 @@ class GetBanquetByTimeModel { | ||
| 32 | } | 33 | } |
| 33 | 34 | ||
| 34 | class GetBanquetByTimeSunModel { | 35 | class GetBanquetByTimeSunModel { |
| 35 | - String id; | ||
| 36 | - String rname; | ||
| 37 | - String sex; | ||
| 38 | - String phone; | ||
| 39 | - String staffId; | ||
| 40 | - String ddate; | ||
| 41 | - String classifyId; | ||
| 42 | - String className; | ||
| 43 | - String nickName; | ||
| 44 | - String account; | ||
| 45 | - List<SessionByTime> list; | 36 | + String? id; |
| 37 | + String? rname; | ||
| 38 | + String? sex; | ||
| 39 | + String? phone; | ||
| 40 | + String? staffId; | ||
| 41 | + String? ddate; | ||
| 42 | + String? classifyId; | ||
| 43 | + String? className; | ||
| 44 | + String? nickName; | ||
| 45 | + String? account; | ||
| 46 | + List<SessionByTime>? list; | ||
| 46 | 47 | ||
| 47 | String get ddateStr { | 48 | String get ddateStr { |
| 48 | DateTime dateTime = | 49 | DateTime dateTime = |
| 49 | - DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000); | 50 | + DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000); |
| 50 | return '${dateTime.month}月${dateTime.day}日'; | 51 | return '${dateTime.month}月${dateTime.day}日'; |
| 51 | } | 52 | } |
| 52 | 53 | ||
| @@ -77,7 +78,7 @@ class GetBanquetByTimeSunModel { | @@ -77,7 +78,7 @@ class GetBanquetByTimeSunModel { | ||
| 77 | if (json['list'] != null) { | 78 | if (json['list'] != null) { |
| 78 | list = <SessionByTime>[]; | 79 | list = <SessionByTime>[]; |
| 79 | json['list'].forEach((v) { | 80 | json['list'].forEach((v) { |
| 80 | - list.add(new SessionByTime.fromJson(v)); | 81 | + list!.add(new SessionByTime.fromJson(v)); |
| 81 | }); | 82 | }); |
| 82 | } | 83 | } |
| 83 | } | 84 | } |
| @@ -95,30 +96,30 @@ class GetBanquetByTimeSunModel { | @@ -95,30 +96,30 @@ class GetBanquetByTimeSunModel { | ||
| 95 | data['nick_name'] = this.nickName; | 96 | data['nick_name'] = this.nickName; |
| 96 | data['account'] = this.account; | 97 | data['account'] = this.account; |
| 97 | if (this.list != null) { | 98 | if (this.list != null) { |
| 98 | - data['list'] = this.list.map((v) => v.toJson()).toList(); | 99 | + data['list'] = this.list!.map((v) => v.toJson()).toList(); |
| 99 | } | 100 | } |
| 100 | return data; | 101 | return data; |
| 101 | } | 102 | } |
| 102 | } | 103 | } |
| 103 | 104 | ||
| 104 | class SessionByTime { | 105 | class SessionByTime { |
| 105 | - String reserveOrder; | ||
| 106 | - String ddateInterval; | ||
| 107 | - String rdate; | ||
| 108 | - String edate; | ||
| 109 | - String tids; | ||
| 110 | - List<String> tableName; | 106 | + String? reserveOrder; |
| 107 | + String? ddateInterval; | ||
| 108 | + String? rdate; | ||
| 109 | + String? edate; | ||
| 110 | + String? tids; | ||
| 111 | + List<String>? tableName; | ||
| 111 | String get ddateStr { | 112 | String get ddateStr { |
| 112 | - if (rdate.length > 11) { | 113 | + if (rdate!.length > 11) { |
| 113 | return ''; | 114 | return ''; |
| 114 | } | 115 | } |
| 115 | if (ddateInterval == '0') { | 116 | if (ddateInterval == '0') { |
| 116 | //不带餐 | 117 | //不带餐 |
| 117 | 118 | ||
| 118 | DateTime dateS = | 119 | DateTime dateS = |
| 119 | - DateTime.fromMillisecondsSinceEpoch(int.parse(rdate) * 1000); | 120 | + DateTime.fromMillisecondsSinceEpoch(int.parse(rdate!) * 1000); |
| 120 | DateTime dateE = | 121 | DateTime dateE = |
| 121 | - DateTime.fromMillisecondsSinceEpoch(int.parse(edate) * 1000); | 122 | + DateTime.fromMillisecondsSinceEpoch(int.parse(edate!) * 1000); |
| 122 | String ymd = DateUtil.formatDate(dateS, format: DateFormats.y_mo_d); | 123 | String ymd = DateUtil.formatDate(dateS, format: DateFormats.y_mo_d); |
| 123 | String start = '${Utils.addZeroNumber(dateS.hour)}:${Utils.addZeroNumber(dateS.minute)}'; | 124 | String start = '${Utils.addZeroNumber(dateS.hour)}:${Utils.addZeroNumber(dateS.minute)}'; |
| 124 | String end = '${Utils.addZeroNumber(dateE.hour)}:${Utils.addZeroNumber(dateE.minute)}'; | 125 | String end = '${Utils.addZeroNumber(dateE.hour)}:${Utils.addZeroNumber(dateE.minute)}'; |
| @@ -126,7 +127,7 @@ class SessionByTime { | @@ -126,7 +127,7 @@ class SessionByTime { | ||
| 126 | return ymd + ' ' + start + '-' + end; | 127 | return ymd + ' ' + start + '-' + end; |
| 127 | } else { | 128 | } else { |
| 128 | DateTime dateS = | 129 | DateTime dateS = |
| 129 | - DateTime.fromMillisecondsSinceEpoch(int.parse(rdate) * 1000); | 130 | + DateTime.fromMillisecondsSinceEpoch(int.parse(rdate!) * 1000); |
| 130 | // DateTime dateE = | 131 | // DateTime dateE = |
| 131 | // DateTime.fromMillisecondsSinceEpoch(int.parse(temp[1]) * 1000); | 132 | // DateTime.fromMillisecondsSinceEpoch(int.parse(temp[1]) * 1000); |
| 132 | String ymd = DateUtil.formatDate(dateS, format: DateFormats.y_mo_d); | 133 | String ymd = DateUtil.formatDate(dateS, format: DateFormats.y_mo_d); |
| 1 | + | ||
| 1 | import 'dart:convert' as convert; | 2 | import 'dart:convert' as convert; |
| 2 | 3 | ||
| 3 | class GetDzSellerConfModel { | 4 | class GetDzSellerConfModel { |
| 4 | - int ret; | ||
| 5 | - GetDzSellerConfSunModel data; | ||
| 6 | - String msg; | 5 | + int? ret; |
| 6 | + GetDzSellerConfSunModel? data; | ||
| 7 | + String? msg; | ||
| 7 | 8 | ||
| 8 | GetDzSellerConfModel({this.ret, this.data, this.msg}); | 9 | GetDzSellerConfModel({this.ret, this.data, this.msg}); |
| 9 | 10 | ||
| @@ -19,7 +20,7 @@ class GetDzSellerConfModel { | @@ -19,7 +20,7 @@ class GetDzSellerConfModel { | ||
| 19 | final Map<String, dynamic> data = new Map<String, dynamic>(); | 20 | final Map<String, dynamic> data = new Map<String, dynamic>(); |
| 20 | data['ret'] = this.ret; | 21 | data['ret'] = this.ret; |
| 21 | if (this.data != null) { | 22 | if (this.data != null) { |
| 22 | - data['data'] = this.data.toJson(); | 23 | + data['data'] = this.data!.toJson(); |
| 23 | } | 24 | } |
| 24 | data['msg'] = this.msg; | 25 | data['msg'] = this.msg; |
| 25 | return data; | 26 | return data; |
| @@ -27,56 +28,56 @@ class GetDzSellerConfModel { | @@ -27,56 +28,56 @@ class GetDzSellerConfModel { | ||
| 27 | } | 28 | } |
| 28 | 29 | ||
| 29 | class GetDzSellerConfSunModel { | 30 | class GetDzSellerConfSunModel { |
| 30 | - String id; | ||
| 31 | - String sid; | ||
| 32 | - String isSms; | ||
| 33 | - String templateId; | ||
| 34 | - String isOpenOrder; | ||
| 35 | - String isOpenWine; | ||
| 36 | - String dzVersion; | ||
| 37 | - String isCheckedCall; | ||
| 38 | - String isCheckedApp; | ||
| 39 | - String isCheckedLite; | ||
| 40 | - String reserveMode; | ||
| 41 | - String isDisplayDish; | ||
| 42 | - String isNewTemplate; | ||
| 43 | - AllCookStyle cookStyle; | ||
| 44 | - String cdate; | ||
| 45 | - String isStoreSms; | ||
| 46 | - String storeDate; | ||
| 47 | - | ||
| 48 | - String isShowPrice; | ||
| 49 | - String isOpenCancel; | ||
| 50 | - | ||
| 51 | - String isNotice; | ||
| 52 | - String isMarketing; | ||
| 53 | - | ||
| 54 | - String saiyouyun; | ||
| 55 | - Bookinginfo bookinginfo; | ||
| 56 | - String isAllowUpdate; | ||
| 57 | - List<String> isShowRnamePhone; | ||
| 58 | - | ||
| 59 | - String isShowNoticeDeposit; | ||
| 60 | - String depositPrice; | ||
| 61 | - String liteStyle; | ||
| 62 | - | ||
| 63 | - String liteStyleTitle; | ||
| 64 | - | ||
| 65 | - String storePushMeg; | ||
| 66 | - String storePushSms; | ||
| 67 | - | ||
| 68 | - String pcNotPhone; | ||
| 69 | - String pcNotName; | ||
| 70 | - String isCustomerCancel; | ||
| 71 | - | ||
| 72 | - String isAddOver; //是否允许新建过去订单 | ||
| 73 | - String isSetOver; //是否允许修改过去订单 | ||
| 74 | - String isReserveOver; //是否允许变更订单到过去餐段 | ||
| 75 | - | ||
| 76 | - String cancelDay; | ||
| 77 | - String cancelShopowner; | ||
| 78 | - String cancelManager; | ||
| 79 | - String cancelOther; | 31 | + String? id; |
| 32 | + String? sid; | ||
| 33 | + String? isSms; | ||
| 34 | + String? templateId; | ||
| 35 | + String? isOpenOrder; | ||
| 36 | + String? isOpenWine; | ||
| 37 | + String? dzVersion; | ||
| 38 | + String? isCheckedCall; | ||
| 39 | + String? isCheckedApp; | ||
| 40 | + String? isCheckedLite; | ||
| 41 | + String? reserveMode; | ||
| 42 | + String? isDisplayDish; | ||
| 43 | + String? isNewTemplate; | ||
| 44 | + AllCookStyle? cookStyle; | ||
| 45 | + String? cdate; | ||
| 46 | + String? isStoreSms; | ||
| 47 | + String? storeDate; | ||
| 48 | + | ||
| 49 | + String? isShowPrice; | ||
| 50 | + String? isOpenCancel; | ||
| 51 | + | ||
| 52 | + String? isNotice; | ||
| 53 | + String? isMarketing; | ||
| 54 | + | ||
| 55 | + String? saiyouyun; | ||
| 56 | + Bookinginfo? bookinginfo; | ||
| 57 | + String? isAllowUpdate; | ||
| 58 | + List<String>? isShowRnamePhone; | ||
| 59 | + | ||
| 60 | + String? isShowNoticeDeposit; | ||
| 61 | + String? depositPrice; | ||
| 62 | + String? liteStyle; | ||
| 63 | + | ||
| 64 | + String? liteStyleTitle; | ||
| 65 | + | ||
| 66 | + String? storePushMeg; | ||
| 67 | + String? storePushSms; | ||
| 68 | + | ||
| 69 | + String? pcNotPhone; | ||
| 70 | + String? pcNotName; | ||
| 71 | + String? isCustomerCancel; | ||
| 72 | + | ||
| 73 | + String? isAddOver; //是否允许新建过去订单 | ||
| 74 | + String? isSetOver; //是否允许修改过去订单 | ||
| 75 | + String? isReserveOver; //是否允许变更订单到过去餐段 | ||
| 76 | + | ||
| 77 | + String? cancelDay; | ||
| 78 | + String? cancelShopowner; | ||
| 79 | + String? cancelManager; | ||
| 80 | + String? cancelOther; | ||
| 80 | 81 | ||
| 81 | GetDzSellerConfSunModel( | 82 | GetDzSellerConfSunModel( |
| 82 | {this.id, | 83 | {this.id, |
| @@ -156,7 +157,7 @@ class GetDzSellerConfSunModel { | @@ -156,7 +157,7 @@ class GetDzSellerConfSunModel { | ||
| 156 | if (json['is_show_ranme_phone'] != null && | 157 | if (json['is_show_ranme_phone'] != null && |
| 157 | json['is_show_ranme_phone'] != '') { | 158 | json['is_show_ranme_phone'] != '') { |
| 158 | convert.json.decode(json['is_show_ranme_phone']).forEach((v) { | 159 | convert.json.decode(json['is_show_ranme_phone']).forEach((v) { |
| 159 | - isShowRnamePhone.add(v); | 160 | + isShowRnamePhone!.add(v); |
| 160 | }); | 161 | }); |
| 161 | } | 162 | } |
| 162 | isShowNoticeDeposit = json['is_show_notice_deposit']; | 163 | isShowNoticeDeposit = json['is_show_notice_deposit']; |
| @@ -204,7 +205,7 @@ class GetDzSellerConfSunModel { | @@ -204,7 +205,7 @@ class GetDzSellerConfSunModel { | ||
| 204 | data['is_seller_marketing'] = this.isMarketing; | 205 | data['is_seller_marketing'] = this.isMarketing; |
| 205 | data['saiyouyun'] = this.saiyouyun; | 206 | data['saiyouyun'] = this.saiyouyun; |
| 206 | if (this.bookinginfo != null) { | 207 | if (this.bookinginfo != null) { |
| 207 | - data['bookinginfo'] = this.bookinginfo.toJson(); | 208 | + data['bookinginfo'] = this.bookinginfo!.toJson(); |
| 208 | } | 209 | } |
| 209 | data['is_allow_update'] = this.isAllowUpdate; | 210 | data['is_allow_update'] = this.isAllowUpdate; |
| 210 | data['is_show_ranme_phone'] = this.isShowRnamePhone; | 211 | data['is_show_ranme_phone'] = this.isShowRnamePhone; |
| @@ -232,9 +233,9 @@ class GetDzSellerConfSunModel { | @@ -232,9 +233,9 @@ class GetDzSellerConfSunModel { | ||
| 232 | } | 233 | } |
| 233 | 234 | ||
| 234 | class InputSetting { | 235 | class InputSetting { |
| 235 | - String uid; | ||
| 236 | - String isShowName; | ||
| 237 | - String isShowPhone; | 236 | + String? uid; |
| 237 | + String? isShowName; | ||
| 238 | + String? isShowPhone; | ||
| 238 | 239 | ||
| 239 | InputSetting({this.uid, this.isShowName, this.isShowPhone}); | 240 | InputSetting({this.uid, this.isShowName, this.isShowPhone}); |
| 240 | 241 | ||
| @@ -254,10 +255,10 @@ class InputSetting { | @@ -254,10 +255,10 @@ class InputSetting { | ||
| 254 | } | 255 | } |
| 255 | 256 | ||
| 256 | class Bookinginfo { | 257 | class Bookinginfo { |
| 257 | - String id; | ||
| 258 | - String sid; | ||
| 259 | - String smsCode; | ||
| 260 | - String content; | 258 | + String? id; |
| 259 | + String? sid; | ||
| 260 | + String? smsCode; | ||
| 261 | + String? content; | ||
| 261 | 262 | ||
| 262 | Bookinginfo({this.id, this.sid, this.smsCode, this.content}); | 263 | Bookinginfo({this.id, this.sid, this.smsCode, this.content}); |
| 263 | 264 | ||
| @@ -279,8 +280,8 @@ class Bookinginfo { | @@ -279,8 +280,8 @@ class Bookinginfo { | ||
| 279 | } | 280 | } |
| 280 | 281 | ||
| 281 | class AllCookStyle { | 282 | class AllCookStyle { |
| 282 | - String menuThemeColor; | ||
| 283 | - String index; | 283 | + String? menuThemeColor; |
| 284 | + String? index; | ||
| 284 | 285 | ||
| 285 | AllCookStyle({ | 286 | AllCookStyle({ |
| 286 | this.menuThemeColor, | 287 | this.menuThemeColor, |
| 1 | + | ||
| 1 | import 'dart:convert'; | 2 | import 'dart:convert'; |
| 2 | 3 | ||
| 3 | import 'package:common_utils/common_utils.dart'; | 4 | import 'package:common_utils/common_utils.dart'; |
| 4 | import 'package:one_key/models/coupon_model.dart'; | 5 | import 'package:one_key/models/coupon_model.dart'; |
| 5 | 6 | ||
| 6 | class IsExamineModel { | 7 | class IsExamineModel { |
| 7 | - int ret; | ||
| 8 | - List<IsExamineSunModel> data; | ||
| 9 | - String msg; | 8 | + int? ret; |
| 9 | + List<IsExamineSunModel>? data; | ||
| 10 | + String? msg; | ||
| 10 | 11 | ||
| 11 | IsExamineModel({this.ret, this.data, this.msg}); | 12 | IsExamineModel({this.ret, this.data, this.msg}); |
| 12 | 13 | ||
| @@ -15,7 +16,7 @@ class IsExamineModel { | @@ -15,7 +16,7 @@ class IsExamineModel { | ||
| 15 | if (json['data'] != null) { | 16 | if (json['data'] != null) { |
| 16 | data = []; | 17 | data = []; |
| 17 | json['data'].forEach((v) { | 18 | json['data'].forEach((v) { |
| 18 | - data.add(new IsExamineSunModel.fromJson(v)); | 19 | + data!.add(new IsExamineSunModel.fromJson(v)); |
| 19 | }); | 20 | }); |
| 20 | } | 21 | } |
| 21 | msg = json['msg']; | 22 | msg = json['msg']; |
| @@ -25,7 +26,7 @@ class IsExamineModel { | @@ -25,7 +26,7 @@ class IsExamineModel { | ||
| 25 | final Map<String, dynamic> data = new Map<String, dynamic>(); | 26 | final Map<String, dynamic> data = new Map<String, dynamic>(); |
| 26 | data['ret'] = this.ret; | 27 | data['ret'] = this.ret; |
| 27 | if (this.data != null) { | 28 | if (this.data != null) { |
| 28 | - data['data'] = this.data.map((v) => v.toJson()).toList(); | 29 | + data['data'] = this.data!.map((v) => v.toJson()).toList(); |
| 29 | } | 30 | } |
| 30 | data['msg'] = this.msg; | 31 | data['msg'] = this.msg; |
| 31 | return data; | 32 | return data; |
| @@ -33,35 +34,35 @@ class IsExamineModel { | @@ -33,35 +34,35 @@ class IsExamineModel { | ||
| 33 | } | 34 | } |
| 34 | 35 | ||
| 35 | class IsExamineSunModel { | 36 | class IsExamineSunModel { |
| 36 | - String id; | ||
| 37 | - String status; | ||
| 38 | - String rechargeId; | ||
| 39 | - String rechargeName; | ||
| 40 | - String price; | ||
| 41 | - String sellerid; | ||
| 42 | - String sellername; | ||
| 43 | - String openid; | ||
| 44 | - String orderNo; | ||
| 45 | - String combineOutTradeNo; | ||
| 46 | - String outTradeNo; | 37 | + String? id; |
| 38 | + String? status; | ||
| 39 | + String? rechargeId; | ||
| 40 | + String? rechargeName; | ||
| 41 | + String? price; | ||
| 42 | + String? sellerid; | ||
| 43 | + String? sellername; | ||
| 44 | + String? openid; | ||
| 45 | + String? orderNo; | ||
| 46 | + String? combineOutTradeNo; | ||
| 47 | + String? outTradeNo; | ||
| 47 | dynamic outRefundNo; | 48 | dynamic outRefundNo; |
| 48 | - ExpDate expDate; | ||
| 49 | - String stime; | ||
| 50 | - String etime; | ||
| 51 | - String transactionId; | 49 | + ExpDate? expDate; |
| 50 | + String? stime; | ||
| 51 | + String? etime; | ||
| 52 | + String? transactionId; | ||
| 52 | dynamic refundId; | 53 | dynamic refundId; |
| 53 | dynamic reOutTradeNo; | 54 | dynamic reOutTradeNo; |
| 54 | - String tradeState; | 55 | + String? tradeState; |
| 55 | dynamic tradeStateDesc; | 56 | dynamic tradeStateDesc; |
| 56 | - String qrcode; | ||
| 57 | - String isExamine; | 57 | + String? qrcode; |
| 58 | + String? isExamine; | ||
| 58 | dynamic examineName; | 59 | dynamic examineName; |
| 59 | dynamic examineTime; | 60 | dynamic examineTime; |
| 60 | - String isComment; | ||
| 61 | - String type; | ||
| 62 | - String cdate; | ||
| 63 | - String desc; | ||
| 64 | - String explain; | 61 | + String? isComment; |
| 62 | + String? type; | ||
| 63 | + String? cdate; | ||
| 64 | + String? desc; | ||
| 65 | + String? explain; | ||
| 65 | 66 | ||
| 66 | String get examineTimeStr { | 67 | String get examineTimeStr { |
| 67 | if (examineTime == null) { | 68 | if (examineTime == null) { |
| 1 | + | ||
| 1 | import 'package:json_annotation/json_annotation.dart'; | 2 | import 'package:json_annotation/json_annotation.dart'; |
| 2 | 3 | ||
| 3 | part 'add_forward_model.g.dart'; | 4 | part 'add_forward_model.g.dart'; |
| @@ -5,13 +6,13 @@ part 'add_forward_model.g.dart'; | @@ -5,13 +6,13 @@ part 'add_forward_model.g.dart'; | ||
| 5 | @JsonSerializable() | 6 | @JsonSerializable() |
| 6 | class AddForwardModel extends Object { | 7 | class AddForwardModel extends Object { |
| 7 | @JsonKey(name: 'ret') | 8 | @JsonKey(name: 'ret') |
| 8 | - int ret; | 9 | + int? ret; |
| 9 | 10 | ||
| 10 | @JsonKey(name: 'data') | 11 | @JsonKey(name: 'data') |
| 11 | - AddForwardSunModel data; | 12 | + AddForwardSunModel? data; |
| 12 | 13 | ||
| 13 | @JsonKey(name: 'msg') | 14 | @JsonKey(name: 'msg') |
| 14 | - String msg; | 15 | + String? msg; |
| 15 | 16 | ||
| 16 | AddForwardModel( | 17 | AddForwardModel( |
| 17 | this.ret, | 18 | this.ret, |
| @@ -28,19 +29,19 @@ class AddForwardModel extends Object { | @@ -28,19 +29,19 @@ class AddForwardModel extends Object { | ||
| 28 | @JsonSerializable() | 29 | @JsonSerializable() |
| 29 | class AddForwardSunModel extends Object { | 30 | class AddForwardSunModel extends Object { |
| 30 | @JsonKey(name: 'uid') | 31 | @JsonKey(name: 'uid') |
| 31 | - int uid; | 32 | + int? uid; |
| 32 | 33 | ||
| 33 | @JsonKey(name: 'rid') | 34 | @JsonKey(name: 'rid') |
| 34 | - int rid; | 35 | + int? rid; |
| 35 | 36 | ||
| 36 | @JsonKey(name: 'sid') | 37 | @JsonKey(name: 'sid') |
| 37 | - int sid; | 38 | + int? sid; |
| 38 | 39 | ||
| 39 | @JsonKey(name: 'cdate') | 40 | @JsonKey(name: 'cdate') |
| 40 | - int cdate; | 41 | + int? cdate; |
| 41 | 42 | ||
| 42 | @JsonKey(name: 'id') | 43 | @JsonKey(name: 'id') |
| 43 | - String id; | 44 | + String? id; |
| 44 | 45 | ||
| 45 | AddForwardSunModel( | 46 | AddForwardSunModel( |
| 46 | this.uid, | 47 | this.uid, |
| @@ -8,11 +8,11 @@ part of 'add_forward_model.dart'; | @@ -8,11 +8,11 @@ part of 'add_forward_model.dart'; | ||
| 8 | 8 | ||
| 9 | AddForwardModel _$AddForwardModelFromJson(Map<String, dynamic> json) { | 9 | AddForwardModel _$AddForwardModelFromJson(Map<String, dynamic> json) { |
| 10 | return AddForwardModel( | 10 | return AddForwardModel( |
| 11 | - json['ret'] as int, | 11 | + json['ret'] as int?, |
| 12 | json['data'] == null | 12 | json['data'] == null |
| 13 | ? null | 13 | ? null |
| 14 | : AddForwardSunModel.fromJson(json['data'] as Map<String, dynamic>), | 14 | : AddForwardSunModel.fromJson(json['data'] as Map<String, dynamic>), |
| 15 | - json['msg'] as String, | 15 | + json['msg'] as String?, |
| 16 | ); | 16 | ); |
| 17 | } | 17 | } |
| 18 | 18 | ||
| @@ -25,11 +25,11 @@ Map<String, dynamic> _$AddForwardModelToJson(AddForwardModel instance) => | @@ -25,11 +25,11 @@ Map<String, dynamic> _$AddForwardModelToJson(AddForwardModel instance) => | ||
| 25 | 25 | ||
| 26 | AddForwardSunModel _$AddForwardSunModelFromJson(Map<String, dynamic> json) { | 26 | AddForwardSunModel _$AddForwardSunModelFromJson(Map<String, dynamic> json) { |
| 27 | return AddForwardSunModel( | 27 | return AddForwardSunModel( |
| 28 | - json['uid'] as int, | ||
| 29 | - json['rid'] as int, | ||
| 30 | - json['sid'] as int, | ||
| 31 | - json['cdate'] as int, | ||
| 32 | - json['id'] as String, | 28 | + json['uid'] as int?, |
| 29 | + json['rid'] as int?, | ||
| 30 | + json['sid'] as int?, | ||
| 31 | + json['cdate'] as int?, | ||
| 32 | + json['id'] as String?, | ||
| 33 | ); | 33 | ); |
| 34 | } | 34 | } |
| 35 | 35 |
| 1 | + | ||
| 1 | import 'package:flutter/material.dart'; | 2 | import 'package:flutter/material.dart'; |
| 2 | import 'package:one_key/models/upload_img_model.dart'; | 3 | import 'package:one_key/models/upload_img_model.dart'; |
| 3 | 4 | ||
| 4 | class AdditionModel { | 5 | class AdditionModel { |
| 5 | - String content; | ||
| 6 | - String type; // 1图片 2文本 | 6 | + String? content; |
| 7 | + String? type; // 1图片 2文本 | ||
| 7 | // int order; //顺序 | 8 | // int order; //顺序 |
| 8 | - UploadImgModel image; | 9 | + late UploadImgModel image; |
| 9 | TextEditingController infoC = TextEditingController(); | 10 | TextEditingController infoC = TextEditingController(); |
| 10 | 11 | ||
| 11 | AdditionModel(); | 12 | AdditionModel(); |
| 1 | + | ||
| 2 | + | ||
| 1 | class AllCuisineModel { | 3 | class AllCuisineModel { |
| 2 | - int ret; | ||
| 3 | - List<AllCuisineSunModel> data; | ||
| 4 | - String msg; | 4 | + int? ret; |
| 5 | + List<AllCuisineSunModel>? data; | ||
| 6 | + String? msg; | ||
| 5 | 7 | ||
| 6 | AllCuisineModel({this.ret, this.data, this.msg}); | 8 | AllCuisineModel({this.ret, this.data, this.msg}); |
| 7 | 9 | ||
| 8 | AllCuisineModel.fromJson(Map<String, dynamic> json) { | 10 | AllCuisineModel.fromJson(Map<String, dynamic> json) { |
| 9 | ret = json['ret']; | 11 | ret = json['ret']; |
| 10 | if (json['data'] != null) { | 12 | if (json['data'] != null) { |
| 11 | - data = new List<AllCuisineSunModel>(); | 13 | + data = []; |
| 12 | json['data'].forEach((v) { | 14 | json['data'].forEach((v) { |
| 13 | - data.add(new AllCuisineSunModel.fromJson(v)); | 15 | + data!.add(new AllCuisineSunModel.fromJson(v)); |
| 14 | }); | 16 | }); |
| 15 | } | 17 | } |
| 16 | msg = json['msg']; | 18 | msg = json['msg']; |
| @@ -20,7 +22,7 @@ class AllCuisineModel { | @@ -20,7 +22,7 @@ class AllCuisineModel { | ||
| 20 | final Map<String, dynamic> data = new Map<String, dynamic>(); | 22 | final Map<String, dynamic> data = new Map<String, dynamic>(); |
| 21 | data['ret'] = this.ret; | 23 | data['ret'] = this.ret; |
| 22 | if (this.data != null) { | 24 | if (this.data != null) { |
| 23 | - data['data'] = this.data.map((v) => v.toJson()).toList(); | 25 | + data['data'] = this.data!.map((v) => v.toJson()).toList(); |
| 24 | } | 26 | } |
| 25 | data['msg'] = this.msg; | 27 | data['msg'] = this.msg; |
| 26 | return data; | 28 | return data; |
| @@ -28,10 +30,10 @@ class AllCuisineModel { | @@ -28,10 +30,10 @@ class AllCuisineModel { | ||
| 28 | } | 30 | } |
| 29 | 31 | ||
| 30 | class AllCuisineSunModel { | 32 | class AllCuisineSunModel { |
| 31 | - String id; | ||
| 32 | - String name; | ||
| 33 | - String icon; | ||
| 34 | - String weight; | 33 | + String? id; |
| 34 | + String? name; | ||
| 35 | + String? icon; | ||
| 36 | + String? weight; | ||
| 35 | bool select = false; | 37 | bool select = false; |
| 36 | 38 | ||
| 37 | AllCuisineSunModel({this.id, this.name, this.icon, this.weight}); | 39 | AllCuisineSunModel({this.id, this.name, this.icon, this.weight}); |
| 1 | + | ||
| 1 | import 'package:json_annotation/json_annotation.dart'; | 2 | import 'package:json_annotation/json_annotation.dart'; |
| 2 | 3 | ||
| 3 | part 'area_model.g.dart'; | 4 | part 'area_model.g.dart'; |
| @@ -7,13 +8,13 @@ part 'area_model.g.dart'; | @@ -7,13 +8,13 @@ part 'area_model.g.dart'; | ||
| 7 | class AreaModel extends Object { | 8 | class AreaModel extends Object { |
| 8 | 9 | ||
| 9 | @JsonKey(name: 'ret') | 10 | @JsonKey(name: 'ret') |
| 10 | - int ret; | 11 | + int? ret; |
| 11 | 12 | ||
| 12 | @JsonKey(name: 'data') | 13 | @JsonKey(name: 'data') |
| 13 | - List<AreaSunModel> data; | 14 | + List<AreaSunModel?>? data; |
| 14 | 15 | ||
| 15 | @JsonKey(name: 'msg') | 16 | @JsonKey(name: 'msg') |
| 16 | - String msg; | 17 | + String? msg; |
| 17 | 18 | ||
| 18 | AreaModel(this.ret,this.data,this.msg,); | 19 | AreaModel(this.ret,this.data,this.msg,); |
| 19 | 20 | ||
| @@ -28,22 +29,22 @@ part 'area_model.g.dart'; | @@ -28,22 +29,22 @@ part 'area_model.g.dart'; | ||
| 28 | class AreaSunModel extends Object { | 29 | class AreaSunModel extends Object { |
| 29 | 30 | ||
| 30 | @JsonKey(name: 'id') | 31 | @JsonKey(name: 'id') |
| 31 | - String id; | 32 | + String? id; |
| 32 | 33 | ||
| 33 | @JsonKey(name: 'sellerid') | 34 | @JsonKey(name: 'sellerid') |
| 34 | - String sellerid; | 35 | + String? sellerid; |
| 35 | 36 | ||
| 36 | @JsonKey(name: 'name') | 37 | @JsonKey(name: 'name') |
| 37 | - String name; | 38 | + String? name; |
| 38 | 39 | ||
| 39 | @JsonKey(name: 'order_o') | 40 | @JsonKey(name: 'order_o') |
| 40 | - String orderO; | 41 | + String? orderO; |
| 41 | 42 | ||
| 42 | @JsonKey(name: 'status') | 43 | @JsonKey(name: 'status') |
| 43 | - String status; | 44 | + String? status; |
| 44 | 45 | ||
| 45 | @JsonKey(name: 'cdate') | 46 | @JsonKey(name: 'cdate') |
| 46 | - String cdate; | 47 | + String? cdate; |
| 47 | 48 | ||
| 48 | AreaSunModel(this.id,this.sellerid,this.name,this.orderO,this.status,this.cdate,); | 49 | AreaSunModel(this.id,this.sellerid,this.name,this.orderO,this.status,this.cdate,); |
| 49 | 50 |
| @@ -8,12 +8,12 @@ part of 'area_model.dart'; | @@ -8,12 +8,12 @@ part of 'area_model.dart'; | ||
| 8 | 8 | ||
| 9 | AreaModel _$AreaModelFromJson(Map<String, dynamic> json) { | 9 | AreaModel _$AreaModelFromJson(Map<String, dynamic> json) { |
| 10 | return AreaModel( | 10 | return AreaModel( |
| 11 | - json['ret'] as int, | ||
| 12 | - (json['data'][0] as List) | 11 | + json['ret'] as int?, |
| 12 | + (json['data'][0] as List?) | ||
| 13 | ?.map((e) => | 13 | ?.map((e) => |
| 14 | e == null ? null : AreaSunModel.fromJson(e as Map<String, dynamic>)) | 14 | e == null ? null : AreaSunModel.fromJson(e as Map<String, dynamic>)) |
| 15 | - ?.toList(), | ||
| 16 | - json['msg'] as String, | 15 | + .toList(), |
| 16 | + json['msg'] as String?, | ||
| 17 | ); | 17 | ); |
| 18 | } | 18 | } |
| 19 | 19 | ||
| @@ -25,12 +25,12 @@ Map<String, dynamic> _$AreaModelToJson(AreaModel instance) => <String, dynamic>{ | @@ -25,12 +25,12 @@ Map<String, dynamic> _$AreaModelToJson(AreaModel instance) => <String, dynamic>{ | ||
| 25 | 25 | ||
| 26 | AreaSunModel _$AreaSunModelFromJson(Map<String, dynamic> json) { | 26 | AreaSunModel _$AreaSunModelFromJson(Map<String, dynamic> json) { |
| 27 | return AreaSunModel( | 27 | return AreaSunModel( |
| 28 | - json['id'] as String, | ||
| 29 | - json['sellerid'] as String, | ||
| 30 | - json['name'] as String, | ||
| 31 | - json['order_o'] as String, | ||
| 32 | - json['status'] as String, | ||
| 33 | - json['cdate'] as String, | 28 | + json['id'] as String?, |
| 29 | + json['sellerid'] as String?, | ||
| 30 | + json['name'] as String?, | ||
| 31 | + json['order_o'] as String?, | ||
| 32 | + json['status'] as String?, | ||
| 33 | + json['cdate'] as String?, | ||
| 34 | ); | 34 | ); |
| 35 | } | 35 | } |
| 36 | 36 |
| 1 | + | ||
| 1 | import 'package:json_annotation/json_annotation.dart'; | 2 | import 'package:json_annotation/json_annotation.dart'; |
| 2 | 3 | ||
| 3 | part 'base_info_model.g.dart'; | 4 | part 'base_info_model.g.dart'; |
| @@ -5,13 +6,13 @@ part 'base_info_model.g.dart'; | @@ -5,13 +6,13 @@ part 'base_info_model.g.dart'; | ||
| 5 | @JsonSerializable() | 6 | @JsonSerializable() |
| 6 | class BaseInfoModel extends Object { | 7 | class BaseInfoModel extends Object { |
| 7 | @JsonKey(name: 'ret') | 8 | @JsonKey(name: 'ret') |
| 8 | - int ret; | 9 | + int? ret; |
| 9 | 10 | ||
| 10 | @JsonKey(name: 'data') | 11 | @JsonKey(name: 'data') |
| 11 | - BaseInfoSunModel data; | 12 | + BaseInfoSunModel? data; |
| 12 | 13 | ||
| 13 | @JsonKey(name: 'msg') | 14 | @JsonKey(name: 'msg') |
| 14 | - String msg; | 15 | + String? msg; |
| 15 | 16 | ||
| 16 | BaseInfoModel( | 17 | BaseInfoModel( |
| 17 | this.ret, | 18 | this.ret, |
| @@ -28,31 +29,31 @@ class BaseInfoModel extends Object { | @@ -28,31 +29,31 @@ class BaseInfoModel extends Object { | ||
| 28 | @JsonSerializable() | 29 | @JsonSerializable() |
| 29 | class BaseInfoSunModel extends Object { | 30 | class BaseInfoSunModel extends Object { |
| 30 | @JsonKey(name: 'id') | 31 | @JsonKey(name: 'id') |
| 31 | - String id; | 32 | + String? id; |
| 32 | 33 | ||
| 33 | @JsonKey(name: 'sellerid') | 34 | @JsonKey(name: 'sellerid') |
| 34 | - String sellerid; | 35 | + String? sellerid; |
| 35 | 36 | ||
| 36 | @JsonKey(name: 'uid') | 37 | @JsonKey(name: 'uid') |
| 37 | - String uid; | 38 | + String? uid; |
| 38 | 39 | ||
| 39 | @JsonKey(name: 'photo') | 40 | @JsonKey(name: 'photo') |
| 40 | - String photo; | 41 | + String? photo; |
| 41 | 42 | ||
| 42 | @JsonKey(name: 'name') | 43 | @JsonKey(name: 'name') |
| 43 | - String name; | 44 | + String? name; |
| 44 | 45 | ||
| 45 | @JsonKey(name: 'phone') | 46 | @JsonKey(name: 'phone') |
| 46 | - String phone; | 47 | + String? phone; |
| 47 | 48 | ||
| 48 | @JsonKey(name: 'position') | 49 | @JsonKey(name: 'position') |
| 49 | - String position; | 50 | + String? position; |
| 50 | 51 | ||
| 51 | @JsonKey(name: 'qrcode') | 52 | @JsonKey(name: 'qrcode') |
| 52 | - String qrcode; | 53 | + String? qrcode; |
| 53 | 54 | ||
| 54 | @JsonKey(name: 'wechat') | 55 | @JsonKey(name: 'wechat') |
| 55 | - String wechat; | 56 | + String? wechat; |
| 56 | 57 | ||
| 57 | BaseInfoSunModel( | 58 | BaseInfoSunModel( |
| 58 | this.id, | 59 | this.id, |
| @@ -8,11 +8,11 @@ part of 'base_info_model.dart'; | @@ -8,11 +8,11 @@ part of 'base_info_model.dart'; | ||
| 8 | 8 | ||
| 9 | BaseInfoModel _$BaseInfoModelFromJson(Map<String, dynamic> json) { | 9 | BaseInfoModel _$BaseInfoModelFromJson(Map<String, dynamic> json) { |
| 10 | return BaseInfoModel( | 10 | return BaseInfoModel( |
| 11 | - json['ret'] as int, | 11 | + json['ret'] as int?, |
| 12 | json['data'] == null | 12 | json['data'] == null |
| 13 | ? null | 13 | ? null |
| 14 | : BaseInfoSunModel.fromJson(json['data'] as Map<String, dynamic>), | 14 | : BaseInfoSunModel.fromJson(json['data'] as Map<String, dynamic>), |
| 15 | - json['msg'] as String); | 15 | + json['msg'] as String?); |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | Map<String, dynamic> _$BaseInfoModelToJson(BaseInfoModel instance) => | 18 | Map<String, dynamic> _$BaseInfoModelToJson(BaseInfoModel instance) => |
| @@ -24,15 +24,15 @@ Map<String, dynamic> _$BaseInfoModelToJson(BaseInfoModel instance) => | @@ -24,15 +24,15 @@ Map<String, dynamic> _$BaseInfoModelToJson(BaseInfoModel instance) => | ||
| 24 | 24 | ||
| 25 | BaseInfoSunModel _$BaseInfoSunModelFromJson(Map<String, dynamic> json) { | 25 | BaseInfoSunModel _$BaseInfoSunModelFromJson(Map<String, dynamic> json) { |
| 26 | return BaseInfoSunModel( | 26 | return BaseInfoSunModel( |
| 27 | - json['id'] as String, | ||
| 28 | - json['sellerid'] as String, | ||
| 29 | - json['uid'] as String, | ||
| 30 | - json['photo'] as String, | ||
| 31 | - json['name'] as String, | ||
| 32 | - json['phone'] as String, | ||
| 33 | - json['position'] as String, | ||
| 34 | - json['qrcode'] as String, | ||
| 35 | - json['wechat'] as String, | 27 | + json['id'] as String?, |
| 28 | + json['sellerid'] as String?, | ||
| 29 | + json['uid'] as String?, | ||
| 30 | + json['photo'] as String?, | ||
| 31 | + json['name'] as String?, | ||
| 32 | + json['phone'] as String?, | ||
| 33 | + json['position'] as String?, | ||
| 34 | + json['qrcode'] as String?, | ||
| 35 | + json['wechat'] as String?, | ||
| 36 | ); | 36 | ); |
| 37 | } | 37 | } |
| 38 | 38 |
| 1 | + | ||
| 1 | import 'package:common_utils/common_utils.dart'; | 2 | import 'package:common_utils/common_utils.dart'; |
| 2 | 3 | ||
| 3 | class BookDepositModel { | 4 | class BookDepositModel { |
| 4 | - int ret; | ||
| 5 | - List<BookDepositSunModel> data; | ||
| 6 | - String msg; | 5 | + int? ret; |
| 6 | + List<BookDepositSunModel>? data; | ||
| 7 | + String? msg; | ||
| 7 | 8 | ||
| 8 | BookDepositModel({this.ret, this.data, this.msg}); | 9 | BookDepositModel({this.ret, this.data, this.msg}); |
| 9 | 10 | ||
| @@ -12,7 +13,7 @@ class BookDepositModel { | @@ -12,7 +13,7 @@ class BookDepositModel { | ||
| 12 | if (json['data'] != null) { | 13 | if (json['data'] != null) { |
| 13 | data = <BookDepositSunModel>[]; | 14 | data = <BookDepositSunModel>[]; |
| 14 | json['data'].forEach((v) { | 15 | json['data'].forEach((v) { |
| 15 | - data.add(new BookDepositSunModel.fromJson(v)); | 16 | + data!.add(new BookDepositSunModel.fromJson(v)); |
| 16 | }); | 17 | }); |
| 17 | } | 18 | } |
| 18 | msg = json['msg']; | 19 | msg = json['msg']; |
| @@ -22,7 +23,7 @@ class BookDepositModel { | @@ -22,7 +23,7 @@ class BookDepositModel { | ||
| 22 | final Map<String, dynamic> data = new Map<String, dynamic>(); | 23 | final Map<String, dynamic> data = new Map<String, dynamic>(); |
| 23 | data['ret'] = this.ret; | 24 | data['ret'] = this.ret; |
| 24 | if (this.data != null) { | 25 | if (this.data != null) { |
| 25 | - data['data'] = this.data.map((v) => v.toJson()).toList(); | 26 | + data['data'] = this.data!.map((v) => v.toJson()).toList(); |
| 26 | } | 27 | } |
| 27 | data['msg'] = this.msg; | 28 | data['msg'] = this.msg; |
| 28 | return data; | 29 | return data; |
| @@ -30,17 +31,17 @@ class BookDepositModel { | @@ -30,17 +31,17 @@ class BookDepositModel { | ||
| 30 | } | 31 | } |
| 31 | 32 | ||
| 32 | class BookDepositSunModel { | 33 | class BookDepositSunModel { |
| 33 | - String id; | ||
| 34 | - String sid; | ||
| 35 | - String rid; | ||
| 36 | - String price; | ||
| 37 | - String rname; | ||
| 38 | - String collectionUid; | ||
| 39 | - String rtime; | ||
| 40 | - String pay; | ||
| 41 | - String depositId; | ||
| 42 | - String no; | ||
| 43 | - String nickName; | 34 | + String? id; |
| 35 | + String? sid; | ||
| 36 | + String? rid; | ||
| 37 | + String? price; | ||
| 38 | + String? rname; | ||
| 39 | + String? collectionUid; | ||
| 40 | + String? rtime; | ||
| 41 | + String? pay; | ||
| 42 | + String? depositId; | ||
| 43 | + String? no; | ||
| 44 | + String? nickName; | ||
| 44 | // String dname; | 45 | // String dname; |
| 45 | 46 | ||
| 46 | String get ddateStr { | 47 | String get ddateStr { |
| 1 | + | ||
| 1 | import 'package:json_annotation/json_annotation.dart'; | 2 | import 'package:json_annotation/json_annotation.dart'; |
| 2 | 3 | ||
| 3 | part 'check_seller_acc_model.g.dart'; | 4 | part 'check_seller_acc_model.g.dart'; |
| @@ -5,13 +6,13 @@ part 'check_seller_acc_model.g.dart'; | @@ -5,13 +6,13 @@ part 'check_seller_acc_model.g.dart'; | ||
| 5 | @JsonSerializable() | 6 | @JsonSerializable() |
| 6 | class CheckSellerAccModel extends Object { | 7 | class CheckSellerAccModel extends Object { |
| 7 | @JsonKey(name: 'ret') | 8 | @JsonKey(name: 'ret') |
| 8 | - int ret; | 9 | + int? ret; |
| 9 | 10 | ||
| 10 | @JsonKey(name: 'data') | 11 | @JsonKey(name: 'data') |
| 11 | - List<CheckSellerAccSunModel> data; | 12 | + List<CheckSellerAccSunModel?>? data; |
| 12 | 13 | ||
| 13 | @JsonKey(name: 'msg') | 14 | @JsonKey(name: 'msg') |
| 14 | - String msg; | 15 | + String? msg; |
| 15 | 16 | ||
| 16 | CheckSellerAccModel( | 17 | CheckSellerAccModel( |
| 17 | this.ret, | 18 | this.ret, |
| @@ -28,169 +29,169 @@ class CheckSellerAccModel extends Object { | @@ -28,169 +29,169 @@ class CheckSellerAccModel extends Object { | ||
| 28 | @JsonSerializable() | 29 | @JsonSerializable() |
| 29 | class CheckSellerAccSunModel extends Object { | 30 | class CheckSellerAccSunModel extends Object { |
| 30 | @JsonKey(name: 'id') | 31 | @JsonKey(name: 'id') |
| 31 | - String id; | 32 | + String? id; |
| 32 | 33 | ||
| 33 | @JsonKey(name: 'uid') | 34 | @JsonKey(name: 'uid') |
| 34 | - String uid; | 35 | + String? uid; |
| 35 | 36 | ||
| 36 | @JsonKey(name: 'seat_openid') | 37 | @JsonKey(name: 'seat_openid') |
| 37 | - String seatOpenid; | 38 | + String? seatOpenid; |
| 38 | 39 | ||
| 39 | @JsonKey(name: 'nick_name') | 40 | @JsonKey(name: 'nick_name') |
| 40 | - String nickName; | 41 | + String? nickName; |
| 41 | 42 | ||
| 42 | @JsonKey(name: 'auth_user_id') | 43 | @JsonKey(name: 'auth_user_id') |
| 43 | - String authUserId; | 44 | + String? authUserId; |
| 44 | 45 | ||
| 45 | @JsonKey(name: 'seller_code') | 46 | @JsonKey(name: 'seller_code') |
| 46 | - String sellerCode; | 47 | + String? sellerCode; |
| 47 | 48 | ||
| 48 | @JsonKey(name: 'account') | 49 | @JsonKey(name: 'account') |
| 49 | - String account; | 50 | + String? account; |
| 50 | 51 | ||
| 51 | @JsonKey(name: 'user_token') | 52 | @JsonKey(name: 'user_token') |
| 52 | - String userToken; | 53 | + String? userToken; |
| 53 | 54 | ||
| 54 | @JsonKey(name: 'registrationId') | 55 | @JsonKey(name: 'registrationId') |
| 55 | - String registrationId; | 56 | + String? registrationId; |
| 56 | 57 | ||
| 57 | @JsonKey(name: 'connection_id') | 58 | @JsonKey(name: 'connection_id') |
| 58 | - String connectionId; | 59 | + String? connectionId; |
| 59 | 60 | ||
| 60 | @JsonKey(name: 'alias') | 61 | @JsonKey(name: 'alias') |
| 61 | - String alias; | 62 | + String? alias; |
| 62 | 63 | ||
| 63 | @JsonKey(name: 'password') | 64 | @JsonKey(name: 'password') |
| 64 | - String password; | 65 | + String? password; |
| 65 | 66 | ||
| 66 | @JsonKey(name: 'sellerid') | 67 | @JsonKey(name: 'sellerid') |
| 67 | - String sellerid; | 68 | + String? sellerid; |
| 68 | 69 | ||
| 69 | @JsonKey(name: 'phone') | 70 | @JsonKey(name: 'phone') |
| 70 | - String phone; | 71 | + String? phone; |
| 71 | 72 | ||
| 72 | @JsonKey(name: 'role_id') | 73 | @JsonKey(name: 'role_id') |
| 73 | - String roleId; | 74 | + String? roleId; |
| 74 | 75 | ||
| 75 | @JsonKey(name: 'role_name') | 76 | @JsonKey(name: 'role_name') |
| 76 | - String roleName; | 77 | + String? roleName; |
| 77 | 78 | ||
| 78 | @JsonKey(name: 'pid') | 79 | @JsonKey(name: 'pid') |
| 79 | - String pid; | 80 | + String? pid; |
| 80 | 81 | ||
| 81 | @JsonKey(name: 'openid') | 82 | @JsonKey(name: 'openid') |
| 82 | - String openid; | 83 | + String? openid; |
| 83 | 84 | ||
| 84 | @JsonKey(name: 'sellername') | 85 | @JsonKey(name: 'sellername') |
| 85 | - String sellername; | 86 | + String? sellername; |
| 86 | 87 | ||
| 87 | @JsonKey(name: 'selleralias') | 88 | @JsonKey(name: 'selleralias') |
| 88 | - String selleralias; | 89 | + String? selleralias; |
| 89 | 90 | ||
| 90 | @JsonKey(name: 'slogan') | 91 | @JsonKey(name: 'slogan') |
| 91 | - String slogan; | 92 | + String? slogan; |
| 92 | 93 | ||
| 93 | @JsonKey(name: 'sellerdesc') | 94 | @JsonKey(name: 'sellerdesc') |
| 94 | - String sellerdesc; | 95 | + String? sellerdesc; |
| 95 | 96 | ||
| 96 | @JsonKey(name: 'seller_logo') | 97 | @JsonKey(name: 'seller_logo') |
| 97 | - String sellerLogo; | 98 | + String? sellerLogo; |
| 98 | 99 | ||
| 99 | @JsonKey(name: 'seller_image') | 100 | @JsonKey(name: 'seller_image') |
| 100 | - String sellerImage; | 101 | + String? sellerImage; |
| 101 | 102 | ||
| 102 | @JsonKey(name: 'seller_tel') | 103 | @JsonKey(name: 'seller_tel') |
| 103 | - String sellerTel; | 104 | + String? sellerTel; |
| 104 | 105 | ||
| 105 | @JsonKey(name: 'map_address') | 106 | @JsonKey(name: 'map_address') |
| 106 | - String mapAddress; | 107 | + String? mapAddress; |
| 107 | 108 | ||
| 108 | @JsonKey(name: 'long') | 109 | @JsonKey(name: 'long') |
| 109 | - String long; | 110 | + String? long; |
| 110 | 111 | ||
| 111 | @JsonKey(name: 'lat') | 112 | @JsonKey(name: 'lat') |
| 112 | - String lat; | 113 | + String? lat; |
| 113 | 114 | ||
| 114 | @JsonKey(name: 'discount_type') | 115 | @JsonKey(name: 'discount_type') |
| 115 | - String discountType; | 116 | + String? discountType; |
| 116 | 117 | ||
| 117 | @JsonKey(name: 'last_num') | 118 | @JsonKey(name: 'last_num') |
| 118 | - String lastNum; | 119 | + String? lastNum; |
| 119 | 120 | ||
| 120 | @JsonKey(name: 'ispass') | 121 | @JsonKey(name: 'ispass') |
| 121 | - String ispass; | 122 | + String? ispass; |
| 122 | 123 | ||
| 123 | @JsonKey(name: 'dis_ispass') | 124 | @JsonKey(name: 'dis_ispass') |
| 124 | - String disIspass; | 125 | + String? disIspass; |
| 125 | 126 | ||
| 126 | @JsonKey(name: 'account_money') | 127 | @JsonKey(name: 'account_money') |
| 127 | - String accountMoney; | 128 | + String? accountMoney; |
| 128 | 129 | ||
| 129 | @JsonKey(name: 'isopen_dc') | 130 | @JsonKey(name: 'isopen_dc') |
| 130 | - String isopenDc; | 131 | + String? isopenDc; |
| 131 | 132 | ||
| 132 | @JsonKey(name: 'isopen_md') | 133 | @JsonKey(name: 'isopen_md') |
| 133 | - String isopenMd; | 134 | + String? isopenMd; |
| 134 | 135 | ||
| 135 | @JsonKey(name: 'dc_adduser_code') | 136 | @JsonKey(name: 'dc_adduser_code') |
| 136 | - String dcAdduserCode; | 137 | + String? dcAdduserCode; |
| 137 | 138 | ||
| 138 | @JsonKey(name: 'average') | 139 | @JsonKey(name: 'average') |
| 139 | - String average; | 140 | + String? average; |
| 140 | 141 | ||
| 141 | @JsonKey(name: 'is_online_reserve') | 142 | @JsonKey(name: 'is_online_reserve') |
| 142 | - String isOnlineReserve; | 143 | + String? isOnlineReserve; |
| 143 | 144 | ||
| 144 | @JsonKey(name: 'is_tele') | 145 | @JsonKey(name: 'is_tele') |
| 145 | - String isTele; | 146 | + String? isTele; |
| 146 | 147 | ||
| 147 | @JsonKey(name: 'daily') | 148 | @JsonKey(name: 'daily') |
| 148 | - String daily; | 149 | + String? daily; |
| 149 | 150 | ||
| 150 | @JsonKey(name: 'daily_time') | 151 | @JsonKey(name: 'daily_time') |
| 151 | - String dailyTime; | 152 | + String? dailyTime; |
| 152 | 153 | ||
| 153 | @JsonKey(name: 'scale') | 154 | @JsonKey(name: 'scale') |
| 154 | - String scale; | 155 | + String? scale; |
| 155 | 156 | ||
| 156 | @JsonKey(name: 'score') | 157 | @JsonKey(name: 'score') |
| 157 | - String score; | 158 | + String? score; |
| 158 | 159 | ||
| 159 | @JsonKey(name: 'is_belt_wine') | 160 | @JsonKey(name: 'is_belt_wine') |
| 160 | - String isBeltWine; | 161 | + String? isBeltWine; |
| 161 | 162 | ||
| 162 | @JsonKey(name: 'is_auth') | 163 | @JsonKey(name: 'is_auth') |
| 163 | - String isAuth; | 164 | + String? isAuth; |
| 164 | 165 | ||
| 165 | @JsonKey(name: 'is_call_tel') | 166 | @JsonKey(name: 'is_call_tel') |
| 166 | - String isCallTel; | 167 | + String? isCallTel; |
| 167 | 168 | ||
| 168 | @JsonKey(name: 'rec_stime') | 169 | @JsonKey(name: 'rec_stime') |
| 169 | - String recStime; | 170 | + String? recStime; |
| 170 | 171 | ||
| 171 | @JsonKey(name: 'rec_etime') | 172 | @JsonKey(name: 'rec_etime') |
| 172 | - String recEtime; | 173 | + String? recEtime; |
| 173 | 174 | ||
| 174 | @JsonKey(name: 'status') | 175 | @JsonKey(name: 'status') |
| 175 | - String status; | 176 | + String? status; |
| 176 | 177 | ||
| 177 | @JsonKey(name: 'is_recom') | 178 | @JsonKey(name: 'is_recom') |
| 178 | - String isRecom; | 179 | + String? isRecom; |
| 179 | 180 | ||
| 180 | @JsonKey(name: 'cdate') | 181 | @JsonKey(name: 'cdate') |
| 181 | - String cdate; | 182 | + String? cdate; |
| 182 | 183 | ||
| 183 | @JsonKey(name: 'applyment_sub_mchid') | 184 | @JsonKey(name: 'applyment_sub_mchid') |
| 184 | - String applymentSubMchid; | 185 | + String? applymentSubMchid; |
| 185 | 186 | ||
| 186 | @JsonKey(name: 'pro_code') | 187 | @JsonKey(name: 'pro_code') |
| 187 | - String proCode; | 188 | + String? proCode; |
| 188 | 189 | ||
| 189 | @JsonKey(name: 'city_code') | 190 | @JsonKey(name: 'city_code') |
| 190 | - String cityCode; | 191 | + String? cityCode; |
| 191 | 192 | ||
| 192 | @JsonKey(name: 'dis_code') | 193 | @JsonKey(name: 'dis_code') |
| 193 | - String disCode; | 194 | + String? disCode; |
| 194 | 195 | ||
| 195 | CheckSellerAccSunModel( | 196 | CheckSellerAccSunModel( |
| 196 | this.id, | 197 | this.id, |
| @@ -8,13 +8,13 @@ part of 'check_seller_acc_model.dart'; | @@ -8,13 +8,13 @@ part of 'check_seller_acc_model.dart'; | ||
| 8 | 8 | ||
| 9 | CheckSellerAccModel _$CheckSellerAccModelFromJson(Map<String, dynamic> json) { | 9 | CheckSellerAccModel _$CheckSellerAccModelFromJson(Map<String, dynamic> json) { |
| 10 | return CheckSellerAccModel( | 10 | return CheckSellerAccModel( |
| 11 | - json['ret'] as int, | ||
| 12 | - (json['data'] as List) | 11 | + json['ret'] as int?, |
| 12 | + (json['data'] as List?) | ||
| 13 | ?.map((e) => e == null | 13 | ?.map((e) => e == null |
| 14 | ? null | 14 | ? null |
| 15 | : CheckSellerAccSunModel.fromJson(e as Map<String, dynamic>)) | 15 | : CheckSellerAccSunModel.fromJson(e as Map<String, dynamic>)) |
| 16 | - ?.toList(), | ||
| 17 | - json['msg'] as String); | 16 | + .toList(), |
| 17 | + json['msg'] as String?); | ||
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | Map<String, dynamic> _$CheckSellerAccModelToJson( | 20 | Map<String, dynamic> _$CheckSellerAccModelToJson( |
| @@ -28,61 +28,61 @@ Map<String, dynamic> _$CheckSellerAccModelToJson( | @@ -28,61 +28,61 @@ Map<String, dynamic> _$CheckSellerAccModelToJson( | ||
| 28 | CheckSellerAccSunModel _$CheckSellerAccSunModelFromJson( | 28 | CheckSellerAccSunModel _$CheckSellerAccSunModelFromJson( |
| 29 | Map<String, dynamic> json) { | 29 | Map<String, dynamic> json) { |
| 30 | return CheckSellerAccSunModel( | 30 | return CheckSellerAccSunModel( |
| 31 | - json['id'] as String, | ||
| 32 | - json['uid'] as String, | ||
| 33 | - json['seat_openid'] as String, | ||
| 34 | - json['nick_name'] as String, | ||
| 35 | - json['auth_user_id'] as String, | ||
| 36 | - json['seller_code'] as String, | ||
| 37 | - json['account'] as String, | ||
| 38 | - json['user_token'] as String, | ||
| 39 | - json['registrationId'] as String, | ||
| 40 | - json['connection_id'] as String, | ||
| 41 | - json['alias'] as String, | ||
| 42 | - json['password'] as String, | ||
| 43 | - json['sellerid'] as String, | ||
| 44 | - json['phone'] as String, | ||
| 45 | - json['role_id'] as String, | ||
| 46 | - json['role_name'] as String, | ||
| 47 | - json['pid'] as String, | ||
| 48 | - json['openid'] as String, | ||
| 49 | - json['sellername'] as String, | ||
| 50 | - json['selleralias'] as String, | ||
| 51 | - json['slogan'] as String, | ||
| 52 | - json['sellerdesc'] as String, | ||
| 53 | - json['seller_logo'] as String, | ||
| 54 | - json['seller_image'] as String, | ||
| 55 | - json['seller_tel'] as String, | ||
| 56 | - json['map_address'] as String, | ||
| 57 | - json['long'] as String, | ||
| 58 | - json['lat'] as String, | ||
| 59 | - json['discount_type'] as String, | ||
| 60 | - json['last_num'] as String, | ||
| 61 | - json['ispass'] as String, | ||
| 62 | - json['dis_ispass'] as String, | ||
| 63 | - json['account_money'] as String, | ||
| 64 | - json['isopen_dc'] as String, | ||
| 65 | - json['isopen_md'] as String, | ||
| 66 | - json['dc_adduser_code'] as String, | ||
| 67 | - json['average'] as String, | ||
| 68 | - json['is_online_reserve'] as String, | ||
| 69 | - json['is_tele'] as String, | ||
| 70 | - json['daily'] as String, | ||
| 71 | - json['daily_time'] as String, | ||
| 72 | - json['scale'] as String, | ||
| 73 | - json['score'] as String, | ||
| 74 | - json['is_belt_wine'] as String, | ||
| 75 | - json['is_auth'] as String, | ||
| 76 | - json['is_call_tel'] as String, | ||
| 77 | - json['rec_stime'] as String, | ||
| 78 | - json['rec_etime'] as String, | ||
| 79 | - json['status'] as String, | ||
| 80 | - json['is_recom'] as String, | ||
| 81 | - json['cdate'] as String, | ||
| 82 | - json['applyment_sub_mchid'] as String, | ||
| 83 | - json['pro_code'] as String, | ||
| 84 | - json['city_code'] as String, | ||
| 85 | - json['dis_code'] as String); | 31 | + json['id'] as String?, |
| 32 | + json['uid'] as String?, | ||
| 33 | + json['seat_openid'] as String?, | ||
| 34 | + json['nick_name'] as String?, | ||
| 35 | + json['auth_user_id'] as String?, | ||
| 36 | + json['seller_code'] as String?, | ||
| 37 | + json['account'] as String?, | ||
| 38 | + json['user_token'] as String?, | ||
| 39 | + json['registrationId'] as String?, | ||
| 40 | + json['connection_id'] as String?, | ||
| 41 | + json['alias'] as String?, | ||
| 42 | + json['password'] as String?, | ||
| 43 | + json['sellerid'] as String?, | ||
| 44 | + json['phone'] as String?, | ||
| 45 | + json['role_id'] as String?, | ||
| 46 | + json['role_name'] as String?, | ||
| 47 | + json['pid'] as String?, | ||
| 48 | + json['openid'] as String?, | ||
| 49 | + json['sellername'] as String?, | ||
| 50 | + json['selleralias'] as String?, | ||
| 51 | + json['slogan'] as String?, | ||
| 52 | + json['sellerdesc'] as String?, | ||
| 53 | + json['seller_logo'] as String?, | ||
| 54 | + json['seller_image'] as String?, | ||
| 55 | + json['seller_tel'] as String?, | ||
| 56 | + json['map_address'] as String?, | ||
| 57 | + json['long'] as String?, | ||
| 58 | + json['lat'] as String?, | ||
| 59 | + json['discount_type'] as String?, | ||
| 60 | + json['last_num'] as String?, | ||
| 61 | + json['ispass'] as String?, | ||
| 62 | + json['dis_ispass'] as String?, | ||
| 63 | + json['account_money'] as String?, | ||
| 64 | + json['isopen_dc'] as String?, | ||
| 65 | + json['isopen_md'] as String?, | ||
| 66 | + json['dc_adduser_code'] as String?, | ||
| 67 | + json['average'] as String?, | ||
| 68 | + json['is_online_reserve'] as String?, | ||
| 69 | + json['is_tele'] as String?, | ||
| 70 | + json['daily'] as String?, | ||
| 71 | + json['daily_time'] as String?, | ||
| 72 | + json['scale'] as String?, | ||
| 73 | + json['score'] as String?, | ||
| 74 | + json['is_belt_wine'] as String?, | ||
| 75 | + json['is_auth'] as String?, | ||
| 76 | + json['is_call_tel'] as String?, | ||
| 77 | + json['rec_stime'] as String?, | ||
| 78 | + json['rec_etime'] as String?, | ||
| 79 | + json['status'] as String?, | ||
| 80 | + json['is_recom'] as String?, | ||
| 81 | + json['cdate'] as String?, | ||
| 82 | + json['applyment_sub_mchid'] as String?, | ||
| 83 | + json['pro_code'] as String?, | ||
| 84 | + json['city_code'] as String?, | ||
| 85 | + json['dis_code'] as String?); | ||
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | Map<String, dynamic> _$CheckSellerAccSunModelToJson( | 88 | Map<String, dynamic> _$CheckSellerAccSunModelToJson( |
| 1 | + | ||
| 1 | import 'package:json_annotation/json_annotation.dart'; | 2 | import 'package:json_annotation/json_annotation.dart'; |
| 2 | 3 | ||
| 3 | part 'checkbind_phone_model.g.dart'; | 4 | part 'checkbind_phone_model.g.dart'; |
| @@ -7,13 +8,13 @@ part 'checkbind_phone_model.g.dart'; | @@ -7,13 +8,13 @@ part 'checkbind_phone_model.g.dart'; | ||
| 7 | class CheckbindPhoneModel extends Object { | 8 | class CheckbindPhoneModel extends Object { |
| 8 | 9 | ||
| 9 | @JsonKey(name: 'ret') | 10 | @JsonKey(name: 'ret') |
| 10 | - int ret; | 11 | + int? ret; |
| 11 | 12 | ||
| 12 | @JsonKey(name: 'data') | 13 | @JsonKey(name: 'data') |
| 13 | - CheckbindPhoneSunModel data; | 14 | + CheckbindPhoneSunModel? data; |
| 14 | 15 | ||
| 15 | @JsonKey(name: 'msg') | 16 | @JsonKey(name: 'msg') |
| 16 | - String msg; | 17 | + String? msg; |
| 17 | 18 | ||
| 18 | CheckbindPhoneModel(this.ret,this.data,this.msg,); | 19 | CheckbindPhoneModel(this.ret,this.data,this.msg,); |
| 19 | 20 | ||
| @@ -28,52 +29,52 @@ part 'checkbind_phone_model.g.dart'; | @@ -28,52 +29,52 @@ part 'checkbind_phone_model.g.dart'; | ||
| 28 | class CheckbindPhoneSunModel extends Object { | 29 | class CheckbindPhoneSunModel extends Object { |
| 29 | 30 | ||
| 30 | @JsonKey(name: 'id') | 31 | @JsonKey(name: 'id') |
| 31 | - String id; | 32 | + String? id; |
| 32 | 33 | ||
| 33 | @JsonKey(name: 'nick_name') | 34 | @JsonKey(name: 'nick_name') |
| 34 | - String nickName; | 35 | + String? nickName; |
| 35 | 36 | ||
| 36 | @JsonKey(name: 'role_id') | 37 | @JsonKey(name: 'role_id') |
| 37 | - String roleId; | 38 | + String? roleId; |
| 38 | 39 | ||
| 39 | @JsonKey(name: 'auth_user_id') | 40 | @JsonKey(name: 'auth_user_id') |
| 40 | - String authUserId; | 41 | + String? authUserId; |
| 41 | 42 | ||
| 42 | @JsonKey(name: 'seat_openid') | 43 | @JsonKey(name: 'seat_openid') |
| 43 | - String seatOpenid; | 44 | + String? seatOpenid; |
| 44 | 45 | ||
| 45 | @JsonKey(name: 'sellerid') | 46 | @JsonKey(name: 'sellerid') |
| 46 | - String sellerid; | 47 | + String? sellerid; |
| 47 | 48 | ||
| 48 | @JsonKey(name: 'seller_code') | 49 | @JsonKey(name: 'seller_code') |
| 49 | - String sellerCode; | 50 | + String? sellerCode; |
| 50 | 51 | ||
| 51 | @JsonKey(name: 'account') | 52 | @JsonKey(name: 'account') |
| 52 | - String account; | 53 | + String? account; |
| 53 | 54 | ||
| 54 | @JsonKey(name: 'phone') | 55 | @JsonKey(name: 'phone') |
| 55 | - String phone; | 56 | + String? phone; |
| 56 | 57 | ||
| 57 | @JsonKey(name: 'user_token') | 58 | @JsonKey(name: 'user_token') |
| 58 | - String userToken; | 59 | + String? userToken; |
| 59 | 60 | ||
| 60 | @JsonKey(name: 'registrationId') | 61 | @JsonKey(name: 'registrationId') |
| 61 | - String registrationId; | 62 | + String? registrationId; |
| 62 | 63 | ||
| 63 | @JsonKey(name: 'connection_id') | 64 | @JsonKey(name: 'connection_id') |
| 64 | - String connectionId; | 65 | + String? connectionId; |
| 65 | 66 | ||
| 66 | @JsonKey(name: 'alias') | 67 | @JsonKey(name: 'alias') |
| 67 | - String alias; | 68 | + String? alias; |
| 68 | 69 | ||
| 69 | @JsonKey(name: 'password') | 70 | @JsonKey(name: 'password') |
| 70 | - String password; | 71 | + String? password; |
| 71 | 72 | ||
| 72 | @JsonKey(name: 'is_on_call') | 73 | @JsonKey(name: 'is_on_call') |
| 73 | - String isOnCall; | 74 | + String? isOnCall; |
| 74 | 75 | ||
| 75 | @JsonKey(name: 'cdate') | 76 | @JsonKey(name: 'cdate') |
| 76 | - String cdate; | 77 | + String? cdate; |
| 77 | 78 | ||
| 78 | 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,); | 79 | 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,); |
| 79 | 80 |
| @@ -8,12 +8,12 @@ part of 'checkbind_phone_model.dart'; | @@ -8,12 +8,12 @@ part of 'checkbind_phone_model.dart'; | ||
| 8 | 8 | ||
| 9 | CheckbindPhoneModel _$CheckbindPhoneModelFromJson(Map<String, dynamic> json) { | 9 | CheckbindPhoneModel _$CheckbindPhoneModelFromJson(Map<String, dynamic> json) { |
| 10 | return CheckbindPhoneModel( | 10 | return CheckbindPhoneModel( |
| 11 | - json['ret'] as int, | 11 | + json['ret'] as int?, |
| 12 | json['data'] == null | 12 | json['data'] == null |
| 13 | ? null | 13 | ? null |
| 14 | : CheckbindPhoneSunModel.fromJson( | 14 | : CheckbindPhoneSunModel.fromJson( |
| 15 | json['data'] as Map<String, dynamic>), | 15 | json['data'] as Map<String, dynamic>), |
| 16 | - json['msg'] as String); | 16 | + json['msg'] as String?); |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | Map<String, dynamic> _$CheckbindPhoneModelToJson( | 19 | Map<String, dynamic> _$CheckbindPhoneModelToJson( |
| @@ -27,22 +27,22 @@ Map<String, dynamic> _$CheckbindPhoneModelToJson( | @@ -27,22 +27,22 @@ Map<String, dynamic> _$CheckbindPhoneModelToJson( | ||
| 27 | CheckbindPhoneSunModel _$CheckbindPhoneSunModelFromJson( | 27 | CheckbindPhoneSunModel _$CheckbindPhoneSunModelFromJson( |
| 28 | Map<String, dynamic> json) { | 28 | Map<String, dynamic> json) { |
| 29 | return CheckbindPhoneSunModel( | 29 | return CheckbindPhoneSunModel( |
| 30 | - json['id'] as String, | ||
| 31 | - json['nick_name'] as String, | ||
| 32 | - json['role_id'] as String, | ||
| 33 | - json['auth_user_id'] as String, | ||
| 34 | - json['seat_openid'] as String, | ||
| 35 | - json['sellerid'] as String, | ||
| 36 | - json['seller_code'] as String, | ||
| 37 | - json['account'] as String, | ||
| 38 | - json['phone'] as String, | ||
| 39 | - json['user_token'] as String, | ||
| 40 | - json['registrationId'] as String, | ||
| 41 | - json['connection_id'] as String, | ||
| 42 | - json['alias'] as String, | ||
| 43 | - json['password'] as String, | ||
| 44 | - json['is_on_call'] as String, | ||
| 45 | - json['cdate'] as String); | 30 | + json['id'] as String?, |
| 31 | + json['nick_name'] as String?, | ||
| 32 | + json['role_id'] as String?, | ||
| 33 | + json['auth_user_id'] as String?, | ||
| 34 | + json['seat_openid'] as String?, | ||
| 35 | + json['sellerid'] as String?, | ||
| 36 | + json['seller_code'] as String?, | ||
| 37 | + json['account'] as String?, | ||
| 38 | + json['phone'] as String?, | ||
| 39 | + json['user_token'] as String?, | ||
| 40 | + json['registrationId'] as String?, | ||
| 41 | + json['connection_id'] as String?, | ||
| 42 | + json['alias'] as String?, | ||
| 43 | + json['password'] as String?, | ||
| 44 | + json['is_on_call'] as String?, | ||
| 45 | + json['cdate'] as String?); | ||
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | Map<String, dynamic> _$CheckbindPhoneSunModelToJson( | 48 | Map<String, dynamic> _$CheckbindPhoneSunModelToJson( |
| 1 | + | ||
| 1 | class ClassifyModel { | 2 | class ClassifyModel { |
| 2 | - int ret; | ||
| 3 | - List<ClassifySunModel> data; | ||
| 4 | - String msg; | 3 | + int? ret; |
| 4 | + List<ClassifySunModel>? data; | ||
| 5 | + String? msg; | ||
| 5 | 6 | ||
| 6 | ClassifyModel({this.ret, this.data, this.msg}); | 7 | ClassifyModel({this.ret, this.data, this.msg}); |
| 7 | 8 | ||
| @@ -10,7 +11,7 @@ class ClassifyModel { | @@ -10,7 +11,7 @@ class ClassifyModel { | ||
| 10 | if (json['data'] != null) { | 11 | if (json['data'] != null) { |
| 11 | data = <ClassifySunModel>[]; | 12 | data = <ClassifySunModel>[]; |
| 12 | json['data'].forEach((v) { | 13 | json['data'].forEach((v) { |
| 13 | - data.add(new ClassifySunModel.fromJson(v)); | 14 | + data!.add(new ClassifySunModel.fromJson(v)); |
| 14 | }); | 15 | }); |
| 15 | } | 16 | } |
| 16 | msg = json['msg']; | 17 | msg = json['msg']; |
| @@ -20,7 +21,7 @@ class ClassifyModel { | @@ -20,7 +21,7 @@ class ClassifyModel { | ||
| 20 | final Map<String, dynamic> data = new Map<String, dynamic>(); | 21 | final Map<String, dynamic> data = new Map<String, dynamic>(); |
| 21 | data['ret'] = this.ret; | 22 | data['ret'] = this.ret; |
| 22 | if (this.data != null) { | 23 | if (this.data != null) { |
| 23 | - data['data'] = this.data.map((v) => v.toJson()).toList(); | 24 | + data['data'] = this.data!.map((v) => v.toJson()).toList(); |
| 24 | } | 25 | } |
| 25 | data['msg'] = this.msg; | 26 | data['msg'] = this.msg; |
| 26 | return data; | 27 | return data; |
| @@ -28,12 +29,12 @@ class ClassifyModel { | @@ -28,12 +29,12 @@ class ClassifyModel { | ||
| 28 | } | 29 | } |
| 29 | 30 | ||
| 30 | class ClassifySunModel { | 31 | class ClassifySunModel { |
| 31 | - String id; | ||
| 32 | - String sid; | ||
| 33 | - String className; | ||
| 34 | - String status; | 32 | + String? id; |
| 33 | + String? sid; | ||
| 34 | + String? className; | ||
| 35 | + String? status; | ||
| 35 | dynamic cdate; | 36 | dynamic cdate; |
| 36 | - String isDefault; | 37 | + String? isDefault; |
| 37 | 38 | ||
| 38 | ClassifySunModel( | 39 | ClassifySunModel( |
| 39 | {this.id, | 40 | {this.id, |
| 1 | + | ||
| 1 | class CommentsLabelModel { | 2 | class CommentsLabelModel { |
| 2 | - int ret; | ||
| 3 | - List<CommentsLabelSunModel> data; | ||
| 4 | - String msg; | 3 | + int? ret; |
| 4 | + List<CommentsLabelSunModel>? data; | ||
| 5 | + String? msg; | ||
| 5 | 6 | ||
| 6 | CommentsLabelModel({this.ret, this.data, this.msg}); | 7 | CommentsLabelModel({this.ret, this.data, this.msg}); |
| 7 | 8 | ||
| @@ -10,7 +11,7 @@ class CommentsLabelModel { | @@ -10,7 +11,7 @@ class CommentsLabelModel { | ||
| 10 | if (json['data'] != null) { | 11 | if (json['data'] != null) { |
| 11 | data = <CommentsLabelSunModel>[]; | 12 | data = <CommentsLabelSunModel>[]; |
| 12 | json['data'].forEach((v) { | 13 | json['data'].forEach((v) { |
| 13 | - data.add(new CommentsLabelSunModel.fromJson(v)); | 14 | + data!.add(new CommentsLabelSunModel.fromJson(v)); |
| 14 | }); | 15 | }); |
| 15 | } | 16 | } |
| 16 | msg = json['msg']; | 17 | msg = json['msg']; |
| @@ -20,7 +21,7 @@ class CommentsLabelModel { | @@ -20,7 +21,7 @@ class CommentsLabelModel { | ||
| 20 | final Map<String, dynamic> data = new Map<String, dynamic>(); | 21 | final Map<String, dynamic> data = new Map<String, dynamic>(); |
| 21 | data['ret'] = this.ret; | 22 | data['ret'] = this.ret; |
| 22 | if (this.data != null) { | 23 | if (this.data != null) { |
| 23 | - data['data'] = this.data.map((v) => v.toJson()).toList(); | 24 | + data['data'] = this.data!.map((v) => v.toJson()).toList(); |
| 24 | } | 25 | } |
| 25 | data['msg'] = this.msg; | 26 | data['msg'] = this.msg; |
| 26 | return data; | 27 | return data; |
| @@ -28,8 +29,8 @@ class CommentsLabelModel { | @@ -28,8 +29,8 @@ class CommentsLabelModel { | ||
| 28 | } | 29 | } |
| 29 | 30 | ||
| 30 | class CommentsLabelSunModel { | 31 | class CommentsLabelSunModel { |
| 31 | - String name; | ||
| 32 | - String total; | 32 | + String? name; |
| 33 | + String? total; | ||
| 33 | bool select = false; | 34 | bool select = false; |
| 34 | 35 | ||
| 35 | CommentsLabelSunModel({this.name, this.total}); | 36 | CommentsLabelSunModel({this.name, this.total}); |
| 1 | + | ||
| 1 | import 'dart:convert'; | 2 | import 'dart:convert'; |
| 2 | 3 | ||
| 3 | 4 | ||
| 4 | import 'package:common_utils/common_utils.dart'; | 5 | import 'package:common_utils/common_utils.dart'; |
| 5 | 6 | ||
| 6 | class CommentsModel { | 7 | class CommentsModel { |
| 7 | - int ret; | ||
| 8 | - List<CommentsSunModel> data; | ||
| 9 | - String msg; | 8 | + int? ret; |
| 9 | + List<CommentsSunModel>? data; | ||
| 10 | + String? msg; | ||
| 10 | 11 | ||
| 11 | CommentsModel({this.ret, this.data, this.msg}); | 12 | CommentsModel({this.ret, this.data, this.msg}); |
| 12 | 13 | ||
| @@ -15,7 +16,7 @@ class CommentsModel { | @@ -15,7 +16,7 @@ class CommentsModel { | ||
| 15 | if (json['data'] != null) { | 16 | if (json['data'] != null) { |
| 16 | data = <CommentsSunModel>[]; | 17 | data = <CommentsSunModel>[]; |
| 17 | json['data'].forEach((v) { | 18 | json['data'].forEach((v) { |
| 18 | - data.add(new CommentsSunModel.fromJson(v)); | 19 | + data!.add(new CommentsSunModel.fromJson(v)); |
| 19 | }); | 20 | }); |
| 20 | } | 21 | } |
| 21 | msg = json['msg']; | 22 | msg = json['msg']; |
| @@ -25,7 +26,7 @@ class CommentsModel { | @@ -25,7 +26,7 @@ class CommentsModel { | ||
| 25 | final Map<String, dynamic> data = new Map<String, dynamic>(); | 26 | final Map<String, dynamic> data = new Map<String, dynamic>(); |
| 26 | data['ret'] = this.ret; | 27 | data['ret'] = this.ret; |
| 27 | if (this.data != null) { | 28 | if (this.data != null) { |
| 28 | - data['data'] = this.data.map((v) => v.toJson()).toList(); | 29 | + data['data'] = this.data!.map((v) => v.toJson()).toList(); |
| 29 | } | 30 | } |
| 30 | data['msg'] = this.msg; | 31 | data['msg'] = this.msg; |
| 31 | return data; | 32 | return data; |
| @@ -33,24 +34,24 @@ class CommentsModel { | @@ -33,24 +34,24 @@ class CommentsModel { | ||
| 33 | } | 34 | } |
| 34 | 35 | ||
| 35 | class CommentsSunModel { | 36 | class CommentsSunModel { |
| 36 | - String id; | ||
| 37 | - String pid; | ||
| 38 | - String sid; | ||
| 39 | - String rid; | ||
| 40 | - String author; | ||
| 41 | - String authorImage; | ||
| 42 | - String grade; | ||
| 43 | - String status; | ||
| 44 | - String evalLabel; | ||
| 45 | - String text; | ||
| 46 | - String createTime; | ||
| 47 | - List<CommentsImageModel> enclosure; | ||
| 48 | - String isnoshow; | ||
| 49 | - Reply reply; | ||
| 50 | - | ||
| 51 | - String ddate; | ||
| 52 | - String ddateSolt; | ||
| 53 | - String tableinfo; | 37 | + String? id; |
| 38 | + String? pid; | ||
| 39 | + String? sid; | ||
| 40 | + String? rid; | ||
| 41 | + String? author; | ||
| 42 | + String? authorImage; | ||
| 43 | + String? grade; | ||
| 44 | + String? status; | ||
| 45 | + String? evalLabel; | ||
| 46 | + String? text; | ||
| 47 | + String? createTime; | ||
| 48 | + List<CommentsImageModel>? enclosure; | ||
| 49 | + String? isnoshow; | ||
| 50 | + Reply? reply; | ||
| 51 | + | ||
| 52 | + String? ddate; | ||
| 53 | + String? ddateSolt; | ||
| 54 | + String? tableinfo; | ||
| 54 | 55 | ||
| 55 | String get createTimeStr { | 56 | String get createTimeStr { |
| 56 | DateTime dateTime = DateTime.fromMillisecondsSinceEpoch( | 57 | DateTime dateTime = DateTime.fromMillisecondsSinceEpoch( |
| @@ -94,7 +95,7 @@ class CommentsSunModel { | @@ -94,7 +95,7 @@ class CommentsSunModel { | ||
| 94 | if (jsonDecode(json['enclosure']) is List) { | 95 | if (jsonDecode(json['enclosure']) is List) { |
| 95 | List temp = jsonDecode(json['enclosure']); | 96 | List temp = jsonDecode(json['enclosure']); |
| 96 | temp.forEach((element) { | 97 | temp.forEach((element) { |
| 97 | - enclosure.add(CommentsImageModel.fromJson(element)); | 98 | + enclosure!.add(CommentsImageModel.fromJson(element)); |
| 98 | }); | 99 | }); |
| 99 | } | 100 | } |
| 100 | } | 101 | } |
| @@ -123,7 +124,7 @@ class CommentsSunModel { | @@ -123,7 +124,7 @@ class CommentsSunModel { | ||
| 123 | data['enclosure'] = this.enclosure; | 124 | data['enclosure'] = this.enclosure; |
| 124 | data['isnoshow'] = this.isnoshow; | 125 | data['isnoshow'] = this.isnoshow; |
| 125 | if (this.reply != null) { | 126 | if (this.reply != null) { |
| 126 | - data['reply'] = this.reply.toJson(); | 127 | + data['reply'] = this.reply!.toJson(); |
| 127 | } | 128 | } |
| 128 | if (this.enclosure != null) { | 129 | if (this.enclosure != null) { |
| 129 | data['enclosure'] = jsonEncode(this.enclosure); | 130 | data['enclosure'] = jsonEncode(this.enclosure); |
| @@ -137,18 +138,18 @@ class CommentsSunModel { | @@ -137,18 +138,18 @@ class CommentsSunModel { | ||
| 137 | } | 138 | } |
| 138 | 139 | ||
| 139 | class Reply { | 140 | class Reply { |
| 140 | - String id; | ||
| 141 | - String pid; | ||
| 142 | - String sid; | ||
| 143 | - String rid; | ||
| 144 | - String author; | ||
| 145 | - String authorImage; | ||
| 146 | - String grade; | ||
| 147 | - String status; | ||
| 148 | - String evalLabel; | ||
| 149 | - String text; | ||
| 150 | - String createTime; | ||
| 151 | - String enclosure; | 141 | + String? id; |
| 142 | + String? pid; | ||
| 143 | + String? sid; | ||
| 144 | + String? rid; | ||
| 145 | + String? author; | ||
| 146 | + String? authorImage; | ||
| 147 | + String? grade; | ||
| 148 | + String? status; | ||
| 149 | + String? evalLabel; | ||
| 150 | + String? text; | ||
| 151 | + String? createTime; | ||
| 152 | + String? enclosure; | ||
| 152 | dynamic isnoshow; | 153 | dynamic isnoshow; |
| 153 | 154 | ||
| 154 | Reply( | 155 | Reply( |
| @@ -202,15 +203,15 @@ class Reply { | @@ -202,15 +203,15 @@ class Reply { | ||
| 202 | } | 203 | } |
| 203 | 204 | ||
| 204 | class CommentsImageModel { | 205 | class CommentsImageModel { |
| 205 | - String key; | ||
| 206 | - String bucket; | ||
| 207 | - String mimeType; | ||
| 208 | - String fsize; | 206 | + String? key; |
| 207 | + String? bucket; | ||
| 208 | + String? mimeType; | ||
| 209 | + String? fsize; | ||
| 209 | dynamic exif; | 210 | dynamic exif; |
| 210 | - ImageInfo imageInfo; | ||
| 211 | - ImageAve imageAve; | ||
| 212 | - String url; | ||
| 213 | - String avinfo; | 211 | + ImageInfo? imageInfo; |
| 212 | + ImageAve? imageAve; | ||
| 213 | + String? url; | ||
| 214 | + String? avinfo; | ||
| 214 | 215 | ||
| 215 | 216 | ||
| 216 | CommentsImageModel( | 217 | CommentsImageModel( |
| @@ -252,10 +253,10 @@ class CommentsImageModel { | @@ -252,10 +253,10 @@ class CommentsImageModel { | ||
| 252 | data['fsize'] = this.fsize; | 253 | data['fsize'] = this.fsize; |
| 253 | data['exif'] = this.exif; | 254 | data['exif'] = this.exif; |
| 254 | if (this.imageInfo != null) { | 255 | if (this.imageInfo != null) { |
| 255 | - data['imageInfo'] = this.imageInfo.toJson(); | 256 | + data['imageInfo'] = this.imageInfo!.toJson(); |
| 256 | } | 257 | } |
| 257 | if (this.imageAve != null) { | 258 | if (this.imageAve != null) { |
| 258 | - data['imageAve'] = this.imageAve.toJson(); | 259 | + data['imageAve'] = this.imageAve!.toJson(); |
| 259 | } | 260 | } |
| 260 | data['url'] = this.url; | 261 | data['url'] = this.url; |
| 261 | 262 | ||
| @@ -265,11 +266,11 @@ class CommentsImageModel { | @@ -265,11 +266,11 @@ class CommentsImageModel { | ||
| 265 | } | 266 | } |
| 266 | 267 | ||
| 267 | class ImageInfo { | 268 | class ImageInfo { |
| 268 | - String colorModel; | ||
| 269 | - String format; | ||
| 270 | - int height; | ||
| 271 | - int size; | ||
| 272 | - int width; | 269 | + String? colorModel; |
| 270 | + String? format; | ||
| 271 | + int? height; | ||
| 272 | + int? size; | ||
| 273 | + int? width; | ||
| 273 | 274 | ||
| 274 | ImageInfo({this.colorModel, this.format, this.height, this.size, this.width}); | 275 | ImageInfo({this.colorModel, this.format, this.height, this.size, this.width}); |
| 275 | 276 | ||
| @@ -293,7 +294,7 @@ class ImageInfo { | @@ -293,7 +294,7 @@ class ImageInfo { | ||
| 293 | } | 294 | } |
| 294 | 295 | ||
| 295 | class ImageAve { | 296 | class ImageAve { |
| 296 | - String rGB; | 297 | + String? rGB; |
| 297 | 298 | ||
| 298 | ImageAve({this.rGB}); | 299 | ImageAve({this.rGB}); |
| 299 | 300 |
| 1 | + | ||
| 1 | import 'package:json_annotation/json_annotation.dart'; | 2 | import 'package:json_annotation/json_annotation.dart'; |
| 2 | 3 | ||
| 3 | part 'cookbook_category_model.g.dart'; | 4 | part 'cookbook_category_model.g.dart'; |
| @@ -5,13 +6,13 @@ part 'cookbook_category_model.g.dart'; | @@ -5,13 +6,13 @@ part 'cookbook_category_model.g.dart'; | ||
| 5 | @JsonSerializable() | 6 | @JsonSerializable() |
| 6 | class CookbookCategoryModel extends Object { | 7 | class CookbookCategoryModel extends Object { |
| 7 | @JsonKey(name: 'ret') | 8 | @JsonKey(name: 'ret') |
| 8 | - int ret; | 9 | + int? ret; |
| 9 | 10 | ||
| 10 | @JsonKey(name: 'data') | 11 | @JsonKey(name: 'data') |
| 11 | - List<CookbookCategorySunModel> data; | 12 | + List<CookbookCategorySunModel?>? data; |
| 12 | 13 | ||
| 13 | @JsonKey(name: 'msg') | 14 | @JsonKey(name: 'msg') |
| 14 | - String msg; | 15 | + String? msg; |
| 15 | 16 | ||
| 16 | CookbookCategoryModel( | 17 | CookbookCategoryModel( |
| 17 | this.ret, | 18 | this.ret, |
| @@ -28,22 +29,22 @@ class CookbookCategoryModel extends Object { | @@ -28,22 +29,22 @@ class CookbookCategoryModel extends Object { | ||
| 28 | @JsonSerializable() | 29 | @JsonSerializable() |
| 29 | class CookbookCategorySunModel extends Object { | 30 | class CookbookCategorySunModel extends Object { |
| 30 | @JsonKey(name: 'id') | 31 | @JsonKey(name: 'id') |
| 31 | - String id; | 32 | + String? id; |
| 32 | 33 | ||
| 33 | @JsonKey(name: 'sellerid') | 34 | @JsonKey(name: 'sellerid') |
| 34 | - String sellerid; | 35 | + String? sellerid; |
| 35 | 36 | ||
| 36 | @JsonKey(name: 'class_name') | 37 | @JsonKey(name: 'class_name') |
| 37 | - String className; | 38 | + String? className; |
| 38 | 39 | ||
| 39 | @JsonKey(name: 'order') | 40 | @JsonKey(name: 'order') |
| 40 | - String order; | 41 | + String? order; |
| 41 | 42 | ||
| 42 | @JsonKey(name: 'status') | 43 | @JsonKey(name: 'status') |
| 43 | - String status; | 44 | + String? status; |
| 44 | 45 | ||
| 45 | @JsonKey(name: 'class_type') | 46 | @JsonKey(name: 'class_type') |
| 46 | - String classType; | 47 | + String? classType; |
| 47 | 48 | ||
| 48 | CookbookCategorySunModel( | 49 | CookbookCategorySunModel( |
| 49 | this.id, | 50 | this.id, |
| @@ -9,13 +9,13 @@ part of 'cookbook_category_model.dart'; | @@ -9,13 +9,13 @@ part of 'cookbook_category_model.dart'; | ||
| 9 | CookbookCategoryModel _$CookbookCategoryModelFromJson( | 9 | CookbookCategoryModel _$CookbookCategoryModelFromJson( |
| 10 | Map<String, dynamic> json) { | 10 | Map<String, dynamic> json) { |
| 11 | return CookbookCategoryModel( | 11 | return CookbookCategoryModel( |
| 12 | - json['ret'] as int, | ||
| 13 | - (json['data'][0] as List) | 12 | + json['ret'] as int?, |
| 13 | + (json['data'][0] as List?) | ||
| 14 | ?.map((e) => e == null | 14 | ?.map((e) => e == null |
| 15 | ? null | 15 | ? null |
| 16 | : CookbookCategorySunModel.fromJson(e as Map<String, dynamic>)) | 16 | : CookbookCategorySunModel.fromJson(e as Map<String, dynamic>)) |
| 17 | - ?.toList(), | ||
| 18 | - json['msg'] as String, | 17 | + .toList(), |
| 18 | + json['msg'] as String?, | ||
| 19 | ); | 19 | ); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| @@ -30,12 +30,12 @@ Map<String, dynamic> _$CookbookCategoryModelToJson( | @@ -30,12 +30,12 @@ Map<String, dynamic> _$CookbookCategoryModelToJson( | ||
| 30 | CookbookCategorySunModel _$CookbookCategorySunModelFromJson( | 30 | CookbookCategorySunModel _$CookbookCategorySunModelFromJson( |
| 31 | Map<String, dynamic> json) { | 31 | Map<String, dynamic> json) { |
| 32 | return CookbookCategorySunModel( | 32 | return CookbookCategorySunModel( |
| 33 | - json['id'] as String, | ||
| 34 | - json['sellerid'] as String, | ||
| 35 | - json['class_name'] as String, | ||
| 36 | - json['order'] as String, | ||
| 37 | - json['status'] as String, | ||
| 38 | - json['class_type'] as String, | 33 | + json['id'] as String?, |
| 34 | + json['sellerid'] as String?, | ||
| 35 | + json['class_name'] as String?, | ||
| 36 | + json['order'] as String?, | ||
| 37 | + json['status'] as String?, | ||
| 38 | + json['class_type'] as String?, | ||
| 39 | ); | 39 | ); |
| 40 | } | 40 | } |
| 41 | 41 |
| 1 | + | ||
| 1 | import 'package:flutter/material.dart'; | 2 | import 'package:flutter/material.dart'; |
| 2 | import 'package:one_key/models/radio_model.dart'; | 3 | import 'package:one_key/models/radio_model.dart'; |
| 3 | import 'package:one_key/utils/utils.dart'; | 4 | import 'package:one_key/utils/utils.dart'; |
| @@ -7,19 +8,19 @@ import 'dart:convert' as convert; | @@ -7,19 +8,19 @@ import 'dart:convert' as convert; | ||
| 7 | ///菜单 | 8 | ///菜单 |
| 8 | 9 | ||
| 9 | class MenuModel { | 10 | class MenuModel { |
| 10 | - String id; | ||
| 11 | - String sellerid; | ||
| 12 | - String className; | 11 | + String? id; |
| 12 | + String? sellerid; | ||
| 13 | + String? className; | ||
| 13 | dynamic classLabel; | 14 | dynamic classLabel; |
| 14 | - String order; | ||
| 15 | - String status; | ||
| 16 | - String classType; | ||
| 17 | - List<MenuSunModel> cookbooklist; | ||
| 18 | - int allSum; //总共选中菜数量 | 15 | + String? order; |
| 16 | + String? status; | ||
| 17 | + String? classType; | ||
| 18 | + List<MenuSunModel>? cookbooklist; | ||
| 19 | + int? allSum; //总共选中菜数量 | ||
| 19 | bool isChange = false; //是否发生数量变化 | 20 | bool isChange = false; //是否发生数量变化 |
| 20 | 21 | ||
| 21 | - List<dynamic> cookbooklistShow; | ||
| 22 | - int outAllNum; | 22 | + late List<dynamic> cookbooklistShow; |
| 23 | + int? outAllNum; | ||
| 23 | int allsumPreviewShow = 0; | 24 | int allsumPreviewShow = 0; |
| 24 | 25 | ||
| 25 | MenuModel( | 26 | MenuModel( |
| @@ -45,7 +46,7 @@ class MenuModel { | @@ -45,7 +46,7 @@ class MenuModel { | ||
| 45 | if (json['cookbooklist'] != null) { | 46 | if (json['cookbooklist'] != null) { |
| 46 | cookbooklist = []; | 47 | cookbooklist = []; |
| 47 | json['cookbooklist'][0].forEach((v) { | 48 | json['cookbooklist'][0].forEach((v) { |
| 48 | - cookbooklist.add(new MenuSunModel.fromJson(v)); | 49 | + cookbooklist!.add(new MenuSunModel.fromJson(v)); |
| 49 | }); | 50 | }); |
| 50 | } | 51 | } |
| 51 | } | 52 | } |
| @@ -62,7 +63,7 @@ class MenuModel { | @@ -62,7 +63,7 @@ class MenuModel { | ||
| 62 | if (json['cookbooklist'] != null) { | 63 | if (json['cookbooklist'] != null) { |
| 63 | cookbooklist = []; | 64 | cookbooklist = []; |
| 64 | json['cookbooklist'].forEach((v) { | 65 | json['cookbooklist'].forEach((v) { |
| 65 | - cookbooklist.add(new MenuSunModel.fromJson2(v)); | 66 | + cookbooklist!.add(new MenuSunModel.fromJson2(v)); |
| 66 | }); | 67 | }); |
| 67 | } | 68 | } |
| 68 | } | 69 | } |
| @@ -81,7 +82,7 @@ class MenuModel { | @@ -81,7 +82,7 @@ class MenuModel { | ||
| 81 | cookbooklist = []; | 82 | cookbooklist = []; |
| 82 | json['cookbooklist'].forEach((v) { | 83 | json['cookbooklist'].forEach((v) { |
| 83 | v['out_all_num'] = outAllNum; | 84 | v['out_all_num'] = outAllNum; |
| 84 | - cookbooklist.add(new MenuSunModel.fromJson4(v)); | 85 | + cookbooklist!.add(new MenuSunModel.fromJson4(v)); |
| 85 | }); | 86 | }); |
| 86 | } | 87 | } |
| 87 | } | 88 | } |
| @@ -99,7 +100,7 @@ class MenuModel { | @@ -99,7 +100,7 @@ class MenuModel { | ||
| 99 | cookbooklist = []; | 100 | cookbooklist = []; |
| 100 | json['cookbooklist'].forEach((v) { | 101 | json['cookbooklist'].forEach((v) { |
| 101 | v['out_all_num'] = outAllNum; | 102 | v['out_all_num'] = outAllNum; |
| 102 | - cookbooklist.add(new MenuSunModel.fromJson5(v)); | 103 | + cookbooklist!.add(new MenuSunModel.fromJson5(v)); |
| 103 | }); | 104 | }); |
| 104 | } | 105 | } |
| 105 | outAllNum = json['out_all_num'] ?? 1; | 106 | outAllNum = json['out_all_num'] ?? 1; |
| @@ -116,7 +117,7 @@ class MenuModel { | @@ -116,7 +117,7 @@ class MenuModel { | ||
| 116 | data['class_type'] = this.classType; | 117 | data['class_type'] = this.classType; |
| 117 | data['allSum'] = this.allSum; | 118 | data['allSum'] = this.allSum; |
| 118 | if (this.cookbooklist != null) { | 119 | if (this.cookbooklist != null) { |
| 119 | - data['cookbooklist'] = this.cookbooklist.map((v) => v.toJson()).toList(); | 120 | + data['cookbooklist'] = this.cookbooklist!.map((v) => v.toJson()).toList(); |
| 120 | } | 121 | } |
| 121 | data['out_all_num'] = this.outAllNum; | 122 | data['out_all_num'] = this.outAllNum; |
| 122 | return data; | 123 | return data; |
| @@ -124,67 +125,67 @@ class MenuModel { | @@ -124,67 +125,67 @@ class MenuModel { | ||
| 124 | } | 125 | } |
| 125 | 126 | ||
| 126 | class MenuSunModel { | 127 | class MenuSunModel { |
| 127 | - String id; | ||
| 128 | - String sellerid; | ||
| 129 | - String mid; | ||
| 130 | - String cid; | ||
| 131 | - String lid; | ||
| 132 | - String unit; | ||
| 133 | - String name; | ||
| 134 | - String price; | ||
| 135 | - String member_price; | ||
| 136 | - String first_name; | ||
| 137 | - String search_code; | ||
| 138 | - String channel; | ||
| 139 | - String dishesvideo; | ||
| 140 | - String dishesgif; | ||
| 141 | - String status; | ||
| 142 | - | ||
| 143 | - String setup; | ||
| 144 | - String give; | ||
| 145 | - String clear_num; | ||
| 146 | - String record_num; | ||
| 147 | - String image; | ||
| 148 | - String is_weigh; | ||
| 149 | - String desc; | ||
| 150 | - String order_o; | ||
| 151 | - String cdate; | ||
| 152 | - List<SpecModel> spec; | ||
| 153 | - List<SpecModel> specCan; | ||
| 154 | - int isSpec; | ||
| 155 | - List<PracticeModel> practice; | ||
| 156 | - | ||
| 157 | - List<MenuModel> cookList; | ||
| 158 | - | ||
| 159 | - int amount; //菜品数量 | ||
| 160 | - List<AmountHasOrder> amountHasOrderList = []; | ||
| 161 | - | ||
| 162 | - TextEditingController amountC = TextEditingController(); | ||
| 163 | - int moreSum = 0; //排菜编辑页展示选中总数 | 128 | + String? id; |
| 129 | + String? sellerid; | ||
| 130 | + String? mid; | ||
| 131 | + String? cid; | ||
| 132 | + String? lid; | ||
| 133 | + String? unit; | ||
| 134 | + String? name; | ||
| 135 | + String? price; | ||
| 136 | + String? member_price; | ||
| 137 | + String? first_name; | ||
| 138 | + String? search_code; | ||
| 139 | + String? channel; | ||
| 140 | + String? dishesvideo; | ||
| 141 | + String? dishesgif; | ||
| 142 | + String? status; | ||
| 143 | + | ||
| 144 | + String? setup; | ||
| 145 | + String? give; | ||
| 146 | + String? clear_num; | ||
| 147 | + String? record_num; | ||
| 148 | + String? image; | ||
| 149 | + String? is_weigh; | ||
| 150 | + String? desc; | ||
| 151 | + String? order_o; | ||
| 152 | + String? cdate; | ||
| 153 | + List<SpecModel>? spec; | ||
| 154 | + List<SpecModel>? specCan; | ||
| 155 | + int? isSpec; | ||
| 156 | + List<PracticeModel>? practice; | ||
| 157 | + | ||
| 158 | + List<MenuModel>? cookList; | ||
| 159 | + | ||
| 160 | + int? amount; //菜品数量 | ||
| 161 | + List<AmountHasOrder>? amountHasOrderList = []; | ||
| 162 | + | ||
| 163 | + TextEditingController? amountC = TextEditingController(); | ||
| 164 | + int? moreSum = 0; //排菜编辑页展示选中总数 | ||
| 164 | 165 | ||
| 165 | // String nameType = '3'; //1左侧,2右侧,3顶部分开 | 166 | // String nameType = '3'; //1左侧,2右侧,3顶部分开 |
| 166 | // String imageType = '1'; //1大图,2小图 | 167 | // String imageType = '1'; //1大图,2小图 |
| 167 | - int sort; | ||
| 168 | - int indexNew; | 168 | + int? sort; |
| 169 | + int? indexNew; | ||
| 169 | 170 | ||
| 170 | - String taste; | ||
| 171 | - String cooks; | ||
| 172 | - DishCookStyle cookStyle; | 171 | + String? taste; |
| 172 | + String? cooks; | ||
| 173 | + DishCookStyle? cookStyle; | ||
| 173 | 174 | ||
| 174 | //名称样式选择数组 | 175 | //名称样式选择数组 |
| 175 | List<RadioModel> get nameTypeList { | 176 | List<RadioModel> get nameTypeList { |
| 176 | RadioModel radioModel1 = RadioModel(); | 177 | RadioModel radioModel1 = RadioModel(); |
| 177 | radioModel1.title = '菜品名称(味型/烹调)及价格在顶部左侧'; | 178 | radioModel1.title = '菜品名称(味型/烹调)及价格在顶部左侧'; |
| 178 | radioModel1.code = '1'; | 179 | radioModel1.code = '1'; |
| 179 | - radioModel1.select = cookStyle.nameType == radioModel1.code ? true : false; | 180 | + radioModel1.select = cookStyle!.nameType == radioModel1.code ? true : false; |
| 180 | RadioModel radioModel2 = RadioModel(); | 181 | RadioModel radioModel2 = RadioModel(); |
| 181 | radioModel2.title = '菜品名称(味型/烹调)及价格在顶部右侧'; | 182 | radioModel2.title = '菜品名称(味型/烹调)及价格在顶部右侧'; |
| 182 | radioModel2.code = '2'; | 183 | radioModel2.code = '2'; |
| 183 | - radioModel2.select = cookStyle.nameType == radioModel2.code ? true : false; | 184 | + radioModel2.select = cookStyle!.nameType == radioModel2.code ? true : false; |
| 184 | RadioModel radioModel3 = RadioModel(); | 185 | RadioModel radioModel3 = RadioModel(); |
| 185 | radioModel3.title = '菜品名称(味型/烹调)及价格在顶部分开'; | 186 | radioModel3.title = '菜品名称(味型/烹调)及价格在顶部分开'; |
| 186 | radioModel3.code = '3'; | 187 | radioModel3.code = '3'; |
| 187 | - radioModel3.select = cookStyle.nameType == radioModel3.code ? true : false; | 188 | + radioModel3.select = cookStyle!.nameType == radioModel3.code ? true : false; |
| 188 | return [radioModel1, radioModel2, radioModel3]; | 189 | return [radioModel1, radioModel2, radioModel3]; |
| 189 | } | 190 | } |
| 190 | 191 | ||
| @@ -193,11 +194,11 @@ class MenuSunModel { | @@ -193,11 +194,11 @@ class MenuSunModel { | ||
| 193 | RadioModel radioModel1 = RadioModel(); | 194 | RadioModel radioModel1 = RadioModel(); |
| 194 | radioModel1.title = '大图展示菜品'; | 195 | radioModel1.title = '大图展示菜品'; |
| 195 | radioModel1.code = '1'; | 196 | radioModel1.code = '1'; |
| 196 | - radioModel1.select = cookStyle.imageType == radioModel1.code ? true : false; | 197 | + radioModel1.select = cookStyle!.imageType == radioModel1.code ? true : false; |
| 197 | RadioModel radioModel2 = RadioModel(); | 198 | RadioModel radioModel2 = RadioModel(); |
| 198 | radioModel2.title = '小图展示菜品'; | 199 | radioModel2.title = '小图展示菜品'; |
| 199 | radioModel2.code = '2'; | 200 | radioModel2.code = '2'; |
| 200 | - radioModel2.select = cookStyle.imageType == radioModel2.code ? true : false; | 201 | + radioModel2.select = cookStyle!.imageType == radioModel2.code ? true : false; |
| 201 | 202 | ||
| 202 | return [radioModel1, radioModel2]; | 203 | return [radioModel1, radioModel2]; |
| 203 | } | 204 | } |
| @@ -303,14 +304,14 @@ class MenuSunModel { | @@ -303,14 +304,14 @@ class MenuSunModel { | ||
| 303 | if (json['spec'] != null) { | 304 | if (json['spec'] != null) { |
| 304 | spec = []; | 305 | spec = []; |
| 305 | json['spec'].forEach((v) { | 306 | json['spec'].forEach((v) { |
| 306 | - spec.add(new SpecModel.fromJson(v)); | 307 | + spec!.add(new SpecModel.fromJson(v)); |
| 307 | }); | 308 | }); |
| 308 | } | 309 | } |
| 309 | if (spec != null) { | 310 | if (spec != null) { |
| 310 | specCan = []; | 311 | specCan = []; |
| 311 | - spec.forEach((v) { | 312 | + spec!.forEach((v) { |
| 312 | if (v.status == '1') { | 313 | if (v.status == '1') { |
| 313 | - specCan.add(v); | 314 | + specCan!.add(v); |
| 314 | } | 315 | } |
| 315 | }); | 316 | }); |
| 316 | } | 317 | } |
| @@ -322,16 +323,16 @@ class MenuSunModel { | @@ -322,16 +323,16 @@ class MenuSunModel { | ||
| 322 | // } else { | 323 | // } else { |
| 323 | json['practice'].forEach((v) { | 324 | json['practice'].forEach((v) { |
| 324 | if (v is Map) { | 325 | if (v is Map) { |
| 325 | - practice.add(new PracticeModel.fromJson(v)); | 326 | + practice!.add(new PracticeModel.fromJson(v as Map<String, dynamic>)); |
| 326 | } else if (v is PracticeModel) { | 327 | } else if (v is PracticeModel) { |
| 327 | - practice.add(v); | 328 | + practice!.add(v); |
| 328 | } | 329 | } |
| 329 | }); | 330 | }); |
| 330 | // } | 331 | // } |
| 331 | } | 332 | } |
| 332 | 333 | ||
| 333 | amount = 0; | 334 | amount = 0; |
| 334 | - amountC.text = '0'; | 335 | + amountC!.text = '0'; |
| 335 | amountHasOrderList = []; | 336 | amountHasOrderList = []; |
| 336 | if (json['amountHasOrderList'] != null) { | 337 | if (json['amountHasOrderList'] != null) { |
| 337 | // amountHasOrderList = []; | 338 | // amountHasOrderList = []; |
| @@ -339,9 +340,9 @@ class MenuSunModel { | @@ -339,9 +340,9 @@ class MenuSunModel { | ||
| 339 | // } else { | 340 | // } else { |
| 340 | json['amountHasOrderList'].forEach((v) { | 341 | json['amountHasOrderList'].forEach((v) { |
| 341 | if (v is Map) { | 342 | if (v is Map) { |
| 342 | - amountHasOrderList.add(new AmountHasOrder.fromJson(v)); | 343 | + amountHasOrderList!.add(new AmountHasOrder.fromJson(v as Map<String, dynamic>)); |
| 343 | } else if (v is AmountHasOrder) { | 344 | } else if (v is AmountHasOrder) { |
| 344 | - amountHasOrderList.add(v); | 345 | + amountHasOrderList!.add(v); |
| 345 | } | 346 | } |
| 346 | }); | 347 | }); |
| 347 | // } | 348 | // } |
| @@ -349,7 +350,7 @@ class MenuSunModel { | @@ -349,7 +350,7 @@ class MenuSunModel { | ||
| 349 | if (json['cookList'] != null) { | 350 | if (json['cookList'] != null) { |
| 350 | cookList = []; | 351 | cookList = []; |
| 351 | json['cookList'].forEach((v) { | 352 | json['cookList'].forEach((v) { |
| 352 | - cookList.add(new MenuModel.fromJson2(v)); | 353 | + cookList!.add(new MenuModel.fromJson2(v)); |
| 353 | }); | 354 | }); |
| 354 | } | 355 | } |
| 355 | // imageType = Utils.randomGet(1, 3) ?? '1'; | 356 | // imageType = Utils.randomGet(1, 3) ?? '1'; |
| @@ -399,14 +400,14 @@ class MenuSunModel { | @@ -399,14 +400,14 @@ class MenuSunModel { | ||
| 399 | if (json['spec'] != null) { | 400 | if (json['spec'] != null) { |
| 400 | spec = []; | 401 | spec = []; |
| 401 | json['spec'].forEach((v) { | 402 | json['spec'].forEach((v) { |
| 402 | - spec.add(new SpecModel.fromJson(v)); | 403 | + spec!.add(new SpecModel.fromJson(v)); |
| 403 | }); | 404 | }); |
| 404 | } | 405 | } |
| 405 | if (spec != null) { | 406 | if (spec != null) { |
| 406 | specCan = []; | 407 | specCan = []; |
| 407 | - spec.forEach((v) { | 408 | + spec!.forEach((v) { |
| 408 | if (v.status == '1') { | 409 | if (v.status == '1') { |
| 409 | - specCan.add(v); | 410 | + specCan!.add(v); |
| 410 | } | 411 | } |
| 411 | }); | 412 | }); |
| 412 | } | 413 | } |
| @@ -418,15 +419,15 @@ class MenuSunModel { | @@ -418,15 +419,15 @@ class MenuSunModel { | ||
| 418 | // } else { | 419 | // } else { |
| 419 | json['practice'].forEach((v) { | 420 | json['practice'].forEach((v) { |
| 420 | if (v is Map) { | 421 | if (v is Map) { |
| 421 | - practice.add(new PracticeModel.fromJson(v)); | 422 | + practice!.add(new PracticeModel.fromJson(v as Map<String, dynamic>)); |
| 422 | } else if (v is PracticeModel) { | 423 | } else if (v is PracticeModel) { |
| 423 | - practice.add(v); | 424 | + practice!.add(v); |
| 424 | } | 425 | } |
| 425 | }); | 426 | }); |
| 426 | // } | 427 | // } |
| 427 | } | 428 | } |
| 428 | amount = 0; | 429 | amount = 0; |
| 429 | - amountC.text = '0'; | 430 | + amountC!.text = '0'; |
| 430 | amountHasOrderList = []; | 431 | amountHasOrderList = []; |
| 431 | if (json['amountHasOrderList'] != null) { | 432 | if (json['amountHasOrderList'] != null) { |
| 432 | // amountHasOrderList = []; | 433 | // amountHasOrderList = []; |
| @@ -434,9 +435,9 @@ class MenuSunModel { | @@ -434,9 +435,9 @@ class MenuSunModel { | ||
| 434 | // } else { | 435 | // } else { |
| 435 | json['amountHasOrderList'].forEach((v) { | 436 | json['amountHasOrderList'].forEach((v) { |
| 436 | if (v is Map) { | 437 | if (v is Map) { |
| 437 | - amountHasOrderList.add(new AmountHasOrder.fromJson(v)); | 438 | + amountHasOrderList!.add(new AmountHasOrder.fromJson(v as Map<String, dynamic>)); |
| 438 | } else if (v is AmountHasOrder) { | 439 | } else if (v is AmountHasOrder) { |
| 439 | - amountHasOrderList.add(v); | 440 | + amountHasOrderList!.add(v); |
| 440 | } | 441 | } |
| 441 | }); | 442 | }); |
| 442 | // } | 443 | // } |
| @@ -444,7 +445,7 @@ class MenuSunModel { | @@ -444,7 +445,7 @@ class MenuSunModel { | ||
| 444 | if (json['cookList'] != null) { | 445 | if (json['cookList'] != null) { |
| 445 | cookList = []; | 446 | cookList = []; |
| 446 | json['cookList'].forEach((v) { | 447 | json['cookList'].forEach((v) { |
| 447 | - cookList.add(v); | 448 | + cookList!.add(v); |
| 448 | }); | 449 | }); |
| 449 | } | 450 | } |
| 450 | taste = json['taste']; | 451 | taste = json['taste']; |
| @@ -488,17 +489,17 @@ class MenuSunModel { | @@ -488,17 +489,17 @@ class MenuSunModel { | ||
| 488 | spec = []; | 489 | spec = []; |
| 489 | json['spec'].forEach((v) { | 490 | json['spec'].forEach((v) { |
| 490 | if (v is Map) { | 491 | if (v is Map) { |
| 491 | - spec.add(new SpecModel.fromJson(v)); | 492 | + spec!.add(new SpecModel.fromJson(v as Map<String, dynamic>)); |
| 492 | } else if (v is SpecModel) { | 493 | } else if (v is SpecModel) { |
| 493 | - spec.add(v); | 494 | + spec!.add(v); |
| 494 | } | 495 | } |
| 495 | }); | 496 | }); |
| 496 | } | 497 | } |
| 497 | if (spec != null) { | 498 | if (spec != null) { |
| 498 | specCan = []; | 499 | specCan = []; |
| 499 | - spec.forEach((v) { | 500 | + spec!.forEach((v) { |
| 500 | if (v.status == '1') { | 501 | if (v.status == '1') { |
| 501 | - specCan.add(v); | 502 | + specCan!.add(v); |
| 502 | } | 503 | } |
| 503 | }); | 504 | }); |
| 504 | } | 505 | } |
| @@ -510,15 +511,15 @@ class MenuSunModel { | @@ -510,15 +511,15 @@ class MenuSunModel { | ||
| 510 | // } else { | 511 | // } else { |
| 511 | json['practice'].forEach((v) { | 512 | json['practice'].forEach((v) { |
| 512 | if (v is Map) { | 513 | if (v is Map) { |
| 513 | - practice.add(new PracticeModel.fromJson(v)); | 514 | + practice!.add(new PracticeModel.fromJson(v as Map<String, dynamic>)); |
| 514 | } else if (v is PracticeModel) { | 515 | } else if (v is PracticeModel) { |
| 515 | - practice.add(v); | 516 | + practice!.add(v); |
| 516 | } | 517 | } |
| 517 | }); | 518 | }); |
| 518 | // } | 519 | // } |
| 519 | } | 520 | } |
| 520 | amount = json['amount'] ?? 0; | 521 | amount = json['amount'] ?? 0; |
| 521 | - amountC.text = amount.toString(); | 522 | + amountC!.text = amount.toString(); |
| 522 | // int amounttemp = 0; | 523 | // int amounttemp = 0; |
| 523 | if (json['amountHasOrderList'] != null) { | 524 | if (json['amountHasOrderList'] != null) { |
| 524 | amountHasOrderList = []; | 525 | amountHasOrderList = []; |
| @@ -527,10 +528,10 @@ class MenuSunModel { | @@ -527,10 +528,10 @@ class MenuSunModel { | ||
| 527 | json['amountHasOrderList'].forEach((v) { | 528 | json['amountHasOrderList'].forEach((v) { |
| 528 | if (v is Map) { | 529 | if (v is Map) { |
| 529 | // amounttemp += v['amount']; | 530 | // amounttemp += v['amount']; |
| 530 | - amountHasOrderList.add(new AmountHasOrder.fromJson(v)); | 531 | + amountHasOrderList!.add(new AmountHasOrder.fromJson(v as Map<String, dynamic>)); |
| 531 | } else if (v is AmountHasOrder) { | 532 | } else if (v is AmountHasOrder) { |
| 532 | // amounttemp += v.amount; | 533 | // amounttemp += v.amount; |
| 533 | - amountHasOrderList.add(v); | 534 | + amountHasOrderList!.add(v); |
| 534 | } | 535 | } |
| 535 | // amount = amounttemp; | 536 | // amount = amounttemp; |
| 536 | }); | 537 | }); |
| @@ -540,7 +541,7 @@ class MenuSunModel { | @@ -540,7 +541,7 @@ class MenuSunModel { | ||
| 540 | if (json['cookList'] != null) { | 541 | if (json['cookList'] != null) { |
| 541 | cookList = []; | 542 | cookList = []; |
| 542 | json['cookList'].forEach((v) { | 543 | json['cookList'].forEach((v) { |
| 543 | - cookList.add(new MenuModel.fromJson2(v)); | 544 | + cookList!.add(new MenuModel.fromJson2(v)); |
| 544 | }); | 545 | }); |
| 545 | } | 546 | } |
| 546 | taste = json['taste']; | 547 | taste = json['taste']; |
| @@ -586,17 +587,17 @@ class MenuSunModel { | @@ -586,17 +587,17 @@ class MenuSunModel { | ||
| 586 | spec = []; | 587 | spec = []; |
| 587 | json['spec'].forEach((v) { | 588 | json['spec'].forEach((v) { |
| 588 | if (v is Map) { | 589 | if (v is Map) { |
| 589 | - spec.add(new SpecModel.fromJson(v)); | 590 | + spec!.add(new SpecModel.fromJson(v as Map<String, dynamic>)); |
| 590 | } else if (v is SpecModel) { | 591 | } else if (v is SpecModel) { |
| 591 | - spec.add(v); | 592 | + spec!.add(v); |
| 592 | } | 593 | } |
| 593 | }); | 594 | }); |
| 594 | } | 595 | } |
| 595 | if (spec != null) { | 596 | if (spec != null) { |
| 596 | specCan = []; | 597 | specCan = []; |
| 597 | - spec.forEach((v) { | 598 | + spec!.forEach((v) { |
| 598 | if (v.status == '1') { | 599 | if (v.status == '1') { |
| 599 | - specCan.add(v); | 600 | + specCan!.add(v); |
| 600 | } | 601 | } |
| 601 | }); | 602 | }); |
| 602 | } | 603 | } |
| @@ -608,15 +609,15 @@ class MenuSunModel { | @@ -608,15 +609,15 @@ class MenuSunModel { | ||
| 608 | // } else { | 609 | // } else { |
| 609 | json['practice'].forEach((v) { | 610 | json['practice'].forEach((v) { |
| 610 | if (v is Map) { | 611 | if (v is Map) { |
| 611 | - practice.add(new PracticeModel.fromJson(v)); | 612 | + practice!.add(new PracticeModel.fromJson(v as Map<String, dynamic>)); |
| 612 | } else if (v is PracticeModel) { | 613 | } else if (v is PracticeModel) { |
| 613 | - practice.add(v); | 614 | + practice!.add(v); |
| 614 | } | 615 | } |
| 615 | }); | 616 | }); |
| 616 | // } | 617 | // } |
| 617 | } | 618 | } |
| 618 | amount = json['amount'] ?? 0; | 619 | amount = json['amount'] ?? 0; |
| 619 | - amountC.text = amount.toString(); | 620 | + amountC!.text = amount.toString(); |
| 620 | int amounttemp = 0; | 621 | int amounttemp = 0; |
| 621 | if (json['amountHasOrderList'] != null) { | 622 | if (json['amountHasOrderList'] != null) { |
| 622 | amountHasOrderList = []; | 623 | amountHasOrderList = []; |
| @@ -624,13 +625,13 @@ class MenuSunModel { | @@ -624,13 +625,13 @@ class MenuSunModel { | ||
| 624 | // } else { | 625 | // } else { |
| 625 | json['amountHasOrderList'].forEach((v) { | 626 | json['amountHasOrderList'].forEach((v) { |
| 626 | if (v is Map) { | 627 | if (v is Map) { |
| 627 | - amounttemp += v['amount']; | ||
| 628 | - amountHasOrderList.add(new AmountHasOrder.fromJson(v)); | 628 | + amounttemp += int.parse(v['amount']); |
| 629 | + amountHasOrderList!.add(new AmountHasOrder.fromJson(v as Map<String, dynamic>)); | ||
| 629 | } else if (v is AmountHasOrder) { | 630 | } else if (v is AmountHasOrder) { |
| 630 | - amounttemp += v.amount; | ||
| 631 | - amountHasOrderList.add(v); | 631 | + amounttemp += v.amount!; |
| 632 | + amountHasOrderList!.add(v); | ||
| 632 | } | 633 | } |
| 633 | - amount = amounttemp * (json['out_all_num'] ?? 1); | 634 | + amount = amounttemp * (json['out_all_num'] ?? 1) as int?; |
| 634 | }); | 635 | }); |
| 635 | // } | 636 | // } |
| 636 | 637 | ||
| @@ -638,7 +639,7 @@ class MenuSunModel { | @@ -638,7 +639,7 @@ class MenuSunModel { | ||
| 638 | if (json['cookList'] != null) { | 639 | if (json['cookList'] != null) { |
| 639 | cookList = []; | 640 | cookList = []; |
| 640 | json['cookList'].forEach((v) { | 641 | json['cookList'].forEach((v) { |
| 641 | - cookList.add(new MenuModel.fromJson2(v)); | 642 | + cookList!.add(new MenuModel.fromJson2(v)); |
| 642 | }); | 643 | }); |
| 643 | } | 644 | } |
| 644 | taste = json['taste']; | 645 | taste = json['taste']; |
| @@ -685,17 +686,17 @@ class MenuSunModel { | @@ -685,17 +686,17 @@ class MenuSunModel { | ||
| 685 | spec = []; | 686 | spec = []; |
| 686 | json['spec'].forEach((v) { | 687 | json['spec'].forEach((v) { |
| 687 | if (v is Map) { | 688 | if (v is Map) { |
| 688 | - spec.add(new SpecModel.fromJson(v)); | 689 | + spec!.add(new SpecModel.fromJson(v as Map<String, dynamic>)); |
| 689 | } else if (v is SpecModel) { | 690 | } else if (v is SpecModel) { |
| 690 | - spec.add(v); | 691 | + spec!.add(v); |
| 691 | } | 692 | } |
| 692 | }); | 693 | }); |
| 693 | } | 694 | } |
| 694 | if (spec != null) { | 695 | if (spec != null) { |
| 695 | specCan = []; | 696 | specCan = []; |
| 696 | - spec.forEach((v) { | 697 | + spec!.forEach((v) { |
| 697 | if (v.status == '1') { | 698 | if (v.status == '1') { |
| 698 | - specCan.add(v); | 699 | + specCan!.add(v); |
| 699 | } | 700 | } |
| 700 | }); | 701 | }); |
| 701 | } | 702 | } |
| @@ -707,15 +708,15 @@ class MenuSunModel { | @@ -707,15 +708,15 @@ class MenuSunModel { | ||
| 707 | // } else { | 708 | // } else { |
| 708 | json['practice'].forEach((v) { | 709 | json['practice'].forEach((v) { |
| 709 | if (v is Map) { | 710 | if (v is Map) { |
| 710 | - practice.add(new PracticeModel.fromJson(v)); | 711 | + practice!.add(new PracticeModel.fromJson(v as Map<String, dynamic>)); |
| 711 | } else if (v is PracticeModel) { | 712 | } else if (v is PracticeModel) { |
| 712 | - practice.add(v); | 713 | + practice!.add(v); |
| 713 | } | 714 | } |
| 714 | }); | 715 | }); |
| 715 | // } | 716 | // } |
| 716 | } | 717 | } |
| 717 | amount = json['amount'] ?? 0; | 718 | amount = json['amount'] ?? 0; |
| 718 | - amountC.text = amount.toString(); | 719 | + amountC!.text = amount.toString(); |
| 719 | int amounttemp = 0; | 720 | int amounttemp = 0; |
| 720 | if (json['amountHasOrderList'] != null) { | 721 | if (json['amountHasOrderList'] != null) { |
| 721 | amountHasOrderList = []; | 722 | amountHasOrderList = []; |
| @@ -724,10 +725,10 @@ class MenuSunModel { | @@ -724,10 +725,10 @@ class MenuSunModel { | ||
| 724 | json['amountHasOrderList'].forEach((v) { | 725 | json['amountHasOrderList'].forEach((v) { |
| 725 | if (v is Map) { | 726 | if (v is Map) { |
| 726 | // amounttemp += v['amount']; | 727 | // amounttemp += v['amount']; |
| 727 | - amountHasOrderList.add(new AmountHasOrder.fromJson(v)); | 728 | + amountHasOrderList!.add(new AmountHasOrder.fromJson(v as Map<String, dynamic>)); |
| 728 | } else if (v is AmountHasOrder) { | 729 | } else if (v is AmountHasOrder) { |
| 729 | // amounttemp += v.amount; | 730 | // amounttemp += v.amount; |
| 730 | - amountHasOrderList.add(v); | 731 | + amountHasOrderList!.add(v); |
| 731 | } | 732 | } |
| 732 | // amount = amounttemp; | 733 | // amount = amounttemp; |
| 733 | // amount = amounttemp * json['out_all_num']; | 734 | // amount = amounttemp * json['out_all_num']; |
| @@ -738,7 +739,7 @@ class MenuSunModel { | @@ -738,7 +739,7 @@ class MenuSunModel { | ||
| 738 | if (json['cookList'] != null) { | 739 | if (json['cookList'] != null) { |
| 739 | cookList = []; | 740 | cookList = []; |
| 740 | json['cookList'].forEach((v) { | 741 | json['cookList'].forEach((v) { |
| 741 | - cookList.add(new MenuModel.fromJson2(v)); | 742 | + cookList!.add(new MenuModel.fromJson2(v)); |
| 742 | }); | 743 | }); |
| 743 | } | 744 | } |
| 744 | taste = json['taste']; | 745 | taste = json['taste']; |
| @@ -799,9 +800,9 @@ class MenuSunModel { | @@ -799,9 +800,9 @@ class MenuSunModel { | ||
| 799 | } | 800 | } |
| 800 | 801 | ||
| 801 | class AmountHasOrder { | 802 | class AmountHasOrder { |
| 802 | - int amount; | ||
| 803 | - SpecModel specModel; //规格(价格+单位) | ||
| 804 | - PracticeModel practiceModel; //做法 | 803 | + int? amount; |
| 804 | + SpecModel? specModel; //规格(价格+单位) | ||
| 805 | + PracticeModel? practiceModel; //做法 | ||
| 805 | TextEditingController amountClist = TextEditingController(); | 806 | TextEditingController amountClist = TextEditingController(); |
| 806 | 807 | ||
| 807 | AmountHasOrder({ | 808 | AmountHasOrder({ |
| @@ -832,14 +833,14 @@ class AmountHasOrder { | @@ -832,14 +833,14 @@ class AmountHasOrder { | ||
| 832 | } | 833 | } |
| 833 | 834 | ||
| 834 | class SpecModel { | 835 | class SpecModel { |
| 835 | - String id; | ||
| 836 | - String cid; | ||
| 837 | - String specid; | ||
| 838 | - String specs; | ||
| 839 | - String price; | ||
| 840 | - String memberPrice; | 836 | + String? id; |
| 837 | + String? cid; | ||
| 838 | + String? specid; | ||
| 839 | + String? specs; | ||
| 840 | + String? price; | ||
| 841 | + String? memberPrice; | ||
| 841 | Null clearNum; | 842 | Null clearNum; |
| 842 | - String status; | 843 | + String? status; |
| 843 | bool select = false; | 844 | bool select = false; |
| 844 | 845 | ||
| 845 | SpecModel( | 846 | SpecModel( |
| @@ -878,12 +879,12 @@ class SpecModel { | @@ -878,12 +879,12 @@ class SpecModel { | ||
| 878 | } | 879 | } |
| 879 | 880 | ||
| 880 | class PracticeModel { | 881 | class PracticeModel { |
| 881 | - String id; | ||
| 882 | - String cid; | ||
| 883 | - String practice; | ||
| 884 | - String name; | ||
| 885 | - String price; | ||
| 886 | - String memberPrice; | 882 | + String? id; |
| 883 | + String? cid; | ||
| 884 | + String? practice; | ||
| 885 | + String? name; | ||
| 886 | + String? price; | ||
| 887 | + String? memberPrice; | ||
| 887 | bool select = false; | 888 | bool select = false; |
| 888 | 889 | ||
| 889 | PracticeModel( | 890 | PracticeModel( |
| @@ -916,8 +917,8 @@ class PracticeModel { | @@ -916,8 +917,8 @@ class PracticeModel { | ||
| 916 | } | 917 | } |
| 917 | 918 | ||
| 918 | class DishCookStyle { | 919 | class DishCookStyle { |
| 919 | - String imageType; //1大图,2小图 | ||
| 920 | - String nameType; //1左侧,2右侧,3顶部分开 | 920 | + String? imageType; //1大图,2小图 |
| 921 | + String? nameType; //1左侧,2右侧,3顶部分开 | ||
| 921 | 922 | ||
| 922 | DishCookStyle({this.imageType, this.nameType}); | 923 | DishCookStyle({this.imageType, this.nameType}); |
| 923 | 924 |
| 1 | + | ||
| 1 | import 'package:json_annotation/json_annotation.dart'; | 2 | import 'package:json_annotation/json_annotation.dart'; |
| 2 | import 'package:one_key/models/cookbook_model.dart'; | 3 | import 'package:one_key/models/cookbook_model.dart'; |
| 3 | import 'dart:convert' as convert; | 4 | import 'dart:convert' as convert; |
| @@ -7,13 +8,13 @@ part 'cookbook_one_model.g.dart'; | @@ -7,13 +8,13 @@ part 'cookbook_one_model.g.dart'; | ||
| 7 | @JsonSerializable() | 8 | @JsonSerializable() |
| 8 | class CookbookOneModel extends Object { | 9 | class CookbookOneModel extends Object { |
| 9 | @JsonKey(name: 'ret') | 10 | @JsonKey(name: 'ret') |
| 10 | - int ret; | 11 | + int? ret; |
| 11 | 12 | ||
| 12 | @JsonKey(name: 'data') | 13 | @JsonKey(name: 'data') |
| 13 | - Data data; | 14 | + Data? data; |
| 14 | 15 | ||
| 15 | @JsonKey(name: 'msg') | 16 | @JsonKey(name: 'msg') |
| 16 | - String msg; | 17 | + String? msg; |
| 17 | 18 | ||
| 18 | CookbookOneModel( | 19 | CookbookOneModel( |
| 19 | this.ret, | 20 | this.ret, |
| @@ -30,7 +31,7 @@ class CookbookOneModel extends Object { | @@ -30,7 +31,7 @@ class CookbookOneModel extends Object { | ||
| 30 | @JsonSerializable() | 31 | @JsonSerializable() |
| 31 | class Data extends Object { | 32 | class Data extends Object { |
| 32 | @JsonKey(name: 'data') | 33 | @JsonKey(name: 'data') |
| 33 | - CookbookOneSunModel data; | 34 | + CookbookOneSunModel? data; |
| 34 | 35 | ||
| 35 | Data( | 36 | Data( |
| 36 | this.data, | 37 | this.data, |
| @@ -45,73 +46,73 @@ class Data extends Object { | @@ -45,73 +46,73 @@ class Data extends Object { | ||
| 45 | @JsonSerializable() | 46 | @JsonSerializable() |
| 46 | class CookbookOneSunModel extends Object { | 47 | class CookbookOneSunModel extends Object { |
| 47 | @JsonKey(name: 'id') | 48 | @JsonKey(name: 'id') |
| 48 | - String id; | 49 | + String? id; |
| 49 | 50 | ||
| 50 | @JsonKey(name: 'sellerid') | 51 | @JsonKey(name: 'sellerid') |
| 51 | - String sellerid; | 52 | + String? sellerid; |
| 52 | 53 | ||
| 53 | @JsonKey(name: 'cid') | 54 | @JsonKey(name: 'cid') |
| 54 | - String cid; | 55 | + String? cid; |
| 55 | 56 | ||
| 56 | @JsonKey(name: 'unit') | 57 | @JsonKey(name: 'unit') |
| 57 | - String unit; | 58 | + String? unit; |
| 58 | 59 | ||
| 59 | @JsonKey(name: 'name') | 60 | @JsonKey(name: 'name') |
| 60 | - String name; | 61 | + String? name; |
| 61 | 62 | ||
| 62 | @JsonKey(name: 'price') | 63 | @JsonKey(name: 'price') |
| 63 | - String price; | 64 | + String? price; |
| 64 | 65 | ||
| 65 | @JsonKey(name: 'first_name') | 66 | @JsonKey(name: 'first_name') |
| 66 | - String firstName; | 67 | + String? firstName; |
| 67 | 68 | ||
| 68 | @JsonKey(name: 'channel') | 69 | @JsonKey(name: 'channel') |
| 69 | - String channel; | 70 | + String? channel; |
| 70 | 71 | ||
| 71 | @JsonKey(name: 'status') | 72 | @JsonKey(name: 'status') |
| 72 | - String status; | 73 | + String? status; |
| 73 | 74 | ||
| 74 | @JsonKey(name: 'give') | 75 | @JsonKey(name: 'give') |
| 75 | - String give; | 76 | + String? give; |
| 76 | 77 | ||
| 77 | @JsonKey(name: 'image') | 78 | @JsonKey(name: 'image') |
| 78 | - String image; | 79 | + String? image; |
| 79 | 80 | ||
| 80 | @JsonKey(name: 'order_o') | 81 | @JsonKey(name: 'order_o') |
| 81 | - String orderO; | 82 | + String? orderO; |
| 82 | 83 | ||
| 83 | @JsonKey(name: 'cdate') | 84 | @JsonKey(name: 'cdate') |
| 84 | - String cdate; | 85 | + String? cdate; |
| 85 | 86 | ||
| 86 | @JsonKey(name: 'class_name') | 87 | @JsonKey(name: 'class_name') |
| 87 | - String className; | 88 | + String? className; |
| 88 | 89 | ||
| 89 | @JsonKey(name: 'class_order') | 90 | @JsonKey(name: 'class_order') |
| 90 | - String classOrder; | 91 | + String? classOrder; |
| 91 | 92 | ||
| 92 | @JsonKey(name: 'attr') | 93 | @JsonKey(name: 'attr') |
| 93 | - List<dynamic> attr; | 94 | + List<dynamic>? attr; |
| 94 | 95 | ||
| 95 | @JsonKey(name: 'spec') | 96 | @JsonKey(name: 'spec') |
| 96 | - List<SpecModel> spec; | 97 | + List<SpecModel?>? spec; |
| 97 | 98 | ||
| 98 | @JsonKey(name: 'practice') | 99 | @JsonKey(name: 'practice') |
| 99 | - List<PracticeModel> practice; | 100 | + List<PracticeModel?>? practice; |
| 100 | 101 | ||
| 101 | // @JsonKey(name: 'template') | 102 | // @JsonKey(name: 'template') |
| 102 | // Template template; | 103 | // Template template; |
| 103 | 104 | ||
| 104 | @JsonKey(name: 'taste') | 105 | @JsonKey(name: 'taste') |
| 105 | - String taste; | 106 | + String? taste; |
| 106 | 107 | ||
| 107 | @JsonKey(name: 'cooks') | 108 | @JsonKey(name: 'cooks') |
| 108 | - String cooks; | 109 | + String? cooks; |
| 109 | 110 | ||
| 110 | @JsonKey(name: 'cook_style') | 111 | @JsonKey(name: 'cook_style') |
| 111 | - DishCookStyle cookStyle; | 112 | + DishCookStyle? cookStyle; |
| 112 | 113 | ||
| 113 | @JsonKey(name: 'desc') | 114 | @JsonKey(name: 'desc') |
| 114 | - String desc; | 115 | + String? desc; |
| 115 | 116 | ||
| 116 | CookbookOneSunModel( | 117 | CookbookOneSunModel( |
| 117 | this.id, | 118 | this.id, |
| @@ -8,11 +8,11 @@ part of 'cookbook_one_model.dart'; | @@ -8,11 +8,11 @@ part of 'cookbook_one_model.dart'; | ||
| 8 | 8 | ||
| 9 | CookbookOneModel _$CookbookOneModelFromJson(Map<String, dynamic> json) { | 9 | CookbookOneModel _$CookbookOneModelFromJson(Map<String, dynamic> json) { |
| 10 | return CookbookOneModel( | 10 | return CookbookOneModel( |
| 11 | - json['ret'] as int, | 11 | + json['ret'] as int?, |
| 12 | json['data'] == null | 12 | json['data'] == null |
| 13 | ? null | 13 | ? null |
| 14 | : Data.fromJson(json['data'] as Map<String, dynamic>), | 14 | : Data.fromJson(json['data'] as Map<String, dynamic>), |
| 15 | - json['msg'] as String, | 15 | + json['msg'] as String?, |
| 16 | ); | 16 | ); |
| 17 | } | 17 | } |
| 18 | 18 | ||
| @@ -37,37 +37,37 @@ Map<String, dynamic> _$DataToJson(Data instance) => <String, dynamic>{ | @@ -37,37 +37,37 @@ Map<String, dynamic> _$DataToJson(Data instance) => <String, dynamic>{ | ||
| 37 | 37 | ||
| 38 | CookbookOneSunModel _$CookbookOneSunModelFromJson(Map<String, dynamic> json) { | 38 | CookbookOneSunModel _$CookbookOneSunModelFromJson(Map<String, dynamic> json) { |
| 39 | return CookbookOneSunModel( | 39 | return CookbookOneSunModel( |
| 40 | - json['id'] as String, | ||
| 41 | - json['sellerid'] as String, | ||
| 42 | - json['cid'] as String, | ||
| 43 | - json['unit'] as String, | ||
| 44 | - json['name'] as String, | ||
| 45 | - json['price'] as String, | ||
| 46 | - json['first_name'] as String, | ||
| 47 | - json['channel'] as String, | ||
| 48 | - json['status'] as String, | ||
| 49 | - json['give'] as String, | ||
| 50 | - json['image'] as String, | ||
| 51 | - json['order_o'] as String, | ||
| 52 | - json['cdate'] as String, | ||
| 53 | - json['class_name'] as String, | ||
| 54 | - json['class_order'] as String, | ||
| 55 | - json['attr'] as List, | ||
| 56 | - (json['spec'] as List) | 40 | + json['id'] as String?, |
| 41 | + json['sellerid'] as String?, | ||
| 42 | + json['cid'] as String?, | ||
| 43 | + json['unit'] as String?, | ||
| 44 | + json['name'] as String?, | ||
| 45 | + json['price'] as String?, | ||
| 46 | + json['first_name'] as String?, | ||
| 47 | + json['channel'] as String?, | ||
| 48 | + json['status'] as String?, | ||
| 49 | + json['give'] as String?, | ||
| 50 | + json['image'] as String?, | ||
| 51 | + json['order_o'] as String?, | ||
| 52 | + json['cdate'] as String?, | ||
| 53 | + json['class_name'] as String?, | ||
| 54 | + json['class_order'] as String?, | ||
| 55 | + json['attr'] as List?, | ||
| 56 | + (json['spec'] as List?) | ||
| 57 | ?.map((e) => | 57 | ?.map((e) => |
| 58 | e == null ? null : SpecModel.fromJson(e as Map<String, dynamic>)) | 58 | e == null ? null : SpecModel.fromJson(e as Map<String, dynamic>)) |
| 59 | - ?.toList(), | ||
| 60 | - (json['practice'] as List) | 59 | + .toList(), |
| 60 | + (json['practice'] as List?) | ||
| 61 | ?.map((e) => e == null | 61 | ?.map((e) => e == null |
| 62 | ? null | 62 | ? null |
| 63 | : PracticeModel.fromJson(e as Map<String, dynamic>)) | 63 | : PracticeModel.fromJson(e as Map<String, dynamic>)) |
| 64 | - ?.toList(), | ||
| 65 | - json['taste'] as String, | ||
| 66 | - json['cooks'] as String, | 64 | + .toList(), |
| 65 | + json['taste'] as String?, | ||
| 66 | + json['cooks'] as String?, | ||
| 67 | json['cook_style'] == null | 67 | json['cook_style'] == null |
| 68 | ? null | 68 | ? null |
| 69 | : DishCookStyle.fromJson(convert.json.decode(json['cook_style'])), | 69 | : DishCookStyle.fromJson(convert.json.decode(json['cook_style'])), |
| 70 | - json['desc'] as String, | 70 | + json['desc'] as String?, |
| 71 | ); | 71 | ); |
| 72 | } | 72 | } |
| 73 | 73 |
| 1 | + | ||
| 1 | class CookbookPracticeModel { | 2 | class CookbookPracticeModel { |
| 2 | - int ret; | ||
| 3 | - List<CookbookPracticeSunModel> data; | ||
| 4 | - String msg; | 3 | + int? ret; |
| 4 | + List<CookbookPracticeSunModel>? data; | ||
| 5 | + String? msg; | ||
| 5 | 6 | ||
| 6 | CookbookPracticeModel({this.ret, this.data, this.msg}); | 7 | CookbookPracticeModel({this.ret, this.data, this.msg}); |
| 7 | 8 | ||
| @@ -10,7 +11,7 @@ class CookbookPracticeModel { | @@ -10,7 +11,7 @@ class CookbookPracticeModel { | ||
| 10 | if (json['data'] != null) { | 11 | if (json['data'] != null) { |
| 11 | data = []; | 12 | data = []; |
| 12 | json['data'][0].forEach((v) { | 13 | json['data'][0].forEach((v) { |
| 13 | - data.add(new CookbookPracticeSunModel.fromJson(v)); | 14 | + data!.add(new CookbookPracticeSunModel.fromJson(v)); |
| 14 | }); | 15 | }); |
| 15 | } | 16 | } |
| 16 | msg = json['msg']; | 17 | msg = json['msg']; |
| @@ -20,7 +21,7 @@ class CookbookPracticeModel { | @@ -20,7 +21,7 @@ class CookbookPracticeModel { | ||
| 20 | final Map<String, dynamic> data = new Map<String, dynamic>(); | 21 | final Map<String, dynamic> data = new Map<String, dynamic>(); |
| 21 | data['ret'] = this.ret; | 22 | data['ret'] = this.ret; |
| 22 | if (this.data != null) { | 23 | if (this.data != null) { |
| 23 | - data['data'] = this.data.map((v) => v.toJson()).toList(); | 24 | + data['data'] = this.data!.map((v) => v.toJson()).toList(); |
| 24 | } | 25 | } |
| 25 | data['msg'] = this.msg; | 26 | data['msg'] = this.msg; |
| 26 | return data; | 27 | return data; |
| @@ -28,10 +29,10 @@ class CookbookPracticeModel { | @@ -28,10 +29,10 @@ class CookbookPracticeModel { | ||
| 28 | } | 29 | } |
| 29 | 30 | ||
| 30 | class CookbookPracticeSunModel { | 31 | class CookbookPracticeSunModel { |
| 31 | - String id; | ||
| 32 | - String sellerid; | ||
| 33 | - String name; | ||
| 34 | - String cdate; | 32 | + String? id; |
| 33 | + String? sellerid; | ||
| 34 | + String? name; | ||
| 35 | + String? cdate; | ||
| 35 | bool select = false; | 36 | bool select = false; |
| 36 | 37 | ||
| 37 | CookbookPracticeSunModel({this.id, this.sellerid, this.name, this.cdate}); | 38 | CookbookPracticeSunModel({this.id, this.sellerid, this.name, this.cdate}); |
| 1 | + | ||
| 1 | import 'package:json_annotation/json_annotation.dart'; | 2 | import 'package:json_annotation/json_annotation.dart'; |
| 2 | 3 | ||
| 3 | part 'cookbook_spec_model.g.dart'; | 4 | part 'cookbook_spec_model.g.dart'; |
| @@ -5,13 +6,13 @@ part 'cookbook_spec_model.g.dart'; | @@ -5,13 +6,13 @@ part 'cookbook_spec_model.g.dart'; | ||
| 5 | @JsonSerializable() | 6 | @JsonSerializable() |
| 6 | class CookbookSpecModel extends Object { | 7 | class CookbookSpecModel extends Object { |
| 7 | @JsonKey(name: 'ret') | 8 | @JsonKey(name: 'ret') |
| 8 | - int ret; | 9 | + int? ret; |
| 9 | 10 | ||
| 10 | @JsonKey(name: 'data') | 11 | @JsonKey(name: 'data') |
| 11 | - List<CookbookSpecSunModel> data; | 12 | + List<CookbookSpecSunModel?>? data; |
| 12 | 13 | ||
| 13 | @JsonKey(name: 'msg') | 14 | @JsonKey(name: 'msg') |
| 14 | - String msg; | 15 | + String? msg; |
| 15 | 16 | ||
| 16 | CookbookSpecModel( | 17 | CookbookSpecModel( |
| 17 | this.ret, | 18 | this.ret, |
| @@ -28,16 +29,16 @@ class CookbookSpecModel extends Object { | @@ -28,16 +29,16 @@ class CookbookSpecModel extends Object { | ||
| 28 | @JsonSerializable() | 29 | @JsonSerializable() |
| 29 | class CookbookSpecSunModel extends Object { | 30 | class CookbookSpecSunModel extends Object { |
| 30 | @JsonKey(name: 'id') | 31 | @JsonKey(name: 'id') |
| 31 | - String id; | 32 | + String? id; |
| 32 | 33 | ||
| 33 | @JsonKey(name: 'sellerid') | 34 | @JsonKey(name: 'sellerid') |
| 34 | - String sellerid; | 35 | + String? sellerid; |
| 35 | 36 | ||
| 36 | @JsonKey(name: 'name') | 37 | @JsonKey(name: 'name') |
| 37 | - String name; | 38 | + String? name; |
| 38 | 39 | ||
| 39 | @JsonKey(name: 'cdate') | 40 | @JsonKey(name: 'cdate') |
| 40 | - String cdate; | 41 | + String? cdate; |
| 41 | 42 | ||
| 42 | bool select = false; | 43 | bool select = false; |
| 43 | 44 |
| @@ -8,13 +8,13 @@ part of 'cookbook_spec_model.dart'; | @@ -8,13 +8,13 @@ part of 'cookbook_spec_model.dart'; | ||
| 8 | 8 | ||
| 9 | CookbookSpecModel _$CookbookSpecModelFromJson(Map<String, dynamic> json) { | 9 | CookbookSpecModel _$CookbookSpecModelFromJson(Map<String, dynamic> json) { |
| 10 | return CookbookSpecModel( | 10 | return CookbookSpecModel( |
| 11 | - json['ret'] as int, | ||
| 12 | - (json['data'][0] as List) | 11 | + json['ret'] as int?, |
| 12 | + (json['data'][0] as List?) | ||
| 13 | ?.map((e) => e == null | 13 | ?.map((e) => e == null |
| 14 | ? null | 14 | ? null |
| 15 | : CookbookSpecSunModel.fromJson(e as Map<String, dynamic>)) | 15 | : CookbookSpecSunModel.fromJson(e as Map<String, dynamic>)) |
| 16 | - ?.toList(), | ||
| 17 | - json['msg'] as String, | 16 | + .toList(), |
| 17 | + json['msg'] as String?, | ||
| 18 | ); | 18 | ); |
| 19 | } | 19 | } |
| 20 | 20 | ||
| @@ -27,10 +27,10 @@ Map<String, dynamic> _$CookbookSpecModelToJson(CookbookSpecModel instance) => | @@ -27,10 +27,10 @@ Map<String, dynamic> _$CookbookSpecModelToJson(CookbookSpecModel instance) => | ||
| 27 | 27 | ||
| 28 | CookbookSpecSunModel _$CookbookSpecSunModelFromJson(Map<String, dynamic> json) { | 28 | CookbookSpecSunModel _$CookbookSpecSunModelFromJson(Map<String, dynamic> json) { |
| 29 | return CookbookSpecSunModel( | 29 | return CookbookSpecSunModel( |
| 30 | - json['id'] as String, | ||
| 31 | - json['sellerid'] as String, | ||
| 32 | - json['name'] as String, | ||
| 33 | - json['cdate'] as String, | 30 | + json['id'] as String?, |
| 31 | + json['sellerid'] as String?, | ||
| 32 | + json['name'] as String?, | ||
| 33 | + json['cdate'] as String?, | ||
| 34 | ); | 34 | ); |
| 35 | } | 35 | } |
| 36 | 36 |
| 1 | + | ||
| 1 | import 'dart:convert'; | 2 | import 'dart:convert'; |
| 2 | 3 | ||
| 3 | import 'package:json_annotation/json_annotation.dart'; | 4 | import 'package:json_annotation/json_annotation.dart'; |
| @@ -11,13 +12,13 @@ part 'coupon_model.g.dart'; | @@ -11,13 +12,13 @@ part 'coupon_model.g.dart'; | ||
| 11 | @JsonSerializable() | 12 | @JsonSerializable() |
| 12 | class CouponModel extends Object { | 13 | class CouponModel extends Object { |
| 13 | @JsonKey(name: 'ret') | 14 | @JsonKey(name: 'ret') |
| 14 | - int ret; | 15 | + int? ret; |
| 15 | 16 | ||
| 16 | @JsonKey(name: 'data') | 17 | @JsonKey(name: 'data') |
| 17 | - List<CouponSunModel> data; | 18 | + List<CouponSunModel?>? data; |
| 18 | 19 | ||
| 19 | @JsonKey(name: 'msg') | 20 | @JsonKey(name: 'msg') |
| 20 | - String msg; | 21 | + String? msg; |
| 21 | 22 | ||
| 22 | CouponModel( | 23 | CouponModel( |
| 23 | this.ret, | 24 | this.ret, |
| @@ -34,50 +35,50 @@ class CouponModel extends Object { | @@ -34,50 +35,50 @@ class CouponModel extends Object { | ||
| 34 | @JsonSerializable() | 35 | @JsonSerializable() |
| 35 | class CouponSunModel extends Object { | 36 | class CouponSunModel extends Object { |
| 36 | @JsonKey(name: 'id') | 37 | @JsonKey(name: 'id') |
| 37 | - String id; | 38 | + String? id; |
| 38 | 39 | ||
| 39 | @JsonKey(name: 'uid') | 40 | @JsonKey(name: 'uid') |
| 40 | - String uid; | 41 | + String? uid; |
| 41 | 42 | ||
| 42 | @JsonKey(name: 'aname') | 43 | @JsonKey(name: 'aname') |
| 43 | - String aname; | 44 | + String? aname; |
| 44 | 45 | ||
| 45 | @JsonKey(name: 'desc') | 46 | @JsonKey(name: 'desc') |
| 46 | - String desc; | 47 | + String? desc; |
| 47 | 48 | ||
| 48 | @JsonKey(name: 'stime') | 49 | @JsonKey(name: 'stime') |
| 49 | - String stime; | 50 | + String? stime; |
| 50 | 51 | ||
| 51 | @JsonKey(name: 'etime') | 52 | @JsonKey(name: 'etime') |
| 52 | - String etime; | 53 | + String? etime; |
| 53 | 54 | ||
| 54 | @JsonKey(name: 'explain') | 55 | @JsonKey(name: 'explain') |
| 55 | - String explain; | 56 | + String? explain; |
| 56 | 57 | ||
| 57 | @JsonKey(name: 'status') | 58 | @JsonKey(name: 'status') |
| 58 | - String status; | 59 | + String? status; |
| 59 | 60 | ||
| 60 | @JsonKey(name: 'cdate') | 61 | @JsonKey(name: 'cdate') |
| 61 | - String cdate; | 62 | + String? cdate; |
| 62 | 63 | ||
| 63 | @JsonKey(name: 'receive_num') | 64 | @JsonKey(name: 'receive_num') |
| 64 | - String receiveNum; | 65 | + String? receiveNum; |
| 65 | 66 | ||
| 66 | @JsonKey(name: 'use_num') | 67 | @JsonKey(name: 'use_num') |
| 67 | - String useNum; | 68 | + String? useNum; |
| 68 | 69 | ||
| 69 | @JsonKey(name: 'nickname') | 70 | @JsonKey(name: 'nickname') |
| 70 | - String nickname; | 71 | + String? nickname; |
| 71 | 72 | ||
| 72 | @JsonKey(name: 'uid_list') | 73 | @JsonKey(name: 'uid_list') |
| 73 | - String uidList; | 74 | + String? uidList; |
| 74 | @JsonKey(name: 'is_examine') | 75 | @JsonKey(name: 'is_examine') |
| 75 | - String isExamine; | 76 | + String? isExamine; |
| 76 | @JsonKey(name: 'is_type') | 77 | @JsonKey(name: 'is_type') |
| 77 | - String isType; | 78 | + String? isType; |
| 78 | 79 | ||
| 79 | @JsonKey(name: 'is_open') | 80 | @JsonKey(name: 'is_open') |
| 80 | - String isOpen; | 81 | + String? isOpen; |
| 81 | 82 | ||
| 82 | @JsonKey(name: 'is_open') | 83 | @JsonKey(name: 'is_open') |
| 83 | bool isOpenBool = false; | 84 | bool isOpenBool = false; |
| @@ -86,22 +87,22 @@ class CouponSunModel extends Object { | @@ -86,22 +87,22 @@ class CouponSunModel extends Object { | ||
| 86 | dynamic price; | 87 | dynamic price; |
| 87 | 88 | ||
| 88 | @JsonKey(name: 'use') | 89 | @JsonKey(name: 'use') |
| 89 | - CouponUse use; | 90 | + CouponUse? use; |
| 90 | 91 | ||
| 91 | @JsonKey(name: 'exp_date') | 92 | @JsonKey(name: 'exp_date') |
| 92 | - ExpDate expDate; | 93 | + ExpDate? expDate; |
| 93 | 94 | ||
| 94 | @JsonKey(name: 'nick_name') | 95 | @JsonKey(name: 'nick_name') |
| 95 | - String nickNameShow; | 96 | + String? nickNameShow; |
| 96 | 97 | ||
| 97 | @JsonKey(name: 'grant_num') | 98 | @JsonKey(name: 'grant_num') |
| 98 | - String grantNum; | 99 | + String? grantNum; |
| 99 | 100 | ||
| 100 | @JsonKey(name: 'urllink') | 101 | @JsonKey(name: 'urllink') |
| 101 | - String urllink; | 102 | + String? urllink; |
| 102 | 103 | ||
| 103 | @JsonKey(name: 'lite_qrcode') | 104 | @JsonKey(name: 'lite_qrcode') |
| 104 | - String liteQrcode; | 105 | + String? liteQrcode; |
| 105 | 106 | ||
| 106 | bool isCheck = false; | 107 | bool isCheck = false; |
| 107 | bool showText = false; | 108 | bool showText = false; |
| @@ -151,13 +152,13 @@ class CouponUse extends Object { | @@ -151,13 +152,13 @@ class CouponUse extends Object { | ||
| 151 | bool isDish; | 152 | bool isDish; |
| 152 | 153 | ||
| 153 | @JsonKey(name: 'cash') | 154 | @JsonKey(name: 'cash') |
| 154 | - String cash; | 155 | + String? cash; |
| 155 | 156 | ||
| 156 | @JsonKey(name: 'discount') | 157 | @JsonKey(name: 'discount') |
| 157 | - String discount; | 158 | + String? discount; |
| 158 | 159 | ||
| 159 | @JsonKey(name: 'dish') | 160 | @JsonKey(name: 'dish') |
| 160 | - String dish; | 161 | + String? dish; |
| 161 | 162 | ||
| 162 | @JsonKey(name: 'images') | 163 | @JsonKey(name: 'images') |
| 163 | List<String> images; | 164 | List<String> images; |
| @@ -183,7 +184,7 @@ class ExpDate extends Object { | @@ -183,7 +184,7 @@ class ExpDate extends Object { | ||
| 183 | bool isBirthday; | 184 | bool isBirthday; |
| 184 | 185 | ||
| 185 | @JsonKey(name: 'week_show') | 186 | @JsonKey(name: 'week_show') |
| 186 | - String weekShow; | 187 | + String? weekShow; |
| 187 | 188 | ||
| 188 | @JsonKey(name: 'week_data') | 189 | @JsonKey(name: 'week_data') |
| 189 | List<FilterBtnModel> weekData; | 190 | List<FilterBtnModel> weekData; |
| @@ -8,13 +8,13 @@ part of 'coupon_model.dart'; | @@ -8,13 +8,13 @@ part of 'coupon_model.dart'; | ||
| 8 | 8 | ||
| 9 | CouponModel _$CouponModelFromJson(Map<String, dynamic> json) { | 9 | CouponModel _$CouponModelFromJson(Map<String, dynamic> json) { |
| 10 | return CouponModel( | 10 | return CouponModel( |
| 11 | - json['ret'] as int, | ||
| 12 | - (json['data'] as List) | 11 | + json['ret'] as int?, |
| 12 | + (json['data'] as List?) | ||
| 13 | ?.map((e) => e == null | 13 | ?.map((e) => e == null |
| 14 | ? null | 14 | ? null |
| 15 | : CouponSunModel.fromJson(e as Map<String, dynamic>)) | 15 | : CouponSunModel.fromJson(e as Map<String, dynamic>)) |
| 16 | - ?.toList(), | ||
| 17 | - json['msg'] as String); | 16 | + .toList(), |
| 17 | + json['msg'] as String?); | ||
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | Map<String, dynamic> _$CouponModelToJson(CouponModel instance) => | 20 | Map<String, dynamic> _$CouponModelToJson(CouponModel instance) => |
| @@ -26,24 +26,24 @@ Map<String, dynamic> _$CouponModelToJson(CouponModel instance) => | @@ -26,24 +26,24 @@ Map<String, dynamic> _$CouponModelToJson(CouponModel instance) => | ||
| 26 | 26 | ||
| 27 | CouponSunModel _$CouponSunModelFromJson(Map<String, dynamic> json) { | 27 | CouponSunModel _$CouponSunModelFromJson(Map<String, dynamic> json) { |
| 28 | return CouponSunModel( | 28 | return CouponSunModel( |
| 29 | - json['id'] as String, | ||
| 30 | - json['uid'] as String, | ||
| 31 | - json['aname'] as String, | ||
| 32 | - json['desc'] as String, | ||
| 33 | - json['stime'] as String, | ||
| 34 | - json['etime'] as String, | ||
| 35 | - json['explain'] as String, | ||
| 36 | - json['status'] as String, | ||
| 37 | - json['cdate'] as String, | ||
| 38 | - json['receive_num'] as String, | ||
| 39 | - json['use_num'] as String, | ||
| 40 | - json['nickname'] as String, | ||
| 41 | - json['uid_list'] as String, | ||
| 42 | - json['is_examine'] as String, | ||
| 43 | - json['is_type'] as String, | ||
| 44 | - json['is_open'] as String, | 29 | + json['id'] as String?, |
| 30 | + json['uid'] as String?, | ||
| 31 | + json['aname'] as String?, | ||
| 32 | + json['desc'] as String?, | ||
| 33 | + json['stime'] as String?, | ||
| 34 | + json['etime'] as String?, | ||
| 35 | + json['explain'] as String?, | ||
| 36 | + json['status'] as String?, | ||
| 37 | + json['cdate'] as String?, | ||
| 38 | + json['receive_num'] as String?, | ||
| 39 | + json['use_num'] as String?, | ||
| 40 | + json['nickname'] as String?, | ||
| 41 | + json['uid_list'] as String?, | ||
| 42 | + json['is_examine'] as String?, | ||
| 43 | + json['is_type'] as String?, | ||
| 44 | + json['is_open'] as String?, | ||
| 45 | json['is_open'] == "1" ? true : false, | 45 | json['is_open'] == "1" ? true : false, |
| 46 | - json['price'] as String, | 46 | + json['price'] as String?, |
| 47 | json['use'] == null | 47 | json['use'] == null |
| 48 | ? null | 48 | ? null |
| 49 | : (json['use'] is String) | 49 | : (json['use'] is String) |
| @@ -58,10 +58,10 @@ CouponSunModel _$CouponSunModelFromJson(Map<String, dynamic> json) { | @@ -58,10 +58,10 @@ CouponSunModel _$CouponSunModelFromJson(Map<String, dynamic> json) { | ||
| 58 | : (json['exp_date'] is Map) | 58 | : (json['exp_date'] is Map) |
| 59 | ? ExpDate.fromJson(json['exp_date']) | 59 | ? ExpDate.fromJson(json['exp_date']) |
| 60 | : null, | 60 | : null, |
| 61 | - json['nick_name'] as String, | ||
| 62 | - json['grant_num'] as String, | ||
| 63 | - json['urllink'] as String, | ||
| 64 | - json['lite_qrcode'] as String, | 61 | + json['nick_name'] as String?, |
| 62 | + json['grant_num'] as String?, | ||
| 63 | + json['urllink'] as String?, | ||
| 64 | + json['lite_qrcode'] as String?, | ||
| 65 | ); | 65 | ); |
| 66 | } | 66 | } |
| 67 | 67 | ||
| @@ -133,8 +133,8 @@ CouponUse _$CouponUseFromJson(Map<String, dynamic> json) { | @@ -133,8 +133,8 @@ CouponUse _$CouponUseFromJson(Map<String, dynamic> json) { | ||
| 133 | } | 133 | } |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | - return CouponUse(iscash, isdiscount, isdish, json['cash'] as String, | ||
| 137 | - json['discount'] as String, json['dish'] as String, img); | 136 | + return CouponUse(iscash, isdiscount, isdish, json['cash'] as String?, |
| 137 | + json['discount'] as String?, json['dish'] as String?, img); | ||
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | Map<String, dynamic> _$CouponUseToJson(CouponUse instance) => <String, dynamic>{ | 140 | Map<String, dynamic> _$CouponUseToJson(CouponUse instance) => <String, dynamic>{ |
| @@ -175,7 +175,7 @@ ExpDate _$ExpDateFromJson(Map<String, dynamic> json) { | @@ -175,7 +175,7 @@ ExpDate _$ExpDateFromJson(Map<String, dynamic> json) { | ||
| 175 | isbirthday = json['is_birthday'] ? true : false; | 175 | isbirthday = json['is_birthday'] ? true : false; |
| 176 | } | 176 | } |
| 177 | return ExpDate( | 177 | return ExpDate( |
| 178 | - isnone, isweek, isbirthday, json['week_show'] as String, weekdata); | 178 | + isnone, isweek, isbirthday, json['week_show'] as String?, weekdata); |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | Map<String, dynamic> _$ExpDateToJson(ExpDate instance) => <String, dynamic>{ | 181 | Map<String, dynamic> _$ExpDateToJson(ExpDate instance) => <String, dynamic>{ |
| 1 | + | ||
| 1 | import 'package:json_annotation/json_annotation.dart'; | 2 | import 'package:json_annotation/json_annotation.dart'; |
| 2 | 3 | ||
| 3 | part 'created_order_model.g.dart'; | 4 | part 'created_order_model.g.dart'; |
| @@ -5,13 +6,13 @@ part 'created_order_model.g.dart'; | @@ -5,13 +6,13 @@ part 'created_order_model.g.dart'; | ||
| 5 | @JsonSerializable() | 6 | @JsonSerializable() |
| 6 | class CreatedOrderModel extends Object { | 7 | class CreatedOrderModel extends Object { |
| 7 | @JsonKey(name: 'ret') | 8 | @JsonKey(name: 'ret') |
| 8 | - int ret; | 9 | + int? ret; |
| 9 | 10 | ||
| 10 | @JsonKey(name: 'data') | 11 | @JsonKey(name: 'data') |
| 11 | - CreatedOrderSunModel data; | 12 | + CreatedOrderSunModel? data; |
| 12 | 13 | ||
| 13 | @JsonKey(name: 'msg') | 14 | @JsonKey(name: 'msg') |
| 14 | - String msg; | 15 | + String? msg; |
| 15 | 16 | ||
| 16 | CreatedOrderModel( | 17 | CreatedOrderModel( |
| 17 | this.ret, | 18 | this.ret, |
| @@ -28,48 +29,48 @@ class CreatedOrderModel extends Object { | @@ -28,48 +29,48 @@ class CreatedOrderModel extends Object { | ||
| 28 | @JsonSerializable() | 29 | @JsonSerializable() |
| 29 | class CreatedOrderSunModel extends Object { | 30 | class CreatedOrderSunModel extends Object { |
| 30 | @JsonKey(name: 'id') | 31 | @JsonKey(name: 'id') |
| 31 | - String id; | 32 | + String? id; |
| 32 | 33 | ||
| 33 | @JsonKey(name: 'rid') | 34 | @JsonKey(name: 'rid') |
| 34 | - String rid; | 35 | + String? rid; |
| 35 | @JsonKey(name: 'ddate') | 36 | @JsonKey(name: 'ddate') |
| 36 | - String ddate; | 37 | + String? ddate; |
| 37 | 38 | ||
| 38 | @JsonKey(name: 'no') | 39 | @JsonKey(name: 'no') |
| 39 | - String no; | 40 | + String? no; |
| 40 | 41 | ||
| 41 | @JsonKey(name: 'row_num') | 42 | @JsonKey(name: 'row_num') |
| 42 | - String rowNum; | 43 | + String? rowNum; |
| 43 | 44 | ||
| 44 | @JsonKey(name: 'pnum') | 45 | @JsonKey(name: 'pnum') |
| 45 | - String pnum; | 46 | + String? pnum; |
| 46 | 47 | ||
| 47 | @JsonKey(name: 'sellerid') | 48 | @JsonKey(name: 'sellerid') |
| 48 | - String sellerid; | 49 | + String? sellerid; |
| 49 | 50 | ||
| 50 | @JsonKey(name: 'openid') | 51 | @JsonKey(name: 'openid') |
| 51 | - String openid; | 52 | + String? openid; |
| 52 | 53 | ||
| 53 | @JsonKey(name: 'price') | 54 | @JsonKey(name: 'price') |
| 54 | - int price; | 55 | + int? price; |
| 55 | 56 | ||
| 56 | @JsonKey(name: 'type') | 57 | @JsonKey(name: 'type') |
| 57 | - String type; | 58 | + String? type; |
| 58 | 59 | ||
| 59 | @JsonKey(name: 'behavior') | 60 | @JsonKey(name: 'behavior') |
| 60 | - String behavior; | 61 | + String? behavior; |
| 61 | 62 | ||
| 62 | @JsonKey(name: 'cdate') | 63 | @JsonKey(name: 'cdate') |
| 63 | - String cdate; | 64 | + String? cdate; |
| 64 | 65 | ||
| 65 | @JsonKey(name: 'remark') | 66 | @JsonKey(name: 'remark') |
| 66 | - String remark; | 67 | + String? remark; |
| 67 | 68 | ||
| 68 | @JsonKey(name: 'cookbooklist') | 69 | @JsonKey(name: 'cookbooklist') |
| 69 | - List<Cookbooklist> cookbooklist; | 70 | + List<Cookbooklist?>? cookbooklist; |
| 70 | 71 | ||
| 71 | @JsonKey(name: 'seller') | 72 | @JsonKey(name: 'seller') |
| 72 | - Seller seller; | 73 | + Seller? seller; |
| 73 | 74 | ||
| 74 | CreatedOrderSunModel( | 75 | CreatedOrderSunModel( |
| 75 | this.id, | 76 | this.id, |
| @@ -97,67 +98,67 @@ class CreatedOrderSunModel extends Object { | @@ -97,67 +98,67 @@ class CreatedOrderSunModel extends Object { | ||
| 97 | @JsonSerializable() | 98 | @JsonSerializable() |
| 98 | class Cookbooklist extends Object { | 99 | class Cookbooklist extends Object { |
| 99 | @JsonKey(name: 'id') | 100 | @JsonKey(name: 'id') |
| 100 | - String id; | 101 | + String? id; |
| 101 | 102 | ||
| 102 | @JsonKey(name: 'orderid') | 103 | @JsonKey(name: 'orderid') |
| 103 | - String orderid; | 104 | + String? orderid; |
| 104 | 105 | ||
| 105 | @JsonKey(name: 'openid') | 106 | @JsonKey(name: 'openid') |
| 106 | - String openid; | 107 | + String? openid; |
| 107 | 108 | ||
| 108 | @JsonKey(name: 'cookbookid') | 109 | @JsonKey(name: 'cookbookid') |
| 109 | - String cookbookid; | 110 | + String? cookbookid; |
| 110 | 111 | ||
| 111 | @JsonKey(name: 'total') | 112 | @JsonKey(name: 'total') |
| 112 | - String total; | 113 | + String? total; |
| 113 | 114 | ||
| 114 | @JsonKey(name: 'price') | 115 | @JsonKey(name: 'price') |
| 115 | - String price; | 116 | + String? price; |
| 116 | 117 | ||
| 117 | @JsonKey(name: 'cookname') | 118 | @JsonKey(name: 'cookname') |
| 118 | - String cookname; | 119 | + String? cookname; |
| 119 | 120 | ||
| 120 | @JsonKey(name: 'cookunit') | 121 | @JsonKey(name: 'cookunit') |
| 121 | - String cookunit; | 122 | + String? cookunit; |
| 122 | 123 | ||
| 123 | @JsonKey(name: 'cookimage') | 124 | @JsonKey(name: 'cookimage') |
| 124 | - String cookimage; | 125 | + String? cookimage; |
| 125 | 126 | ||
| 126 | @JsonKey(name: 'class_name') | 127 | @JsonKey(name: 'class_name') |
| 127 | - String className; | 128 | + String? className; |
| 128 | 129 | ||
| 129 | @JsonKey(name: 'classid') | 130 | @JsonKey(name: 'classid') |
| 130 | - String classid; | 131 | + String? classid; |
| 131 | 132 | ||
| 132 | @JsonKey(name: 'class_order') | 133 | @JsonKey(name: 'class_order') |
| 133 | - String classOrder; | 134 | + String? classOrder; |
| 134 | 135 | ||
| 135 | @JsonKey(name: 'source') | 136 | @JsonKey(name: 'source') |
| 136 | - String source; | 137 | + String? source; |
| 137 | 138 | ||
| 138 | @JsonKey(name: 'status') | 139 | @JsonKey(name: 'status') |
| 139 | - String status; | 140 | + String? status; |
| 140 | 141 | ||
| 141 | @JsonKey(name: 'identity') | 142 | @JsonKey(name: 'identity') |
| 142 | - String identity; | 143 | + String? identity; |
| 143 | 144 | ||
| 144 | @JsonKey(name: 'cdate') | 145 | @JsonKey(name: 'cdate') |
| 145 | - String cdate; | 146 | + String? cdate; |
| 146 | 147 | ||
| 147 | @JsonKey(name: 'num') | 148 | @JsonKey(name: 'num') |
| 148 | - String number; | 149 | + String? number; |
| 149 | 150 | ||
| 150 | @JsonKey(name: 'practice_name') | 151 | @JsonKey(name: 'practice_name') |
| 151 | - String practiceName; | 152 | + String? practiceName; |
| 152 | 153 | ||
| 153 | @JsonKey(name: 'spec_price') | 154 | @JsonKey(name: 'spec_price') |
| 154 | - String specPrice; | 155 | + String? specPrice; |
| 155 | 156 | ||
| 156 | @JsonKey(name: 'spec_member_price') | 157 | @JsonKey(name: 'spec_member_price') |
| 157 | - String specMemberPrice; | 158 | + String? specMemberPrice; |
| 158 | 159 | ||
| 159 | @JsonKey(name: 'spec_name') | 160 | @JsonKey(name: 'spec_name') |
| 160 | - String specName; | 161 | + String? specName; |
| 161 | 162 | ||
| 162 | Cookbooklist( | 163 | Cookbooklist( |
| 163 | this.id, | 164 | this.id, |
| @@ -192,31 +193,31 @@ class Cookbooklist extends Object { | @@ -192,31 +193,31 @@ class Cookbooklist extends Object { | ||
| 192 | @JsonSerializable() | 193 | @JsonSerializable() |
| 193 | class Seller extends Object { | 194 | class Seller extends Object { |
| 194 | @JsonKey(name: 'id') | 195 | @JsonKey(name: 'id') |
| 195 | - String id; | 196 | + String? id; |
| 196 | 197 | ||
| 197 | @JsonKey(name: 'sellername') | 198 | @JsonKey(name: 'sellername') |
| 198 | - String sellername; | 199 | + String? sellername; |
| 199 | 200 | ||
| 200 | @JsonKey(name: 'seller_image') | 201 | @JsonKey(name: 'seller_image') |
| 201 | - String sellerImage; | 202 | + String? sellerImage; |
| 202 | 203 | ||
| 203 | @JsonKey(name: 'phone') | 204 | @JsonKey(name: 'phone') |
| 204 | - String phone; | 205 | + String? phone; |
| 205 | 206 | ||
| 206 | @JsonKey(name: 'map_address') | 207 | @JsonKey(name: 'map_address') |
| 207 | - String mapAddress; | 208 | + String? mapAddress; |
| 208 | 209 | ||
| 209 | @JsonKey(name: 'last_num') | 210 | @JsonKey(name: 'last_num') |
| 210 | - String lastNum; | 211 | + String? lastNum; |
| 211 | 212 | ||
| 212 | @JsonKey(name: 'long') | 213 | @JsonKey(name: 'long') |
| 213 | - String long; | 214 | + String? long; |
| 214 | 215 | ||
| 215 | @JsonKey(name: 'lat') | 216 | @JsonKey(name: 'lat') |
| 216 | - String lat; | 217 | + String? lat; |
| 217 | 218 | ||
| 218 | @JsonKey(name: 'daily') | 219 | @JsonKey(name: 'daily') |
| 219 | - String daily; | 220 | + String? daily; |
| 220 | 221 | ||
| 221 | Seller( | 222 | Seller( |
| 222 | this.id, | 223 | this.id, |
| @@ -8,11 +8,11 @@ part of 'created_order_model.dart'; | @@ -8,11 +8,11 @@ part of 'created_order_model.dart'; | ||
| 8 | 8 | ||
| 9 | CreatedOrderModel _$CreatedOrderModelFromJson(Map<String, dynamic> json) { | 9 | CreatedOrderModel _$CreatedOrderModelFromJson(Map<String, dynamic> json) { |
| 10 | return CreatedOrderModel( | 10 | return CreatedOrderModel( |
| 11 | - json['ret'] as int, | 11 | + json['ret'] as int?, |
| 12 | json['data'] == null | 12 | json['data'] == null |
| 13 | ? null | 13 | ? null |
| 14 | : CreatedOrderSunModel.fromJson(json['data'] as Map<String, dynamic>), | 14 | : CreatedOrderSunModel.fromJson(json['data'] as Map<String, dynamic>), |
| 15 | - json['msg'] as String); | 15 | + json['msg'] as String?); |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | Map<String, dynamic> _$CreatedOrderModelToJson(CreatedOrderModel instance) => | 18 | Map<String, dynamic> _$CreatedOrderModelToJson(CreatedOrderModel instance) => |
| @@ -24,27 +24,27 @@ Map<String, dynamic> _$CreatedOrderModelToJson(CreatedOrderModel instance) => | @@ -24,27 +24,27 @@ Map<String, dynamic> _$CreatedOrderModelToJson(CreatedOrderModel instance) => | ||
| 24 | 24 | ||
| 25 | CreatedOrderSunModel _$CreatedOrderSunModelFromJson(Map<String, dynamic> json) { | 25 | CreatedOrderSunModel _$CreatedOrderSunModelFromJson(Map<String, dynamic> json) { |
| 26 | return CreatedOrderSunModel( | 26 | return CreatedOrderSunModel( |
| 27 | - json['id'] as String, | ||
| 28 | - json['rid'] as String, | ||
| 29 | - json['ddate'] as String, | ||
| 30 | - json['no'] as String, | ||
| 31 | - json['row_num'] as String, | ||
| 32 | - json['pnum'] as String, | ||
| 33 | - json['sellerid'] as String, | ||
| 34 | - json['openid'] as String, | ||
| 35 | - json['price'] as int, | ||
| 36 | - json['type'] as String, | ||
| 37 | - json['behavior'] as String, | ||
| 38 | - json['cdate'] as String, | ||
| 39 | - (json['cookbooklist'] as List) | 27 | + json['id'] as String?, |
| 28 | + json['rid'] as String?, | ||
| 29 | + json['ddate'] as String?, | ||
| 30 | + json['no'] as String?, | ||
| 31 | + json['row_num'] as String?, | ||
| 32 | + json['pnum'] as String?, | ||
| 33 | + json['sellerid'] as String?, | ||
| 34 | + json['openid'] as String?, | ||
| 35 | + json['price'] as int?, | ||
| 36 | + json['type'] as String?, | ||
| 37 | + json['behavior'] as String?, | ||
| 38 | + json['cdate'] as String?, | ||
| 39 | + (json['cookbooklist'] as List?) | ||
| 40 | ?.map((e) => e == null | 40 | ?.map((e) => e == null |
| 41 | ? null | 41 | ? null |
| 42 | : Cookbooklist.fromJson(e as Map<String, dynamic>)) | 42 | : Cookbooklist.fromJson(e as Map<String, dynamic>)) |
| 43 | - ?.toList(), | 43 | + .toList(), |
| 44 | json['seller'] == null | 44 | json['seller'] == null |
| 45 | ? null | 45 | ? null |
| 46 | : Seller.fromJson(json['seller'] as Map<String, dynamic>), | 46 | : Seller.fromJson(json['seller'] as Map<String, dynamic>), |
| 47 | - json['remark'] as String); | 47 | + json['remark'] as String?); |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | Map<String, dynamic> _$CreatedOrderSunModelToJson( | 50 | Map<String, dynamic> _$CreatedOrderSunModelToJson( |
| @@ -69,27 +69,27 @@ Map<String, dynamic> _$CreatedOrderSunModelToJson( | @@ -69,27 +69,27 @@ Map<String, dynamic> _$CreatedOrderSunModelToJson( | ||
| 69 | 69 | ||
| 70 | Cookbooklist _$CookbooklistFromJson(Map<String, dynamic> json) { | 70 | Cookbooklist _$CookbooklistFromJson(Map<String, dynamic> json) { |
| 71 | return Cookbooklist( | 71 | return Cookbooklist( |
| 72 | - json['id'] as String, | ||
| 73 | - json['orderid'] as String, | ||
| 74 | - json['openid'] as String, | ||
| 75 | - json['cookbookid'] as String, | ||
| 76 | - json['total'] as String, | ||
| 77 | - json['price'] as String, | ||
| 78 | - json['cookname'] as String, | ||
| 79 | - json['cookunit'] as String, | ||
| 80 | - json['cookimage'] as String, | ||
| 81 | - json['class_name'] as String, | ||
| 82 | - json['classid'] as String, | ||
| 83 | - json['class_order'] as String, | ||
| 84 | - json['source'] as String, | ||
| 85 | - json['status'] as String, | ||
| 86 | - json['identity'] as String, | ||
| 87 | - json['cdate'] as String, | ||
| 88 | - json['num'] as String, | ||
| 89 | - json['practice_name'] as String, | ||
| 90 | - json['spec_price'] as String, | ||
| 91 | - json['spec_member_price'] as String, | ||
| 92 | - json['spec_name'] as String, | 72 | + json['id'] as String?, |
| 73 | + json['orderid'] as String?, | ||
| 74 | + json['openid'] as String?, | ||
| 75 | + json['cookbookid'] as String?, | ||
| 76 | + json['total'] as String?, | ||
| 77 | + json['price'] as String?, | ||
| 78 | + json['cookname'] as String?, | ||
| 79 | + json['cookunit'] as String?, | ||
| 80 | + json['cookimage'] as String?, | ||
| 81 | + json['class_name'] as String?, | ||
| 82 | + json['classid'] as String?, | ||
| 83 | + json['class_order'] as String?, | ||
| 84 | + json['source'] as String?, | ||
| 85 | + json['status'] as String?, | ||
| 86 | + json['identity'] as String?, | ||
| 87 | + json['cdate'] as String?, | ||
| 88 | + json['num'] as String?, | ||
| 89 | + json['practice_name'] as String?, | ||
| 90 | + json['spec_price'] as String?, | ||
| 91 | + json['spec_member_price'] as String?, | ||
| 92 | + json['spec_name'] as String?, | ||
| 93 | ); | 93 | ); |
| 94 | } | 94 | } |
| 95 | 95 | ||
| @@ -117,15 +117,15 @@ Map<String, dynamic> _$CookbooklistToJson(Cookbooklist instance) => | @@ -117,15 +117,15 @@ Map<String, dynamic> _$CookbooklistToJson(Cookbooklist instance) => | ||
| 117 | 117 | ||
| 118 | Seller _$SellerFromJson(Map<String, dynamic> json) { | 118 | Seller _$SellerFromJson(Map<String, dynamic> json) { |
| 119 | return Seller( | 119 | return Seller( |
| 120 | - json['id'] as String, | ||
| 121 | - json['sellername'] as String, | ||
| 122 | - json['seller_image'] as String, | ||
| 123 | - json['phone'] as String, | ||
| 124 | - json['map_address'] as String, | ||
| 125 | - json['last_num'] as String, | ||
| 126 | - json['long'] as String, | ||
| 127 | - json['lat'] as String, | ||
| 128 | - json['daily'] as String); | 120 | + json['id'] as String?, |
| 121 | + json['sellername'] as String?, | ||
| 122 | + json['seller_image'] as String?, | ||
| 123 | + json['phone'] as String?, | ||
| 124 | + json['map_address'] as String?, | ||
| 125 | + json['last_num'] as String?, | ||
| 126 | + json['long'] as String?, | ||
| 127 | + json['lat'] as String?, | ||
| 128 | + json['daily'] as String?); | ||
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | Map<String, dynamic> _$SellerToJson(Seller instance) => <String, dynamic>{ | 131 | Map<String, dynamic> _$SellerToJson(Seller instance) => <String, dynamic>{ |
| 1 | -import 'package:azlistview/azlistview.dart'; | 1 | +import 'package:azlistview_plus/azlistview_plus.dart'; |
| 2 | import 'package:json_annotation/json_annotation.dart'; | 2 | import 'package:json_annotation/json_annotation.dart'; |
| 3 | 3 | ||
| 4 | part 'customer_by_seller_model.g.dart'; | 4 | part 'customer_by_seller_model.g.dart'; |
| @@ -6,13 +6,13 @@ part 'customer_by_seller_model.g.dart'; | @@ -6,13 +6,13 @@ part 'customer_by_seller_model.g.dart'; | ||
| 6 | @JsonSerializable() | 6 | @JsonSerializable() |
| 7 | class CustomerBySellerModel extends Object { | 7 | class CustomerBySellerModel extends Object { |
| 8 | @JsonKey(name: 'ret') | 8 | @JsonKey(name: 'ret') |
| 9 | - int ret; | 9 | + int? ret; |
| 10 | 10 | ||
| 11 | @JsonKey(name: 'data') | 11 | @JsonKey(name: 'data') |
| 12 | - List<CustomerBySellerSunModel> data; | 12 | + List<CustomerBySellerSunModel?>? data; |
| 13 | 13 | ||
| 14 | @JsonKey(name: 'msg') | 14 | @JsonKey(name: 'msg') |
| 15 | - String msg; | 15 | + String? msg; |
| 16 | 16 | ||
| 17 | CustomerBySellerModel( | 17 | CustomerBySellerModel( |
| 18 | this.ret, | 18 | this.ret, |
| @@ -27,48 +27,50 @@ class CustomerBySellerModel extends Object { | @@ -27,48 +27,50 @@ class CustomerBySellerModel extends Object { | ||
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | @JsonSerializable() | 29 | @JsonSerializable() |
| 30 | -class CustomerBySellerSunModel extends Object with ISuspensionBean { | 30 | +class CustomerBySellerSunModel extends Object |
| 31 | +with ISuspensionBean | ||
| 32 | +{ | ||
| 31 | @JsonKey(name: 'rname') | 33 | @JsonKey(name: 'rname') |
| 32 | - String rname; | 34 | + String? rname; |
| 33 | 35 | ||
| 34 | @JsonKey(name: 'sex') | 36 | @JsonKey(name: 'sex') |
| 35 | - String sex; | 37 | + String? sex; |
| 36 | 38 | ||
| 37 | @JsonKey(name: 'phone') | 39 | @JsonKey(name: 'phone') |
| 38 | - String phone; | 40 | + String? phone; |
| 39 | 41 | ||
| 40 | @JsonKey(name: 'sellerid') | 42 | @JsonKey(name: 'sellerid') |
| 41 | - String sellerid; | 43 | + String? sellerid; |
| 42 | 44 | ||
| 43 | @JsonKey(name: 'month_count') | 45 | @JsonKey(name: 'month_count') |
| 44 | - String monthCount; | 46 | + String? monthCount; |
| 45 | 47 | ||
| 46 | @JsonKey(name: 'leiji') | 48 | @JsonKey(name: 'leiji') |
| 47 | - String leiji; | 49 | + String? leiji; |
| 48 | 50 | ||
| 49 | @JsonKey(name: 'attr') | 51 | @JsonKey(name: 'attr') |
| 50 | - String attr; | 52 | + String? attr; |
| 51 | 53 | ||
| 52 | @JsonKey(name: 'ddate') | 54 | @JsonKey(name: 'ddate') |
| 53 | - String ddate; | 55 | + String? ddate; |
| 54 | 56 | ||
| 55 | @JsonKey(name: 'ddate_solt') | 57 | @JsonKey(name: 'ddate_solt') |
| 56 | - String ddateSolt; | 58 | + String? ddateSolt; |
| 57 | 59 | ||
| 58 | @JsonKey(name: 'uid') | 60 | @JsonKey(name: 'uid') |
| 59 | - String uid; | 61 | + String? uid; |
| 60 | 62 | ||
| 61 | @JsonKey(name: 'nick_name') | 63 | @JsonKey(name: 'nick_name') |
| 62 | - String nickName; | 64 | + String? nickName; |
| 63 | 65 | ||
| 64 | @JsonKey(name: 'gid') | 66 | @JsonKey(name: 'gid') |
| 65 | - String gid; | 67 | + String? gid; |
| 66 | 68 | ||
| 67 | @JsonKey(name: 'label') | 69 | @JsonKey(name: 'label') |
| 68 | - String label; | 70 | + String? label; |
| 69 | 71 | ||
| 70 | @JsonKey(name: 'is_member') | 72 | @JsonKey(name: 'is_member') |
| 71 | - String isMember; | 73 | + String? isMember; |
| 72 | 74 | ||
| 73 | @JsonKey(name: 'con_amount') | 75 | @JsonKey(name: 'con_amount') |
| 74 | dynamic conAmount; | 76 | dynamic conAmount; |
| @@ -78,9 +80,9 @@ class CustomerBySellerSunModel extends Object with ISuspensionBean { | @@ -78,9 +80,9 @@ class CustomerBySellerSunModel extends Object with ISuspensionBean { | ||
| 78 | 80 | ||
| 79 | bool select = false; | 81 | bool select = false; |
| 80 | 82 | ||
| 81 | - String pinyin; | ||
| 82 | - String tagIndex; //abcdefg | ||
| 83 | - String get rnameStr { | 83 | + String? pinyin; |
| 84 | + late String tagIndex; //abcdefg | ||
| 85 | + String? get rnameStr { | ||
| 84 | if (rname == null || rname == '' || rname == ' ') return ""; | 86 | if (rname == null || rname == '' || rname == ' ') return ""; |
| 85 | return rname; | 87 | return rname; |
| 86 | } | 88 | } |
| @@ -102,6 +104,9 @@ class CustomerBySellerSunModel extends Object with ISuspensionBean { | @@ -102,6 +104,9 @@ class CustomerBySellerSunModel extends Object with ISuspensionBean { | ||
| 102 | case "4": //贵宾 | 104 | case "4": //贵宾 |
| 103 | case "贵宾": | 105 | case "贵宾": |
| 104 | return "贵宾"; | 106 | return "贵宾"; |
| 107 | + default: | ||
| 108 | + return ''; | ||
| 109 | + | ||
| 105 | } | 110 | } |
| 106 | } | 111 | } |
| 107 | 112 |
| @@ -9,13 +9,13 @@ part of 'customer_by_seller_model.dart'; | @@ -9,13 +9,13 @@ part of 'customer_by_seller_model.dart'; | ||
| 9 | CustomerBySellerModel _$CustomerBySellerModelFromJson( | 9 | CustomerBySellerModel _$CustomerBySellerModelFromJson( |
| 10 | Map<String, dynamic> json) { | 10 | Map<String, dynamic> json) { |
| 11 | return CustomerBySellerModel( | 11 | return CustomerBySellerModel( |
| 12 | - json['ret'] as int, | ||
| 13 | - (json['data'] as List) | 12 | + json['ret'] as int?, |
| 13 | + (json['data'] as List?) | ||
| 14 | ?.map((e) => e == null | 14 | ?.map((e) => e == null |
| 15 | ? null | 15 | ? null |
| 16 | : CustomerBySellerSunModel.fromJson(e as Map<String, dynamic>)) | 16 | : CustomerBySellerSunModel.fromJson(e as Map<String, dynamic>)) |
| 17 | - ?.toList(), | ||
| 18 | - json['msg'] as String, | 17 | + .toList(), |
| 18 | + json['msg'] as String?, | ||
| 19 | ); | 19 | ); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| @@ -30,20 +30,20 @@ Map<String, dynamic> _$CustomerBySellerModelToJson( | @@ -30,20 +30,20 @@ Map<String, dynamic> _$CustomerBySellerModelToJson( | ||
| 30 | CustomerBySellerSunModel _$CustomerBySellerSunModelFromJson( | 30 | CustomerBySellerSunModel _$CustomerBySellerSunModelFromJson( |
| 31 | Map<String, dynamic> json) { | 31 | Map<String, dynamic> json) { |
| 32 | return CustomerBySellerSunModel( | 32 | return CustomerBySellerSunModel( |
| 33 | - json['rname'] as String, | ||
| 34 | - json['sex'] as String, | ||
| 35 | - json['phone'] as String, | ||
| 36 | - json['sellerid'] as String, | ||
| 37 | - json['month_count'] as String, | ||
| 38 | - json['leiji'] as String, | ||
| 39 | - json['attr'] as String, | ||
| 40 | - json['ddate'] as String, | ||
| 41 | - json['ddate_solt'] as String, | ||
| 42 | - json['uid'] as String, | ||
| 43 | - json['nick_name'] as String, | ||
| 44 | - json['gid'] as String, | ||
| 45 | - json['label'] as String, | ||
| 46 | - json['is_member'] as String, | 33 | + json['rname'] as String?, |
| 34 | + json['sex'] as String?, | ||
| 35 | + json['phone'] as String?, | ||
| 36 | + json['sellerid'] as String?, | ||
| 37 | + json['month_count'] as String?, | ||
| 38 | + json['leiji'] as String?, | ||
| 39 | + json['attr'] as String?, | ||
| 40 | + json['ddate'] as String?, | ||
| 41 | + json['ddate_solt'] as String?, | ||
| 42 | + json['uid'] as String?, | ||
| 43 | + json['nick_name'] as String?, | ||
| 44 | + json['gid'] as String?, | ||
| 45 | + json['label'] as String?, | ||
| 46 | + json['is_member'] as String?, | ||
| 47 | json['con_amount'] as dynamic, | 47 | json['con_amount'] as dynamic, |
| 48 | json['store_day'] as dynamic, | 48 | json['store_day'] as dynamic, |
| 49 | ); | 49 | ); |
| 1 | + | ||
| 1 | import 'package:json_annotation/json_annotation.dart'; | 2 | import 'package:json_annotation/json_annotation.dart'; |
| 2 | 3 | ||
| 3 | part 'customer_label_model.g.dart'; | 4 | part 'customer_label_model.g.dart'; |
| @@ -5,13 +6,13 @@ part 'customer_label_model.g.dart'; | @@ -5,13 +6,13 @@ part 'customer_label_model.g.dart'; | ||
| 5 | @JsonSerializable() | 6 | @JsonSerializable() |
| 6 | class CustomerLabelModel extends Object { | 7 | class CustomerLabelModel extends Object { |
| 7 | @JsonKey(name: 'ret') | 8 | @JsonKey(name: 'ret') |
| 8 | - int ret; | 9 | + int? ret; |
| 9 | 10 | ||
| 10 | @JsonKey(name: 'data') | 11 | @JsonKey(name: 'data') |
| 11 | - List<CustomerLabelSunModel> data; | 12 | + List<CustomerLabelSunModel?>? data; |
| 12 | 13 | ||
| 13 | @JsonKey(name: 'msg') | 14 | @JsonKey(name: 'msg') |
| 14 | - String msg; | 15 | + String? msg; |
| 15 | 16 | ||
| 16 | CustomerLabelModel( | 17 | CustomerLabelModel( |
| 17 | this.ret, | 18 | this.ret, |
| @@ -28,16 +29,16 @@ class CustomerLabelModel extends Object { | @@ -28,16 +29,16 @@ class CustomerLabelModel extends Object { | ||
| 28 | @JsonSerializable() | 29 | @JsonSerializable() |
| 29 | class CustomerLabelSunModel extends Object { | 30 | class CustomerLabelSunModel extends Object { |
| 30 | @JsonKey(name: 'id') | 31 | @JsonKey(name: 'id') |
| 31 | - String id; | 32 | + String? id; |
| 32 | 33 | ||
| 33 | @JsonKey(name: 'sellerid') | 34 | @JsonKey(name: 'sellerid') |
| 34 | - String sellerid; | 35 | + String? sellerid; |
| 35 | 36 | ||
| 36 | @JsonKey(name: 'label') | 37 | @JsonKey(name: 'label') |
| 37 | - String label; | 38 | + String? label; |
| 38 | 39 | ||
| 39 | @JsonKey(name: 'cdate') | 40 | @JsonKey(name: 'cdate') |
| 40 | - String cdate; | 41 | + String? cdate; |
| 41 | bool select = false; | 42 | bool select = false; |
| 42 | 43 | ||
| 43 | CustomerLabelSunModel( | 44 | CustomerLabelSunModel( |
| @@ -8,13 +8,13 @@ part of 'customer_label_model.dart'; | @@ -8,13 +8,13 @@ part of 'customer_label_model.dart'; | ||
| 8 | 8 | ||
| 9 | CustomerLabelModel _$CustomerLabelModelFromJson(Map<String, dynamic> json) { | 9 | CustomerLabelModel _$CustomerLabelModelFromJson(Map<String, dynamic> json) { |
| 10 | return CustomerLabelModel( | 10 | return CustomerLabelModel( |
| 11 | - json['ret'] as int, | ||
| 12 | - (json['data'] as List) | 11 | + json['ret'] as int?, |
| 12 | + (json['data'] as List?) | ||
| 13 | ?.map((e) => e == null | 13 | ?.map((e) => e == null |
| 14 | ? null | 14 | ? null |
| 15 | : CustomerLabelSunModel.fromJson(e as Map<String, dynamic>)) | 15 | : CustomerLabelSunModel.fromJson(e as Map<String, dynamic>)) |
| 16 | - ?.toList(), | ||
| 17 | - json['msg'] as String, | 16 | + .toList(), |
| 17 | + json['msg'] as String?, | ||
| 18 | ); | 18 | ); |
| 19 | } | 19 | } |
| 20 | 20 | ||
| @@ -28,10 +28,10 @@ Map<String, dynamic> _$CustomerLabelModelToJson(CustomerLabelModel instance) => | @@ -28,10 +28,10 @@ Map<String, dynamic> _$CustomerLabelModelToJson(CustomerLabelModel instance) => | ||
| 28 | CustomerLabelSunModel _$CustomerLabelSunModelFromJson( | 28 | CustomerLabelSunModel _$CustomerLabelSunModelFromJson( |
| 29 | Map<String, dynamic> json) { | 29 | Map<String, dynamic> json) { |
| 30 | return CustomerLabelSunModel( | 30 | return CustomerLabelSunModel( |
| 31 | - json['id'] as String, | ||
| 32 | - json['sellerid'] as String, | ||
| 33 | - json['label'] as String, | ||
| 34 | - json['cdate'] as String, | 31 | + json['id'] as String?, |
| 32 | + json['sellerid'] as String?, | ||
| 33 | + json['label'] as String?, | ||
| 34 | + json['cdate'] as String?, | ||
| 35 | ); | 35 | ); |
| 36 | } | 36 | } |
| 37 | 37 |
| 1 | -import 'package:azlistview/azlistview.dart'; | 1 | + |
| 2 | +import 'package:azlistview_plus/azlistview_plus.dart'; | ||
| 2 | import 'package:json_annotation/json_annotation.dart'; | 3 | import 'package:json_annotation/json_annotation.dart'; |
| 3 | 4 | ||
| 4 | part 'customer_list_model.g.dart'; | 5 | part 'customer_list_model.g.dart'; |
| @@ -6,13 +7,13 @@ part 'customer_list_model.g.dart'; | @@ -6,13 +7,13 @@ part 'customer_list_model.g.dart'; | ||
| 6 | @JsonSerializable() | 7 | @JsonSerializable() |
| 7 | class CustomerListModel extends Object { | 8 | class CustomerListModel extends Object { |
| 8 | @JsonKey(name: 'ret') | 9 | @JsonKey(name: 'ret') |
| 9 | - int ret; | 10 | + int? ret; |
| 10 | 11 | ||
| 11 | @JsonKey(name: 'data') | 12 | @JsonKey(name: 'data') |
| 12 | - List<CustomerListSunModel> data; | 13 | + List<CustomerListSunModel?>? data; |
| 13 | 14 | ||
| 14 | @JsonKey(name: 'msg') | 15 | @JsonKey(name: 'msg') |
| 15 | - String msg; | 16 | + String? msg; |
| 16 | 17 | ||
| 17 | CustomerListModel( | 18 | CustomerListModel( |
| 18 | this.ret, | 19 | this.ret, |
| @@ -27,68 +28,70 @@ class CustomerListModel extends Object { | @@ -27,68 +28,70 @@ class CustomerListModel extends Object { | ||
| 27 | } | 28 | } |
| 28 | 29 | ||
| 29 | @JsonSerializable() | 30 | @JsonSerializable() |
| 30 | -class CustomerListSunModel extends Object with ISuspensionBean { | 31 | +class CustomerListSunModel extends Object |
| 32 | +with ISuspensionBean | ||
| 33 | + { | ||
| 31 | @JsonKey(name: 'id') | 34 | @JsonKey(name: 'id') |
| 32 | - String id; | 35 | + String? id; |
| 33 | 36 | ||
| 34 | @JsonKey(name: 'sellerid') | 37 | @JsonKey(name: 'sellerid') |
| 35 | - String sellerid; | 38 | + String? sellerid; |
| 36 | 39 | ||
| 37 | @JsonKey(name: 'uid') | 40 | @JsonKey(name: 'uid') |
| 38 | - String uid; | 41 | + String? uid; |
| 39 | 42 | ||
| 40 | @JsonKey(name: 'rname') | 43 | @JsonKey(name: 'rname') |
| 41 | - String rname; | 44 | + String? rname; |
| 42 | 45 | ||
| 43 | @JsonKey(name: 'sex') | 46 | @JsonKey(name: 'sex') |
| 44 | - String sex; | 47 | + String? sex; |
| 45 | 48 | ||
| 46 | @JsonKey(name: 'phone') | 49 | @JsonKey(name: 'phone') |
| 47 | - String phone; | 50 | + String? phone; |
| 48 | 51 | ||
| 49 | @JsonKey(name: 'cdate') | 52 | @JsonKey(name: 'cdate') |
| 50 | - String cdate; | 53 | + String? cdate; |
| 51 | 54 | ||
| 52 | @JsonKey(name: 'leiji') | 55 | @JsonKey(name: 'leiji') |
| 53 | - String leiji; | 56 | + String? leiji; |
| 54 | 57 | ||
| 55 | @JsonKey(name: 'attr') | 58 | @JsonKey(name: 'attr') |
| 56 | - String attr; | 59 | + String? attr; |
| 57 | 60 | ||
| 58 | @JsonKey(name: 'ddate') | 61 | @JsonKey(name: 'ddate') |
| 59 | - String ddate; | 62 | + String? ddate; |
| 60 | 63 | ||
| 61 | @JsonKey(name: 'ddate_solt') | 64 | @JsonKey(name: 'ddate_solt') |
| 62 | - String ddateSolt; | 65 | + String? ddateSolt; |
| 63 | 66 | ||
| 64 | @JsonKey(name: 'company') | 67 | @JsonKey(name: 'company') |
| 65 | - String company; | 68 | + String? company; |
| 66 | 69 | ||
| 67 | @JsonKey(name: 'section') | 70 | @JsonKey(name: 'section') |
| 68 | - String section; | 71 | + String? section; |
| 69 | 72 | ||
| 70 | @JsonKey(name: 'position') | 73 | @JsonKey(name: 'position') |
| 71 | - String position; | 74 | + String? position; |
| 72 | @JsonKey(name: 'taboos') | 75 | @JsonKey(name: 'taboos') |
| 73 | - String taboos; | 76 | + String? taboos; |
| 74 | @JsonKey(name: 'like') | 77 | @JsonKey(name: 'like') |
| 75 | - String like; | 78 | + String? like; |
| 76 | @JsonKey(name: 'serve') | 79 | @JsonKey(name: 'serve') |
| 77 | - String serve; | 80 | + String? serve; |
| 78 | @JsonKey(name: 'c_day') | 81 | @JsonKey(name: 'c_day') |
| 79 | - String cDay; | 82 | + String? cDay; |
| 80 | @JsonKey(name: 'udate') | 83 | @JsonKey(name: 'udate') |
| 81 | - String udate; | 84 | + String? udate; |
| 82 | @JsonKey(name: 'month_count') | 85 | @JsonKey(name: 'month_count') |
| 83 | - String monthCount; | 86 | + String? monthCount; |
| 84 | @JsonKey(name: 'label') | 87 | @JsonKey(name: 'label') |
| 85 | - String label; | 88 | + String? label; |
| 86 | @JsonKey(name: 'nick_name') | 89 | @JsonKey(name: 'nick_name') |
| 87 | - String nickName; | 90 | + String? nickName; |
| 88 | @JsonKey(name: 'gid') | 91 | @JsonKey(name: 'gid') |
| 89 | - String gid; | 92 | + String? gid; |
| 90 | @JsonKey(name: 'is_member') | 93 | @JsonKey(name: 'is_member') |
| 91 | - String isMember; | 94 | + String? isMember; |
| 92 | 95 | ||
| 93 | @JsonKey(name: 'con_amount') | 96 | @JsonKey(name: 'con_amount') |
| 94 | dynamic conAmount; | 97 | dynamic conAmount; |
| @@ -98,11 +101,11 @@ class CustomerListSunModel extends Object with ISuspensionBean { | @@ -98,11 +101,11 @@ class CustomerListSunModel extends Object with ISuspensionBean { | ||
| 98 | 101 | ||
| 99 | bool select = false; | 102 | bool select = false; |
| 100 | 103 | ||
| 101 | - List<String> pinyinList; //全拼数组 | ||
| 102 | - String pinyin; //全拼字母 | ||
| 103 | - String pinyinFirst; //首字母 | ||
| 104 | - String tagIndex; //abcdefg | ||
| 105 | - String get rnameStr { | 104 | + List<String>? pinyinList; //全拼数组 |
| 105 | + String? pinyin; //全拼字母 | ||
| 106 | + String? pinyinFirst; //首字母 | ||
| 107 | + late String tagIndex; //abcdefg | ||
| 108 | + String? get rnameStr { | ||
| 106 | if (rname == null || rname == '' || rname == ' ') return ""; | 109 | if (rname == null || rname == '' || rname == ' ') return ""; |
| 107 | return rname; | 110 | return rname; |
| 108 | } | 111 | } |
| @@ -124,6 +127,8 @@ class CustomerListSunModel extends Object with ISuspensionBean { | @@ -124,6 +127,8 @@ class CustomerListSunModel extends Object with ISuspensionBean { | ||
| 124 | case "4": //贵宾 | 127 | case "4": //贵宾 |
| 125 | case "贵宾": | 128 | case "贵宾": |
| 126 | return "贵宾"; | 129 | return "贵宾"; |
| 130 | + default: | ||
| 131 | + return ""; | ||
| 127 | } | 132 | } |
| 128 | } | 133 | } |
| 129 | 134 |
| @@ -8,13 +8,13 @@ part of 'customer_list_model.dart'; | @@ -8,13 +8,13 @@ part of 'customer_list_model.dart'; | ||
| 8 | 8 | ||
| 9 | CustomerListModel _$CustomerListModelFromJson(Map<String, dynamic> json) { | 9 | CustomerListModel _$CustomerListModelFromJson(Map<String, dynamic> json) { |
| 10 | return CustomerListModel( | 10 | return CustomerListModel( |
| 11 | - json['ret'] as int, | ||
| 12 | - (json['data'] as List) | 11 | + json['ret'] as int?, |
| 12 | + (json['data'] as List?) | ||
| 13 | ?.map((e) => e == null | 13 | ?.map((e) => e == null |
| 14 | ? null | 14 | ? null |
| 15 | : CustomerListSunModel.fromJson(e as Map<String, dynamic>)) | 15 | : CustomerListSunModel.fromJson(e as Map<String, dynamic>)) |
| 16 | - ?.toList(), | ||
| 17 | - json['msg'] as String, | 16 | + .toList(), |
| 17 | + json['msg'] as String?, | ||
| 18 | ); | 18 | ); |
| 19 | } | 19 | } |
| 20 | 20 | ||
| @@ -27,30 +27,30 @@ Map<String, dynamic> _$CustomerListModelToJson(CustomerListModel instance) => | @@ -27,30 +27,30 @@ Map<String, dynamic> _$CustomerListModelToJson(CustomerListModel instance) => | ||
| 27 | 27 | ||
| 28 | CustomerListSunModel _$CustomerListSunModelFromJson(Map<String, dynamic> json) { | 28 | CustomerListSunModel _$CustomerListSunModelFromJson(Map<String, dynamic> json) { |
| 29 | return CustomerListSunModel( | 29 | return CustomerListSunModel( |
| 30 | - json['id'] as String, | ||
| 31 | - json['sellerid'] as String, | ||
| 32 | - json['uid'] as String, | ||
| 33 | - json['rname'] as String, | ||
| 34 | - json['sex'] as String, | ||
| 35 | - json['phone'] as String, | ||
| 36 | - json['cdate'] as String, | ||
| 37 | - json['leiji'] as String, | ||
| 38 | - json['attr'] as String, | ||
| 39 | - json['ddate'] as String, | ||
| 40 | - json['ddate_solt'] as String, | ||
| 41 | - json['company'] as String, | ||
| 42 | - json['section'] as String, | ||
| 43 | - json['position'] as String, | ||
| 44 | - json['taboos'] as String, | ||
| 45 | - json['like'] as String, | ||
| 46 | - json['serve'] as String, | ||
| 47 | - json['c_day'] as String, | ||
| 48 | - json['udate'] as String, | ||
| 49 | - json['month_count'] as String, | ||
| 50 | - json['label'] as String, | ||
| 51 | - json['nick_name'] as String, | ||
| 52 | - json['gid'] as String, | ||
| 53 | - json['is_member'] as String, | 30 | + json['id'] as String?, |
| 31 | + json['sellerid'] as String?, | ||
| 32 | + json['uid'] as String?, | ||
| 33 | + json['rname'] as String?, | ||
| 34 | + json['sex'] as String?, | ||
| 35 | + json['phone'] as String?, | ||
| 36 | + json['cdate'] as String?, | ||
| 37 | + json['leiji'] as String?, | ||
| 38 | + json['attr'] as String?, | ||
| 39 | + json['ddate'] as String?, | ||
| 40 | + json['ddate_solt'] as String?, | ||
| 41 | + json['company'] as String?, | ||
| 42 | + json['section'] as String?, | ||
| 43 | + json['position'] as String?, | ||
| 44 | + json['taboos'] as String?, | ||
| 45 | + json['like'] as String?, | ||
| 46 | + json['serve'] as String?, | ||
| 47 | + json['c_day'] as String?, | ||
| 48 | + json['udate'] as String?, | ||
| 49 | + json['month_count'] as String?, | ||
| 50 | + json['label'] as String?, | ||
| 51 | + json['nick_name'] as String?, | ||
| 52 | + json['gid'] as String?, | ||
| 53 | + json['is_member'] as String?, | ||
| 54 | json['con_amount'] as dynamic, | 54 | json['con_amount'] as dynamic, |
| 55 | json['store_day'] as dynamic, | 55 | json['store_day'] as dynamic, |
| 56 | ); | 56 | ); |
| 1 | + | ||
| 1 | import 'dart:convert' as convert; | 2 | import 'dart:convert' as convert; |
| 2 | import 'package:common_utils/common_utils.dart'; | 3 | import 'package:common_utils/common_utils.dart'; |
| 3 | import 'package:one_key/models/table_list.dart' as t; | 4 | import 'package:one_key/models/table_list.dart' as t; |
| 4 | 5 | ||
| 5 | class DayStaticsModel { | 6 | class DayStaticsModel { |
| 6 | - int ret; | ||
| 7 | - DayStaticsSunModel data; | ||
| 8 | - String msg; | 7 | + int? ret; |
| 8 | + DayStaticsSunModel? data; | ||
| 9 | + String? msg; | ||
| 9 | 10 | ||
| 10 | DayStaticsModel({this.ret, this.data, this.msg}); | 11 | DayStaticsModel({this.ret, this.data, this.msg}); |
| 11 | 12 | ||
| @@ -21,7 +22,7 @@ class DayStaticsModel { | @@ -21,7 +22,7 @@ class DayStaticsModel { | ||
| 21 | final Map<String, dynamic> data = new Map<String, dynamic>(); | 22 | final Map<String, dynamic> data = new Map<String, dynamic>(); |
| 22 | data['ret'] = this.ret; | 23 | data['ret'] = this.ret; |
| 23 | if (this.data != null) { | 24 | if (this.data != null) { |
| 24 | - data['data'] = this.data.toJson(); | 25 | + data['data'] = this.data!.toJson(); |
| 25 | } | 26 | } |
| 26 | data['msg'] = this.msg; | 27 | data['msg'] = this.msg; |
| 27 | return data; | 28 | return data; |
| @@ -44,7 +45,7 @@ class DayStaticsSunModel { | @@ -44,7 +45,7 @@ class DayStaticsSunModel { | ||
| 44 | dynamic order; | 45 | dynamic order; |
| 45 | dynamic plancook; | 46 | dynamic plancook; |
| 46 | dynamic agvTable; | 47 | dynamic agvTable; |
| 47 | - Map<String, ItemData> daydata; | 48 | + Map<String, ItemData>? daydata; |
| 48 | 49 | ||
| 49 | DayStaticsSunModel( | 50 | DayStaticsSunModel( |
| 50 | {this.ddateSolt, | 51 | {this.ddateSolt, |
| @@ -126,7 +127,7 @@ class DayStaticsSunModel { | @@ -126,7 +127,7 @@ class DayStaticsSunModel { | ||
| 126 | 127 | ||
| 127 | class ItemData { | 128 | class ItemData { |
| 128 | bool expansion = true; | 129 | bool expansion = true; |
| 129 | - List<DsoltListModel> dsoltListModelItem; | 130 | + late List<DsoltListModel> dsoltListModelItem; |
| 130 | } | 131 | } |
| 131 | 132 | ||
| 132 | class DsoltListModel { | 133 | class DsoltListModel { |
| @@ -164,7 +165,7 @@ class DsoltListModel { | @@ -164,7 +165,7 @@ class DsoltListModel { | ||
| 164 | return _nameStr; | 165 | return _nameStr; |
| 165 | } | 166 | } |
| 166 | 167 | ||
| 167 | - String get rnameStr { | 168 | + String? get rnameStr { |
| 168 | if (rname == null || rname == '' || rname == ' ') return ""; | 169 | if (rname == null || rname == '' || rname == ' ') return ""; |
| 169 | switch (sex.toString()) { | 170 | switch (sex.toString()) { |
| 170 | case "1": //先生 | 171 | case "1": //先生 |
| 1 | + | ||
| 1 | import 'package:one_key/models/reserveA_action_log_modol.dart'; | 2 | import 'package:one_key/models/reserveA_action_log_modol.dart'; |
| 2 | import 'package:one_key/models/reserve_deposit_model.dart'; | 3 | import 'package:one_key/models/reserve_deposit_model.dart'; |
| 3 | import 'package:one_key/models/reserve_recheck_model.dart'; | 4 | import 'package:one_key/models/reserve_recheck_model.dart'; |
| @@ -5,9 +6,9 @@ import 'package:one_key/models/reserve_recheck_model.dart'; | @@ -5,9 +6,9 @@ import 'package:one_key/models/reserve_recheck_model.dart'; | ||
| 5 | import '../utils/utils.dart'; | 6 | import '../utils/utils.dart'; |
| 6 | 7 | ||
| 7 | class DetailModelAllModel { | 8 | class DetailModelAllModel { |
| 8 | - int ret; | ||
| 9 | - DetailModelAllSunModel data; | ||
| 10 | - String msg; | 9 | + int? ret; |
| 10 | + DetailModelAllSunModel? data; | ||
| 11 | + String? msg; | ||
| 11 | 12 | ||
| 12 | DetailModelAllModel({this.ret, this.data, this.msg}); | 13 | DetailModelAllModel({this.ret, this.data, this.msg}); |
| 13 | 14 | ||
| @@ -37,54 +38,54 @@ class DetailModelAllModel { | @@ -37,54 +38,54 @@ class DetailModelAllModel { | ||
| 37 | } | 38 | } |
| 38 | 39 | ||
| 39 | class DetailModelAllSunModel { | 40 | class DetailModelAllSunModel { |
| 40 | - String id; | ||
| 41 | - String sid; | ||
| 42 | - String uid; | ||
| 43 | - String serveUid; | ||
| 44 | - String tid; | 41 | + String? id; |
| 42 | + String? sid; | ||
| 43 | + String? uid; | ||
| 44 | + String? serveUid; | ||
| 45 | + String? tid; | ||
| 45 | dynamic reserveType; | 46 | dynamic reserveType; |
| 46 | - String pnum; | ||
| 47 | - String rname; | ||
| 48 | - String sex; | ||
| 49 | - String phone; | ||
| 50 | - String cusdem; | ||
| 51 | - String ddate; | ||
| 52 | - String isSetDdate; | ||
| 53 | - String ddateSolt; | ||
| 54 | - String status; | ||
| 55 | - String abolition; | ||
| 56 | - String type; | ||
| 57 | - String cdate; | ||
| 58 | - String noteName; | 47 | + String? pnum; |
| 48 | + String? rname; | ||
| 49 | + String? sex; | ||
| 50 | + String? phone; | ||
| 51 | + String? cusdem; | ||
| 52 | + String? ddate; | ||
| 53 | + String? isSetDdate; | ||
| 54 | + String? ddateSolt; | ||
| 55 | + String? status; | ||
| 56 | + String? abolition; | ||
| 57 | + String? type; | ||
| 58 | + String? cdate; | ||
| 59 | + String? noteName; | ||
| 59 | dynamic actualPum; | 60 | dynamic actualPum; |
| 60 | dynamic conAmount; | 61 | dynamic conAmount; |
| 61 | dynamic photoNote; | 62 | dynamic photoNote; |
| 62 | - String rdate; | ||
| 63 | - String tableinfo; | ||
| 64 | - String upDate; | ||
| 65 | - String cause; | ||
| 66 | - String roleName; | ||
| 67 | - String nickName; | ||
| 68 | - String placeOrderName; | ||
| 69 | - String serveName; | ||
| 70 | - String logPhoto; | ||
| 71 | - String guestUid; | ||
| 72 | - String gid; | ||
| 73 | - String sellerUserPhone; | ||
| 74 | - int isUserComments; | ||
| 75 | - Cancel cancel; | 63 | + String? rdate; |
| 64 | + String? tableinfo; | ||
| 65 | + String? upDate; | ||
| 66 | + String? cause; | ||
| 67 | + String? roleName; | ||
| 68 | + String? nickName; | ||
| 69 | + String? placeOrderName; | ||
| 70 | + String? serveName; | ||
| 71 | + String? logPhoto; | ||
| 72 | + String? guestUid; | ||
| 73 | + String? gid; | ||
| 74 | + String? sellerUserPhone; | ||
| 75 | + int? isUserComments; | ||
| 76 | + Cancel? cancel; | ||
| 76 | dynamic depositCancel; | 77 | dynamic depositCancel; |
| 77 | - int cookbooklist; | ||
| 78 | - Invoice invoice; | ||
| 79 | - String advanceOrderPrice; | ||
| 80 | - List<Demands> demands; | 78 | + int? cookbooklist; |
| 79 | + Invoice? invoice; | ||
| 80 | + String? advanceOrderPrice; | ||
| 81 | + List<Demands>? demands; | ||
| 81 | 82 | ||
| 82 | - List<TablePhotos> tablePhoto; | 83 | + List<TablePhotos>? tablePhoto; |
| 83 | dynamic orderInfoStatus; | 84 | dynamic orderInfoStatus; |
| 84 | - List<String> reserveTypeField; | ||
| 85 | - List<ReserveActionLogSunModol> reserveActionInfo; | ||
| 86 | - List<ReserveDepositSunModel> reserveDepositInfo; | ||
| 87 | - List<ReserveRecheckSunModel> reserveRecheckInfo; | 85 | + List<String>? reserveTypeField; |
| 86 | + List<ReserveActionLogSunModol>? reserveActionInfo; | ||
| 87 | + List<ReserveDepositSunModel>? reserveDepositInfo; | ||
| 88 | + List<ReserveRecheckSunModel>? reserveRecheckInfo; | ||
| 88 | 89 | ||
| 89 | String get statuImgAssets { | 90 | String get statuImgAssets { |
| 90 | switch (status) { | 91 | switch (status) { |
| @@ -104,20 +105,22 @@ class DetailModelAllSunModel { | @@ -104,20 +105,22 @@ class DetailModelAllSunModel { | ||
| 104 | return "assets/statu_canceled.png"; | 105 | return "assets/statu_canceled.png"; |
| 105 | case "6": | 106 | case "6": |
| 106 | return "assets/statu_refuse.png"; | 107 | return "assets/statu_refuse.png"; |
| 108 | + default: | ||
| 109 | + return "assets/statu_booked.png"; | ||
| 107 | } | 110 | } |
| 108 | } | 111 | } |
| 109 | 112 | ||
| 110 | String get demandStr { | 113 | String get demandStr { |
| 111 | String demand = ""; | 114 | String demand = ""; |
| 112 | - for (Demands table in demands) { | ||
| 113 | - demand += table.name + ","; | 115 | + for (Demands table in demands!) { |
| 116 | + demand += table.name! + ","; | ||
| 114 | } | 117 | } |
| 115 | return demand.substring(0, demand.length - 1); | 118 | return demand.substring(0, demand.length - 1); |
| 116 | } | 119 | } |
| 117 | 120 | ||
| 118 | String get ddateymd { | 121 | String get ddateymd { |
| 119 | DateTime dateTime = | 122 | DateTime dateTime = |
| 120 | - DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000); | 123 | + DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000); |
| 121 | String md = "${dateTime.year}-" + | 124 | String md = "${dateTime.year}-" + |
| 122 | Utils.addZeroNumber(dateTime.month) + | 125 | Utils.addZeroNumber(dateTime.month) + |
| 123 | "-" + | 126 | "-" + |
| @@ -138,7 +141,7 @@ class DetailModelAllSunModel { | @@ -138,7 +141,7 @@ class DetailModelAllSunModel { | ||
| 138 | 141 | ||
| 139 | String get ddateMd { | 142 | String get ddateMd { |
| 140 | DateTime dateTime = | 143 | DateTime dateTime = |
| 141 | - DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000); | 144 | + DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000); |
| 142 | String md = "${dateTime.year}年 " + | 145 | String md = "${dateTime.year}年 " + |
| 143 | Utils.addZeroNumber(dateTime.month) + | 146 | Utils.addZeroNumber(dateTime.month) + |
| 144 | "月" + | 147 | "月" + |
| @@ -160,7 +163,7 @@ class DetailModelAllSunModel { | @@ -160,7 +163,7 @@ class DetailModelAllSunModel { | ||
| 160 | 163 | ||
| 161 | //2020-09-09 | 164 | //2020-09-09 |
| 162 | String get ddateYMD { | 165 | String get ddateYMD { |
| 163 | - DateTime day = DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000); | 166 | + DateTime day = DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000); |
| 164 | String ymd = "${day.year}-" + | 167 | String ymd = "${day.year}-" + |
| 165 | Utils.addZeroNumber(day.month) + | 168 | Utils.addZeroNumber(day.month) + |
| 166 | "-" + | 169 | "-" + |
| @@ -170,13 +173,13 @@ class DetailModelAllSunModel { | @@ -170,13 +173,13 @@ class DetailModelAllSunModel { | ||
| 170 | 173 | ||
| 171 | String get ddateF { | 174 | String get ddateF { |
| 172 | DateTime dateTime = | 175 | DateTime dateTime = |
| 173 | - DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000); | 176 | + DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000); |
| 174 | return _returnDate(dateTime); | 177 | return _returnDate(dateTime); |
| 175 | } | 178 | } |
| 176 | 179 | ||
| 177 | DateTime get ddateFhms { | 180 | DateTime get ddateFhms { |
| 178 | DateTime dateTime = | 181 | DateTime dateTime = |
| 179 | - DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000); | 182 | + DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000); |
| 180 | 183 | ||
| 181 | return dateTime; | 184 | return dateTime; |
| 182 | } | 185 | } |
| @@ -215,7 +218,7 @@ class DetailModelAllSunModel { | @@ -215,7 +218,7 @@ class DetailModelAllSunModel { | ||
| 215 | } | 218 | } |
| 216 | 219 | ||
| 217 | date += "周${Utils.formatWeekDayNum(day.weekday)}"; | 220 | date += "周${Utils.formatWeekDayNum(day.weekday)}"; |
| 218 | - String time = Utils.lunarCalendarHolidays(day); | 221 | + String? time = Utils.lunarCalendarHolidays(day); |
| 219 | date += ' ${time}'; | 222 | date += ' ${time}'; |
| 220 | date += ')'; | 223 | date += ')'; |
| 221 | return date; | 224 | return date; |
| @@ -224,7 +227,7 @@ class DetailModelAllSunModel { | @@ -224,7 +227,7 @@ class DetailModelAllSunModel { | ||
| 224 | String get ddateHm { | 227 | String get ddateHm { |
| 225 | if (type == "0" || (type == "1" && isSetDdate == "1")) { | 228 | if (type == "0" || (type == "1" && isSetDdate == "1")) { |
| 226 | DateTime dateTime = | 229 | DateTime dateTime = |
| 227 | - DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000); | 230 | + DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000); |
| 228 | String hm = Utils.addZeroNumber(dateTime.hour) + | 231 | String hm = Utils.addZeroNumber(dateTime.hour) + |
| 229 | ":" + | 232 | ":" + |
| 230 | Utils.addZeroNumber(dateTime.minute); | 233 | Utils.addZeroNumber(dateTime.minute); |
| @@ -254,7 +257,7 @@ class DetailModelAllSunModel { | @@ -254,7 +257,7 @@ class DetailModelAllSunModel { | ||
| 254 | // } | 257 | // } |
| 255 | // } else { | 258 | // } else { |
| 256 | DateTime dateTime = | 259 | DateTime dateTime = |
| 257 | - DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000); | 260 | + DateTime.fromMillisecondsSinceEpoch(int.parse(ddate!) * 1000); |
| 258 | ddateStr = Utils.addZeroNumber(dateTime.hour) + | 261 | ddateStr = Utils.addZeroNumber(dateTime.hour) + |
| 259 | ":" + | 262 | ":" + |
| 260 | Utils.addZeroNumber(dateTime.minute); | 263 | Utils.addZeroNumber(dateTime.minute); |
| @@ -262,7 +265,7 @@ class DetailModelAllSunModel { | @@ -262,7 +265,7 @@ class DetailModelAllSunModel { | ||
| 262 | return ddateStr; | 265 | return ddateStr; |
| 263 | } | 266 | } |
| 264 | 267 | ||
| 265 | - String get rnameStr { | 268 | + String? get rnameStr { |
| 266 | if (rname == null || rname == '' || rname == ' ') { | 269 | if (rname == null || rname == '' || rname == ' ') { |
| 267 | if (sex == '4') { | 270 | if (sex == '4') { |
| 268 | return "贵宾"; | 271 | return "贵宾"; |
| @@ -273,13 +276,13 @@ class DetailModelAllSunModel { | @@ -273,13 +276,13 @@ class DetailModelAllSunModel { | ||
| 273 | 276 | ||
| 274 | switch (sex) { | 277 | switch (sex) { |
| 275 | case "1": //先生 | 278 | case "1": //先生 |
| 276 | - return rname + "先生"; | 279 | + return rname! + "先生"; |
| 277 | case "2": //女士 | 280 | case "2": //女士 |
| 278 | - return rname + "女士"; | 281 | + return rname! + "女士"; |
| 279 | case "3": //公司 | 282 | case "3": //公司 |
| 280 | - return rname + "公司"; | 283 | + return rname! + "公司"; |
| 281 | case "4": //贵宾 | 284 | case "4": //贵宾 |
| 282 | - return rname + "贵宾"; | 285 | + return rname! + "贵宾"; |
| 283 | } | 286 | } |
| 284 | return rname; | 287 | return rname; |
| 285 | } | 288 | } |
| @@ -288,13 +291,13 @@ class DetailModelAllSunModel { | @@ -288,13 +291,13 @@ class DetailModelAllSunModel { | ||
| 288 | if (tableinfo == '' || tableinfo == null) { | 291 | if (tableinfo == '' || tableinfo == null) { |
| 289 | return []; | 292 | return []; |
| 290 | } else { | 293 | } else { |
| 291 | - List temp = tableinfo.split(','); | 294 | + List temp = tableinfo!.split(','); |
| 292 | return temp; | 295 | return temp; |
| 293 | } | 296 | } |
| 294 | } | 297 | } |
| 295 | 298 | ||
| 296 | - String get tableinfoStr { | ||
| 297 | - List temp = tableinfo.split(','); | 299 | + String? get tableinfoStr { |
| 300 | + List temp = tableinfo!.split(','); | ||
| 298 | 301 | ||
| 299 | return temp[0].name + | 302 | return temp[0].name + |
| 300 | "\n" + | 303 | "\n" + |
| @@ -582,10 +585,10 @@ class DetailModelAllSunModel { | @@ -582,10 +585,10 @@ class DetailModelAllSunModel { | ||
| 582 | } | 585 | } |
| 583 | 586 | ||
| 584 | class TablePhotos { | 587 | class TablePhotos { |
| 585 | - String id; | 588 | + String? id; |
| 586 | 589 | ||
| 587 | - String name; | ||
| 588 | - String url; | 590 | + String? name; |
| 591 | + String? url; | ||
| 589 | 592 | ||
| 590 | TablePhotos({ | 593 | TablePhotos({ |
| 591 | this.id, | 594 | this.id, |
| @@ -618,16 +621,16 @@ class TablePhotos { | @@ -618,16 +621,16 @@ class TablePhotos { | ||
| 618 | } | 621 | } |
| 619 | 622 | ||
| 620 | class Demands { | 623 | class Demands { |
| 621 | - String id; | ||
| 622 | - String sellerid; | ||
| 623 | - String tableid; | ||
| 624 | - String name; | ||
| 625 | - String max; | ||
| 626 | - String low; | ||
| 627 | - String standard; | ||
| 628 | - String status; | ||
| 629 | - String surplus; | ||
| 630 | - String cdate; | 624 | + String? id; |
| 625 | + String? sellerid; | ||
| 626 | + String? tableid; | ||
| 627 | + String? name; | ||
| 628 | + String? max; | ||
| 629 | + String? low; | ||
| 630 | + String? standard; | ||
| 631 | + String? status; | ||
| 632 | + String? surplus; | ||
| 633 | + String? cdate; | ||
| 631 | 634 | ||
| 632 | Demands( | 635 | Demands( |
| 633 | {this.id, | 636 | {this.id, |
| @@ -691,17 +694,17 @@ class Demands { | @@ -691,17 +694,17 @@ class Demands { | ||
| 691 | } | 694 | } |
| 692 | 695 | ||
| 693 | class Invoice { | 696 | class Invoice { |
| 694 | - String id; | ||
| 695 | - String rid; | ||
| 696 | - String openid; | ||
| 697 | - String type; | ||
| 698 | - String title; | ||
| 699 | - String taxnumber; | ||
| 700 | - String companyaddress; | ||
| 701 | - String telephone; | ||
| 702 | - String bankname; | ||
| 703 | - String bankaccount; | ||
| 704 | - String cdate; | 697 | + String? id; |
| 698 | + String? rid; | ||
| 699 | + String? openid; | ||
| 700 | + String? type; | ||
| 701 | + String? title; | ||
| 702 | + String? taxnumber; | ||
| 703 | + String? companyaddress; | ||
| 704 | + String? telephone; | ||
| 705 | + String? bankname; | ||
| 706 | + String? bankaccount; | ||
| 707 | + String? cdate; | ||
| 705 | 708 | ||
| 706 | Invoice( | 709 | Invoice( |
| 707 | {this.id, | 710 | {this.id, |
| @@ -770,18 +773,18 @@ class Invoice { | @@ -770,18 +773,18 @@ class Invoice { | ||
| 770 | } | 773 | } |
| 771 | 774 | ||
| 772 | class Cancel { | 775 | class Cancel { |
| 773 | - String id; | ||
| 774 | - String uid; | ||
| 775 | - String uname; | ||
| 776 | - String openid; | ||
| 777 | - String desc; | ||
| 778 | - String upRid; | ||
| 779 | - String actionType; | 776 | + String? id; |
| 777 | + String? uid; | ||
| 778 | + String? uname; | ||
| 779 | + String? openid; | ||
| 780 | + String? desc; | ||
| 781 | + String? upRid; | ||
| 782 | + String? actionType; | ||
| 780 | dynamic logPhoto; | 783 | dynamic logPhoto; |
| 781 | - String cdate; | 784 | + String? cdate; |
| 782 | String get cdateStr { | 785 | String get cdateStr { |
| 783 | DateTime dateTime = | 786 | DateTime dateTime = |
| 784 | - DateTime.fromMillisecondsSinceEpoch(int.parse(cdate) * 1000); | 787 | + DateTime.fromMillisecondsSinceEpoch(int.parse(cdate!) * 1000); |
| 785 | return dateTime.year.toString() + | 788 | return dateTime.year.toString() + |
| 786 | "-" + | 789 | "-" + |
| 787 | Utils.addZeroNumber(dateTime.month) + | 790 | Utils.addZeroNumber(dateTime.month) + |
| 1 | + | ||
| 1 | ///title 和select | 2 | ///title 和select |
| 2 | class FilterBtnModel { | 3 | class FilterBtnModel { |
| 3 | - String id; | ||
| 4 | - String title; | ||
| 5 | - bool select = false; | ||
| 6 | - String roleName; | ||
| 7 | - String phone; | ||
| 8 | - String account; | ||
| 9 | - bool selectMor = false; | ||
| 10 | - bool selectNoon = false; | ||
| 11 | - bool selectNig = false; | 4 | + String? id; |
| 5 | + String? title; | ||
| 6 | + bool? select = false; | ||
| 7 | + String? roleName; | ||
| 8 | + String? phone; | ||
| 9 | + String? account; | ||
| 10 | + bool? selectMor = false; | ||
| 11 | + bool? selectNoon = false; | ||
| 12 | + bool? selectNig = false; | ||
| 12 | 13 | ||
| 13 | FilterBtnModel(); | 14 | FilterBtnModel(); |
| 14 | 15 |
| 1 | + | ||
| 1 | import 'package:common_utils/common_utils.dart'; | 2 | import 'package:common_utils/common_utils.dart'; |
| 2 | 3 | ||
| 3 | class GetBanquetBeFollowModel { | 4 | class GetBanquetBeFollowModel { |
| 4 | - int ret; | ||
| 5 | - List<GetBanquetBeFollowSunModel> data; | ||
| 6 | - String msg; | 5 | + int? ret; |
| 6 | + List<GetBanquetBeFollowSunModel>? data; | ||
| 7 | + String? msg; | ||
| 7 | 8 | ||
| 8 | GetBanquetBeFollowModel({this.ret, this.data, this.msg}); | 9 | GetBanquetBeFollowModel({this.ret, this.data, this.msg}); |
| 9 | 10 | ||
| @@ -12,7 +13,7 @@ class GetBanquetBeFollowModel { | @@ -12,7 +13,7 @@ class GetBanquetBeFollowModel { | ||
| 12 | if (json['data'] != null) { | 13 | if (json['data'] != null) { |
| 13 | data = <GetBanquetBeFollowSunModel>[]; | 14 | data = <GetBanquetBeFollowSunModel>[]; |
| 14 | json['data'].forEach((v) { | 15 | json['data'].forEach((v) { |
| 15 | - data.add(new GetBanquetBeFollowSunModel.fromJson(v)); | 16 | + data!.add(new GetBanquetBeFollowSunModel.fromJson(v)); |
| 16 | }); | 17 | }); |
| 17 | } | 18 | } |
| 18 | msg = json['msg']; | 19 | msg = json['msg']; |
| @@ -22,7 +23,7 @@ class GetBanquetBeFollowModel { | @@ -22,7 +23,7 @@ class GetBanquetBeFollowModel { | ||
| 22 | final Map<String, dynamic> data = new Map<String, dynamic>(); | 23 | final Map<String, dynamic> data = new Map<String, dynamic>(); |
| 23 | data['ret'] = this.ret; | 24 | data['ret'] = this.ret; |
| 24 | if (this.data != null) { | 25 | if (this.data != null) { |
| 25 | - data['data'] = this.data.map((v) => v.toJson()).toList(); | 26 | + data['data'] = this.data!.map((v) => v.toJson()).toList(); |
| 26 | } | 27 | } |
| 27 | data['msg'] = this.msg; | 28 | data['msg'] = this.msg; |
| 28 | return data; | 29 | return data; |
| @@ -30,17 +31,17 @@ class GetBanquetBeFollowModel { | @@ -30,17 +31,17 @@ class GetBanquetBeFollowModel { | ||
| 30 | } | 31 | } |
| 31 | 32 | ||
| 32 | class GetBanquetBeFollowSunModel { | 33 | class GetBanquetBeFollowSunModel { |
| 33 | - String id; | ||
| 34 | - String rname; | ||
| 35 | - String sex; | ||
| 36 | - String staffId; | ||
| 37 | - String ddate; | ||
| 38 | - String classifyId; | 34 | + String? id; |
| 35 | + String? rname; | ||
| 36 | + String? sex; | ||
| 37 | + String? staffId; | ||
| 38 | + String? ddate; | ||
| 39 | + String? classifyId; | ||
| 39 | dynamic contractFinalPrice; | 40 | dynamic contractFinalPrice; |
| 40 | - String warrantId; | ||
| 41 | - String className; | ||
| 42 | - String nickName; | ||
| 43 | - String account; | 41 | + String? warrantId; |
| 42 | + String? className; | ||
| 43 | + String? nickName; | ||
| 44 | + String? account; | ||
| 44 | dynamic isDeposit; | 45 | dynamic isDeposit; |
| 45 | dynamic isTids; | 46 | dynamic isTids; |
| 46 | dynamic isSetmeal; | 47 | dynamic isSetmeal; |
-
Please register or login to post a comment