json_convert_content.dart 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153
  1. // ignore_for_file: non_constant_identifier_names
  2. // ignore_for_file: camel_case_types
  3. // ignore_for_file: prefer_single_quotes
  4. // This file is automatically generated. DO NOT EDIT, all your changes would be lost.
  5. import 'package:flutter/material.dart' show debugPrint;
  6. import 'package:domain/entity/auth_login_entity.dart';
  7. import 'package:domain/entity/captcha_img_entity.dart';
  8. import 'package:domain/entity/comm_payment_detail_entity.dart';
  9. import 'package:domain/entity/facility_book_entity.dart';
  10. import 'package:domain/entity/facility_index_entity.dart';
  11. import 'package:domain/entity/facility_page_entity.dart';
  12. import 'package:domain/entity/feedback_detail_entity.dart';
  13. import 'package:domain/entity/feedback_list_entity.dart';
  14. import 'package:domain/entity/form_content_entity.dart';
  15. import 'package:domain/entity/form_detail_entity.dart';
  16. import 'package:domain/entity/form_list_entity.dart';
  17. import 'package:domain/entity/form_option_entity.dart';
  18. import 'package:domain/entity/form_order_entity.dart';
  19. import 'package:domain/entity/form_submitted_entity.dart';
  20. import 'package:domain/entity/form_submitted_page_entity.dart';
  21. import 'package:domain/entity/garage_sale_history_entity.dart';
  22. import 'package:domain/entity/garage_sale_rent_detail_entity.dart';
  23. import 'package:domain/entity/garage_sale_rent_entity.dart';
  24. import 'package:domain/entity/home_list_entity.dart';
  25. import 'package:domain/entity/id_name_entity.dart';
  26. import 'package:domain/entity/latest_news_detail_entity.dart';
  27. import 'package:domain/entity/latest_news_page_entity.dart';
  28. import 'package:domain/entity/myfollowing_list_entity.dart';
  29. import 'package:domain/entity/myposts_newsfeed_entity.dart';
  30. import 'package:domain/entity/myposts_sale_rent_entity.dart';
  31. import 'package:domain/entity/newsfeed_comment_publish_entity.dart';
  32. import 'package:domain/entity/newsfeed_detail_entity.dart';
  33. import 'package:domain/entity/newsfeed_following_entity.dart';
  34. import 'package:domain/entity/newsfeed_foryou_entity.dart';
  35. import 'package:domain/entity/newsfeed_news_entity.dart';
  36. import 'package:domain/entity/notice_board_announ_detail_entity.dart';
  37. import 'package:domain/entity/notice_board_announ_entity.dart';
  38. import 'package:domain/entity/notice_board_documents_entity.dart';
  39. import 'package:domain/entity/notice_board_event_detail_entity.dart';
  40. import 'package:domain/entity/notice_board_event_entity.dart';
  41. import 'package:domain/entity/paid_service_detail_entity.dart';
  42. import 'package:domain/entity/paid_service_entity.dart';
  43. import 'package:domain/entity/paid_service_pay_success_info_entity.dart';
  44. import 'package:domain/entity/payment_intent_entity.dart';
  45. import 'package:domain/entity/payment_page_entity.dart';
  46. import 'package:domain/entity/property_news_detail_entity.dart';
  47. import 'package:domain/entity/property_news_entity.dart';
  48. import 'package:domain/entity/property_sale_rent_entity.dart';
  49. import 'package:domain/entity/repair_service_entity.dart';
  50. import 'package:domain/entity/rewards_active_detail_entity.dart';
  51. import 'package:domain/entity/rewards_buy_entity.dart';
  52. import 'package:domain/entity/rewards_category_entity.dart';
  53. import 'package:domain/entity/rewards_detail_entity.dart';
  54. import 'package:domain/entity/rewards_history_earned_entity.dart';
  55. import 'package:domain/entity/rewards_home_entity.dart';
  56. import 'package:domain/entity/rewards_home_tes_entity.dart';
  57. import 'package:domain/entity/rewards_home_test_entity.dart';
  58. import 'package:domain/entity/rewards_home_tx_entity.dart';
  59. import 'package:domain/entity/rewards_index_entity.dart';
  60. import 'package:domain/entity/rewards_list_entity.dart';
  61. import 'package:domain/entity/rewards_my_detail_entity.dart';
  62. import 'package:domain/entity/rewards_my_entity.dart';
  63. import 'package:domain/entity/rewards_search_entity.dart';
  64. import 'package:domain/entity/server_time.dart';
  65. import 'package:domain/entity/service_category_entity.dart';
  66. import 'package:domain/entity/service_evaluate_list_entity.dart';
  67. import 'package:domain/entity/service_in_progress_entity.dart';
  68. import 'package:domain/entity/service_order_detail_entity.dart';
  69. import 'package:domain/entity/service_repair_detail_entity.dart';
  70. import 'package:domain/entity/service_time_period_entity.dart';
  71. import 'package:domain/entity/text_kon_entity.dart';
  72. import 'package:domain/entity/user_me_entity.dart';
  73. import 'package:domain/entity/visitor_page_entity.dart';
  74. JsonConvert jsonConvert = JsonConvert();
  75. typedef JsonConvertFunction<T> = T Function(Map<String, dynamic> json);
  76. typedef EnumConvertFunction<T> = T Function(String value);
  77. typedef ConvertExceptionHandler = void Function(Object error, StackTrace stackTrace);
  78. extension MapSafeExt<K, V> on Map<K, V> {
  79. T? getOrNull<T>(K? key) {
  80. if (!containsKey(key) || key == null) {
  81. return null;
  82. } else {
  83. return this[key] as T?;
  84. }
  85. }
  86. }
  87. class JsonConvert {
  88. static ConvertExceptionHandler? onError;
  89. JsonConvertClassCollection convertFuncMap = JsonConvertClassCollection();
  90. /// When you are in the development, to generate a new model class, hot-reload doesn't find new generation model class, you can build on MaterialApp method called jsonConvert. ReassembleConvertFuncMap (); This method only works in a development environment
  91. /// https://flutter.cn/docs/development/tools/hot-reload
  92. /// class MyApp extends StatelessWidget {
  93. /// const MyApp({Key? key})
  94. /// : super(key: key);
  95. ///
  96. /// @override
  97. /// Widget build(BuildContext context) {
  98. /// jsonConvert.reassembleConvertFuncMap();
  99. /// return MaterialApp();
  100. /// }
  101. /// }
  102. void reassembleConvertFuncMap() {
  103. bool isReleaseMode = const bool.fromEnvironment('dart.vm.product');
  104. if (!isReleaseMode) {
  105. convertFuncMap = JsonConvertClassCollection();
  106. }
  107. }
  108. T? convert<T>(dynamic value, {EnumConvertFunction? enumConvert}) {
  109. if (value == null) {
  110. return null;
  111. }
  112. if (value is T) {
  113. return value;
  114. }
  115. try {
  116. return _asT<T>(value, enumConvert: enumConvert);
  117. } catch (e, stackTrace) {
  118. debugPrint('asT<$T> $e $stackTrace');
  119. if (onError != null) {
  120. onError!(e, stackTrace);
  121. }
  122. return null;
  123. }
  124. }
  125. List<T?>? convertList<T>(List<dynamic>? value,
  126. {EnumConvertFunction? enumConvert}) {
  127. if (value == null) {
  128. return null;
  129. }
  130. try {
  131. return value.map((dynamic e) => _asT<T>(e, enumConvert: enumConvert))
  132. .toList();
  133. } catch (e, stackTrace) {
  134. debugPrint('asT<$T> $e $stackTrace');
  135. if (onError != null) {
  136. onError!(e, stackTrace);
  137. }
  138. return <T>[];
  139. }
  140. }
  141. List<T>? convertListNotNull<T>(dynamic value,
  142. {EnumConvertFunction? enumConvert}) {
  143. if (value == null) {
  144. return null;
  145. }
  146. try {
  147. return (value as List<dynamic>).map((dynamic e) =>
  148. _asT<T>(e, enumConvert: enumConvert)!).toList();
  149. } catch (e, stackTrace) {
  150. debugPrint('asT<$T> $e $stackTrace');
  151. if (onError != null) {
  152. onError!(e, stackTrace);
  153. }
  154. return <T>[];
  155. }
  156. }
  157. T? _asT<T extends Object?>(dynamic value,
  158. {EnumConvertFunction? enumConvert}) {
  159. final String type = T.toString();
  160. final String valueS = value.toString();
  161. if (enumConvert != null) {
  162. return enumConvert(valueS) as T;
  163. } else if (type == "String") {
  164. return valueS as T;
  165. } else if (type == "int") {
  166. final int? intValue = int.tryParse(valueS);
  167. if (intValue == null) {
  168. return double.tryParse(valueS)?.toInt() as T?;
  169. } else {
  170. return intValue as T;
  171. }
  172. } else if (type == "double") {
  173. return double.parse(valueS) as T;
  174. } else if (type == "DateTime") {
  175. return DateTime.parse(valueS) as T;
  176. } else if (type == "bool") {
  177. if (valueS == '0' || valueS == '1') {
  178. return (valueS == '1') as T;
  179. }
  180. return (valueS == 'true') as T;
  181. } else if (type == "Map" || type.startsWith("Map<")) {
  182. return value as T;
  183. } else {
  184. if (convertFuncMap.containsKey(type)) {
  185. if (value == null) {
  186. return null;
  187. }
  188. var covertFunc = convertFuncMap[type]!;
  189. if (covertFunc is Map<String, dynamic>) {
  190. return covertFunc(value as Map<String, dynamic>) as T;
  191. } else {
  192. return covertFunc(Map<String, dynamic>.from(value)) as T;
  193. }
  194. } else {
  195. throw UnimplementedError(
  196. '$type unimplemented,you can try running the app again');
  197. }
  198. }
  199. }
  200. //list is returned by type
  201. static M? _getListChildType<M>(List<Map<String, dynamic>> data) {
  202. if (<AuthLoginEntity>[] is M) {
  203. return data.map<AuthLoginEntity>((Map<String, dynamic> e) =>
  204. AuthLoginEntity.fromJson(e)).toList() as M;
  205. }
  206. if (<CaptchaImgEntity>[] is M) {
  207. return data.map<CaptchaImgEntity>((Map<String, dynamic> e) =>
  208. CaptchaImgEntity.fromJson(e)).toList() as M;
  209. }
  210. if (<CommPaymentDetailEntity>[] is M) {
  211. return data.map<CommPaymentDetailEntity>((Map<String, dynamic> e) =>
  212. CommPaymentDetailEntity.fromJson(e)).toList() as M;
  213. }
  214. if (<CommPaymentDetailOrderable>[] is M) {
  215. return data.map<CommPaymentDetailOrderable>((Map<String, dynamic> e) =>
  216. CommPaymentDetailOrderable.fromJson(e)).toList() as M;
  217. }
  218. if (<FacilityBookEntity>[] is M) {
  219. return data.map<FacilityBookEntity>((Map<String, dynamic> e) =>
  220. FacilityBookEntity.fromJson(e)).toList() as M;
  221. }
  222. if (<FacilityBookFacilityType>[] is M) {
  223. return data.map<FacilityBookFacilityType>((Map<String, dynamic> e) =>
  224. FacilityBookFacilityType.fromJson(e)).toList() as M;
  225. }
  226. if (<FacilityBookFacilities>[] is M) {
  227. return data.map<FacilityBookFacilities>((Map<String, dynamic> e) =>
  228. FacilityBookFacilities.fromJson(e)).toList() as M;
  229. }
  230. if (<FacilityBookFacilitiesPeriods>[] is M) {
  231. return data.map<FacilityBookFacilitiesPeriods>((Map<String, dynamic> e) =>
  232. FacilityBookFacilitiesPeriods.fromJson(e)).toList() as M;
  233. }
  234. if (<FacilityIndexEntity>[] is M) {
  235. return data.map<FacilityIndexEntity>((Map<String, dynamic> e) =>
  236. FacilityIndexEntity.fromJson(e)).toList() as M;
  237. }
  238. if (<FacilityPageEntity>[] is M) {
  239. return data.map<FacilityPageEntity>((Map<String, dynamic> e) =>
  240. FacilityPageEntity.fromJson(e)).toList() as M;
  241. }
  242. if (<FacilityDetail>[] is M) {
  243. return data.map<FacilityDetail>((Map<String, dynamic> e) =>
  244. FacilityDetail.fromJson(e)).toList() as M;
  245. }
  246. if (<FacilityPageListBooking>[] is M) {
  247. return data.map<FacilityPageListBooking>((Map<String, dynamic> e) =>
  248. FacilityPageListBooking.fromJson(e)).toList() as M;
  249. }
  250. if (<FacilityPageListFacility>[] is M) {
  251. return data.map<FacilityPageListFacility>((Map<String, dynamic> e) =>
  252. FacilityPageListFacility.fromJson(e)).toList() as M;
  253. }
  254. if (<FacilityPageListTimePeriod>[] is M) {
  255. return data.map<FacilityPageListTimePeriod>((Map<String, dynamic> e) =>
  256. FacilityPageListTimePeriod.fromJson(e)).toList() as M;
  257. }
  258. if (<FacilityOrder>[] is M) {
  259. return data.map<FacilityOrder>((Map<String, dynamic> e) =>
  260. FacilityOrder.fromJson(e)).toList() as M;
  261. }
  262. if (<FeedbackDetailEntity>[] is M) {
  263. return data.map<FeedbackDetailEntity>((Map<String, dynamic> e) =>
  264. FeedbackDetailEntity.fromJson(e)).toList() as M;
  265. }
  266. if (<FeedbackDetailReplies>[] is M) {
  267. return data.map<FeedbackDetailReplies>((Map<String, dynamic> e) =>
  268. FeedbackDetailReplies.fromJson(e)).toList() as M;
  269. }
  270. if (<FeedbackListEntity>[] is M) {
  271. return data.map<FeedbackListEntity>((Map<String, dynamic> e) =>
  272. FeedbackListEntity.fromJson(e)).toList() as M;
  273. }
  274. if (<FeedbackItemEntity>[] is M) {
  275. return data.map<FeedbackItemEntity>((Map<String, dynamic> e) =>
  276. FeedbackItemEntity.fromJson(e)).toList() as M;
  277. }
  278. if (<FormContentEntity>[] is M) {
  279. return data.map<FormContentEntity>((Map<String, dynamic> e) =>
  280. FormContentEntity.fromJson(e)).toList() as M;
  281. }
  282. if (<FormDetailEntity>[] is M) {
  283. return data.map<FormDetailEntity>((Map<String, dynamic> e) =>
  284. FormDetailEntity.fromJson(e)).toList() as M;
  285. }
  286. if (<FormOrder>[] is M) {
  287. return data.map<FormOrder>((Map<String, dynamic> e) =>
  288. FormOrder.fromJson(e)).toList() as M;
  289. }
  290. if (<FormListEntity>[] is M) {
  291. return data.map<FormListEntity>((Map<String, dynamic> e) =>
  292. FormListEntity.fromJson(e)).toList() as M;
  293. }
  294. if (<FormOptionEntity>[] is M) {
  295. return data.map<FormOptionEntity>((Map<String, dynamic> e) =>
  296. FormOptionEntity.fromJson(e)).toList() as M;
  297. }
  298. if (<FormOrderEntity>[] is M) {
  299. return data.map<FormOrderEntity>((Map<String, dynamic> e) =>
  300. FormOrderEntity.fromJson(e)).toList() as M;
  301. }
  302. if (<FormOrderOrder>[] is M) {
  303. return data.map<FormOrderOrder>((Map<String, dynamic> e) =>
  304. FormOrderOrder.fromJson(e)).toList() as M;
  305. }
  306. if (<FormSubmittedEntity>[] is M) {
  307. return data.map<FormSubmittedEntity>((Map<String, dynamic> e) =>
  308. FormSubmittedEntity.fromJson(e)).toList() as M;
  309. }
  310. if (<FormSubmittedEstateOnlineForm>[] is M) {
  311. return data.map<FormSubmittedEstateOnlineForm>((Map<String, dynamic> e) =>
  312. FormSubmittedEstateOnlineForm.fromJson(e)).toList() as M;
  313. }
  314. if (<FormSubmittedOrder>[] is M) {
  315. return data.map<FormSubmittedOrder>((Map<String, dynamic> e) =>
  316. FormSubmittedOrder.fromJson(e)).toList() as M;
  317. }
  318. if (<FormSubmittedPageEntity>[] is M) {
  319. return data.map<FormSubmittedPageEntity>((Map<String, dynamic> e) =>
  320. FormSubmittedPageEntity.fromJson(e)).toList() as M;
  321. }
  322. if (<GarageSaleHistoryEntity>[] is M) {
  323. return data.map<GarageSaleHistoryEntity>((Map<String, dynamic> e) =>
  324. GarageSaleHistoryEntity.fromJson(e)).toList() as M;
  325. }
  326. if (<GarageSaleHistoryList>[] is M) {
  327. return data.map<GarageSaleHistoryList>((Map<String, dynamic> e) =>
  328. GarageSaleHistoryList.fromJson(e)).toList() as M;
  329. }
  330. if (<GarageSaleHistoryListOrderProducts>[] is M) {
  331. return data.map<GarageSaleHistoryListOrderProducts>((
  332. Map<String, dynamic> e) =>
  333. GarageSaleHistoryListOrderProducts.fromJson(e)).toList() as M;
  334. }
  335. if (<GarageSaleRentDetailEntity>[] is M) {
  336. return data.map<GarageSaleRentDetailEntity>((Map<String, dynamic> e) =>
  337. GarageSaleRentDetailEntity.fromJson(e)).toList() as M;
  338. }
  339. if (<GarageSaleRentDetailAccount>[] is M) {
  340. return data.map<GarageSaleRentDetailAccount>((Map<String, dynamic> e) =>
  341. GarageSaleRentDetailAccount.fromJson(e)).toList() as M;
  342. }
  343. if (<GarageSaleRentEntity>[] is M) {
  344. return data.map<GarageSaleRentEntity>((Map<String, dynamic> e) =>
  345. GarageSaleRentEntity.fromJson(e)).toList() as M;
  346. }
  347. if (<GarageSaleRentList>[] is M) {
  348. return data.map<GarageSaleRentList>((Map<String, dynamic> e) =>
  349. GarageSaleRentList.fromJson(e)).toList() as M;
  350. }
  351. if (<GarageSaleRentListAccount>[] is M) {
  352. return data.map<GarageSaleRentListAccount>((Map<String, dynamic> e) =>
  353. GarageSaleRentListAccount.fromJson(e)).toList() as M;
  354. }
  355. if (<HomeListEntity>[] is M) {
  356. return data.map<HomeListEntity>((Map<String, dynamic> e) =>
  357. HomeListEntity.fromJson(e)).toList() as M;
  358. }
  359. if (<HomeListBanners>[] is M) {
  360. return data.map<HomeListBanners>((Map<String, dynamic> e) =>
  361. HomeListBanners.fromJson(e)).toList() as M;
  362. }
  363. if (<HomeListLatestTransactions>[] is M) {
  364. return data.map<HomeListLatestTransactions>((Map<String, dynamic> e) =>
  365. HomeListLatestTransactions.fromJson(e)).toList() as M;
  366. }
  367. if (<HomeListPropertyNews>[] is M) {
  368. return data.map<HomeListPropertyNews>((Map<String, dynamic> e) =>
  369. HomeListPropertyNews.fromJson(e)).toList() as M;
  370. }
  371. if (<IdNameEntity>[] is M) {
  372. return data.map<IdNameEntity>((Map<String, dynamic> e) =>
  373. IdNameEntity.fromJson(e)).toList() as M;
  374. }
  375. if (<LatestNewsDetailEntity>[] is M) {
  376. return data.map<LatestNewsDetailEntity>((Map<String, dynamic> e) =>
  377. LatestNewsDetailEntity.fromJson(e)).toList() as M;
  378. }
  379. if (<LatestNewsPageEntity>[] is M) {
  380. return data.map<LatestNewsPageEntity>((Map<String, dynamic> e) =>
  381. LatestNewsPageEntity.fromJson(e)).toList() as M;
  382. }
  383. if (<LatestNewsList>[] is M) {
  384. return data.map<LatestNewsList>((Map<String, dynamic> e) =>
  385. LatestNewsList.fromJson(e)).toList() as M;
  386. }
  387. if (<MyfollowingListEntity>[] is M) {
  388. return data.map<MyfollowingListEntity>((Map<String, dynamic> e) =>
  389. MyfollowingListEntity.fromJson(e)).toList() as M;
  390. }
  391. if (<MypostsNewsfeedEntity>[] is M) {
  392. return data.map<MypostsNewsfeedEntity>((Map<String, dynamic> e) =>
  393. MypostsNewsfeedEntity.fromJson(e)).toList() as M;
  394. }
  395. if (<MypostsNewsfeedList>[] is M) {
  396. return data.map<MypostsNewsfeedList>((Map<String, dynamic> e) =>
  397. MypostsNewsfeedList.fromJson(e)).toList() as M;
  398. }
  399. if (<MypostsNewsfeedListAccount>[] is M) {
  400. return data.map<MypostsNewsfeedListAccount>((Map<String, dynamic> e) =>
  401. MypostsNewsfeedListAccount.fromJson(e)).toList() as M;
  402. }
  403. if (<MypostsSaleRentEntity>[] is M) {
  404. return data.map<MypostsSaleRentEntity>((Map<String, dynamic> e) =>
  405. MypostsSaleRentEntity.fromJson(e)).toList() as M;
  406. }
  407. if (<MypostsSaleRentList>[] is M) {
  408. return data.map<MypostsSaleRentList>((Map<String, dynamic> e) =>
  409. MypostsSaleRentList.fromJson(e)).toList() as M;
  410. }
  411. if (<NewsfeedCommentPublishEntity>[] is M) {
  412. return data.map<NewsfeedCommentPublishEntity>((Map<String, dynamic> e) =>
  413. NewsfeedCommentPublishEntity.fromJson(e)).toList() as M;
  414. }
  415. if (<NewsfeedDetailEntity>[] is M) {
  416. return data.map<NewsfeedDetailEntity>((Map<String, dynamic> e) =>
  417. NewsfeedDetailEntity.fromJson(e)).toList() as M;
  418. }
  419. if (<NewsfeedDetailAccount>[] is M) {
  420. return data.map<NewsfeedDetailAccount>((Map<String, dynamic> e) =>
  421. NewsfeedDetailAccount.fromJson(e)).toList() as M;
  422. }
  423. if (<NewsfeedDetailComments>[] is M) {
  424. return data.map<NewsfeedDetailComments>((Map<String, dynamic> e) =>
  425. NewsfeedDetailComments.fromJson(e)).toList() as M;
  426. }
  427. if (<NewsfeedDetailCommentsAccount>[] is M) {
  428. return data.map<NewsfeedDetailCommentsAccount>((Map<String, dynamic> e) =>
  429. NewsfeedDetailCommentsAccount.fromJson(e)).toList() as M;
  430. }
  431. if (<NewsfeedDetailCommentsToAccount>[] is M) {
  432. return data.map<NewsfeedDetailCommentsToAccount>((
  433. Map<String, dynamic> e) =>
  434. NewsfeedDetailCommentsToAccount.fromJson(e)).toList() as M;
  435. }
  436. if (<NewsfeedFollowingEntity>[] is M) {
  437. return data.map<NewsfeedFollowingEntity>((Map<String, dynamic> e) =>
  438. NewsfeedFollowingEntity.fromJson(e)).toList() as M;
  439. }
  440. if (<NewsfeedFollowingList>[] is M) {
  441. return data.map<NewsfeedFollowingList>((Map<String, dynamic> e) =>
  442. NewsfeedFollowingList.fromJson(e)).toList() as M;
  443. }
  444. if (<NewsfeedFollowingListAccount>[] is M) {
  445. return data.map<NewsfeedFollowingListAccount>((Map<String, dynamic> e) =>
  446. NewsfeedFollowingListAccount.fromJson(e)).toList() as M;
  447. }
  448. if (<NewsfeedForyouEntity>[] is M) {
  449. return data.map<NewsfeedForyouEntity>((Map<String, dynamic> e) =>
  450. NewsfeedForyouEntity.fromJson(e)).toList() as M;
  451. }
  452. if (<NewsfeedForyouList>[] is M) {
  453. return data.map<NewsfeedForyouList>((Map<String, dynamic> e) =>
  454. NewsfeedForyouList.fromJson(e)).toList() as M;
  455. }
  456. if (<NewsfeedForyouListAccount>[] is M) {
  457. return data.map<NewsfeedForyouListAccount>((Map<String, dynamic> e) =>
  458. NewsfeedForyouListAccount.fromJson(e)).toList() as M;
  459. }
  460. if (<NewsfeedNewsEntity>[] is M) {
  461. return data.map<NewsfeedNewsEntity>((Map<String, dynamic> e) =>
  462. NewsfeedNewsEntity.fromJson(e)).toList() as M;
  463. }
  464. if (<NewsfeedNewsList>[] is M) {
  465. return data.map<NewsfeedNewsList>((Map<String, dynamic> e) =>
  466. NewsfeedNewsList.fromJson(e)).toList() as M;
  467. }
  468. if (<NewsfeedNewsListAccount>[] is M) {
  469. return data.map<NewsfeedNewsListAccount>((Map<String, dynamic> e) =>
  470. NewsfeedNewsListAccount.fromJson(e)).toList() as M;
  471. }
  472. if (<NoticeBoardAnnounDetailEntity>[] is M) {
  473. return data.map<NoticeBoardAnnounDetailEntity>((Map<String, dynamic> e) =>
  474. NoticeBoardAnnounDetailEntity.fromJson(e)).toList() as M;
  475. }
  476. if (<NoticeBoardAnnounEntity>[] is M) {
  477. return data.map<NoticeBoardAnnounEntity>((Map<String, dynamic> e) =>
  478. NoticeBoardAnnounEntity.fromJson(e)).toList() as M;
  479. }
  480. if (<NoticeBoardAnnounList>[] is M) {
  481. return data.map<NoticeBoardAnnounList>((Map<String, dynamic> e) =>
  482. NoticeBoardAnnounList.fromJson(e)).toList() as M;
  483. }
  484. if (<NoticeBoardDocumentsEntity>[] is M) {
  485. return data.map<NoticeBoardDocumentsEntity>((Map<String, dynamic> e) =>
  486. NoticeBoardDocumentsEntity.fromJson(e)).toList() as M;
  487. }
  488. if (<NoticeBoardDocumentsList>[] is M) {
  489. return data.map<NoticeBoardDocumentsList>((Map<String, dynamic> e) =>
  490. NoticeBoardDocumentsList.fromJson(e)).toList() as M;
  491. }
  492. if (<NoticeBoardEventDetailEntity>[] is M) {
  493. return data.map<NoticeBoardEventDetailEntity>((Map<String, dynamic> e) =>
  494. NoticeBoardEventDetailEntity.fromJson(e)).toList() as M;
  495. }
  496. if (<NoticeBoardEventEntity>[] is M) {
  497. return data.map<NoticeBoardEventEntity>((Map<String, dynamic> e) =>
  498. NoticeBoardEventEntity.fromJson(e)).toList() as M;
  499. }
  500. if (<NoticeBoardEventList>[] is M) {
  501. return data.map<NoticeBoardEventList>((Map<String, dynamic> e) =>
  502. NoticeBoardEventList.fromJson(e)).toList() as M;
  503. }
  504. if (<PaidServiceDetailEntity>[] is M) {
  505. return data.map<PaidServiceDetailEntity>((Map<String, dynamic> e) =>
  506. PaidServiceDetailEntity.fromJson(e)).toList() as M;
  507. }
  508. if (<PaidServiceDetailMerchant>[] is M) {
  509. return data.map<PaidServiceDetailMerchant>((Map<String, dynamic> e) =>
  510. PaidServiceDetailMerchant.fromJson(e)).toList() as M;
  511. }
  512. if (<PaidServiceDetailCategory>[] is M) {
  513. return data.map<PaidServiceDetailCategory>((Map<String, dynamic> e) =>
  514. PaidServiceDetailCategory.fromJson(e)).toList() as M;
  515. }
  516. if (<PaidServiceDetailProducts>[] is M) {
  517. return data.map<PaidServiceDetailProducts>((Map<String, dynamic> e) =>
  518. PaidServiceDetailProducts.fromJson(e)).toList() as M;
  519. }
  520. if (<PaidServiceDetailEvaluations>[] is M) {
  521. return data.map<PaidServiceDetailEvaluations>((Map<String, dynamic> e) =>
  522. PaidServiceDetailEvaluations.fromJson(e)).toList() as M;
  523. }
  524. if (<PaidServiceDetailEvaluationsAccount>[] is M) {
  525. return data.map<PaidServiceDetailEvaluationsAccount>((
  526. Map<String, dynamic> e) =>
  527. PaidServiceDetailEvaluationsAccount.fromJson(e)).toList() as M;
  528. }
  529. if (<PaidServiceEntity>[] is M) {
  530. return data.map<PaidServiceEntity>((Map<String, dynamic> e) =>
  531. PaidServiceEntity.fromJson(e)).toList() as M;
  532. }
  533. if (<PaidServiceList>[] is M) {
  534. return data.map<PaidServiceList>((Map<String, dynamic> e) =>
  535. PaidServiceList.fromJson(e)).toList() as M;
  536. }
  537. if (<PaidServiceListMerchant>[] is M) {
  538. return data.map<PaidServiceListMerchant>((Map<String, dynamic> e) =>
  539. PaidServiceListMerchant.fromJson(e)).toList() as M;
  540. }
  541. if (<PaidServiceListCategory>[] is M) {
  542. return data.map<PaidServiceListCategory>((Map<String, dynamic> e) =>
  543. PaidServiceListCategory.fromJson(e)).toList() as M;
  544. }
  545. if (<PaidServicePaySuccessInfoEntity>[] is M) {
  546. return data.map<PaidServicePaySuccessInfoEntity>((
  547. Map<String, dynamic> e) =>
  548. PaidServicePaySuccessInfoEntity.fromJson(e)).toList() as M;
  549. }
  550. if (<PaidServicePaySuccessInfoAccount>[] is M) {
  551. return data.map<PaidServicePaySuccessInfoAccount>((
  552. Map<String, dynamic> e) =>
  553. PaidServicePaySuccessInfoAccount.fromJson(e)).toList() as M;
  554. }
  555. if (<PaidServicePaySuccessInfoOrderService>[] is M) {
  556. return data.map<PaidServicePaySuccessInfoOrderService>((
  557. Map<String, dynamic> e) =>
  558. PaidServicePaySuccessInfoOrderService.fromJson(e)).toList() as M;
  559. }
  560. if (<PaidServicePaySuccessInfoMerchant>[] is M) {
  561. return data.map<PaidServicePaySuccessInfoMerchant>((
  562. Map<String, dynamic> e) =>
  563. PaidServicePaySuccessInfoMerchant.fromJson(e)).toList() as M;
  564. }
  565. if (<PaidServicePaySuccessInfoStaff>[] is M) {
  566. return data.map<PaidServicePaySuccessInfoStaff>((
  567. Map<String, dynamic> e) => PaidServicePaySuccessInfoStaff.fromJson(e))
  568. .toList() as M;
  569. }
  570. if (<PaidServicePaySuccessInfoOrderProducts>[] is M) {
  571. return data.map<PaidServicePaySuccessInfoOrderProducts>((
  572. Map<String, dynamic> e) =>
  573. PaidServicePaySuccessInfoOrderProducts.fromJson(e)).toList() as M;
  574. }
  575. if (<PaidServicePaySuccessInfoEstate>[] is M) {
  576. return data.map<PaidServicePaySuccessInfoEstate>((
  577. Map<String, dynamic> e) =>
  578. PaidServicePaySuccessInfoEstate.fromJson(e)).toList() as M;
  579. }
  580. if (<PaidServicePaySuccessInfoEstateUnit>[] is M) {
  581. return data.map<PaidServicePaySuccessInfoEstateUnit>((
  582. Map<String, dynamic> e) =>
  583. PaidServicePaySuccessInfoEstateUnit.fromJson(e)).toList() as M;
  584. }
  585. if (<PaidServicePaySuccessInfoOrder>[] is M) {
  586. return data.map<PaidServicePaySuccessInfoOrder>((
  587. Map<String, dynamic> e) => PaidServicePaySuccessInfoOrder.fromJson(e))
  588. .toList() as M;
  589. }
  590. if (<PaymentIntentEntity>[] is M) {
  591. return data.map<PaymentIntentEntity>((Map<String, dynamic> e) =>
  592. PaymentIntentEntity.fromJson(e)).toList() as M;
  593. }
  594. if (<PaymentPageEntity>[] is M) {
  595. return data.map<PaymentPageEntity>((Map<String, dynamic> e) =>
  596. PaymentPageEntity.fromJson(e)).toList() as M;
  597. }
  598. if (<PaymentPageList>[] is M) {
  599. return data.map<PaymentPageList>((Map<String, dynamic> e) =>
  600. PaymentPageList.fromJson(e)).toList() as M;
  601. }
  602. if (<OrderableEntity>[] is M) {
  603. return data.map<OrderableEntity>((Map<String, dynamic> e) =>
  604. OrderableEntity.fromJson(e)).toList() as M;
  605. }
  606. if (<PropertyNewsDetailEntity>[] is M) {
  607. return data.map<PropertyNewsDetailEntity>((Map<String, dynamic> e) =>
  608. PropertyNewsDetailEntity.fromJson(e)).toList() as M;
  609. }
  610. if (<PropertyNewsEntity>[] is M) {
  611. return data.map<PropertyNewsEntity>((Map<String, dynamic> e) =>
  612. PropertyNewsEntity.fromJson(e)).toList() as M;
  613. }
  614. if (<PropertyNewsList>[] is M) {
  615. return data.map<PropertyNewsList>((Map<String, dynamic> e) =>
  616. PropertyNewsList.fromJson(e)).toList() as M;
  617. }
  618. if (<PropertySaleRentEntity>[] is M) {
  619. return data.map<PropertySaleRentEntity>((Map<String, dynamic> e) =>
  620. PropertySaleRentEntity.fromJson(e)).toList() as M;
  621. }
  622. if (<PropertySaleRentList>[] is M) {
  623. return data.map<PropertySaleRentList>((Map<String, dynamic> e) =>
  624. PropertySaleRentList.fromJson(e)).toList() as M;
  625. }
  626. if (<RepairServiceEntity>[] is M) {
  627. return data.map<RepairServiceEntity>((Map<String, dynamic> e) =>
  628. RepairServiceEntity.fromJson(e)).toList() as M;
  629. }
  630. if (<RepairServiceList>[] is M) {
  631. return data.map<RepairServiceList>((Map<String, dynamic> e) =>
  632. RepairServiceList.fromJson(e)).toList() as M;
  633. }
  634. if (<RepairServiceListMerchant>[] is M) {
  635. return data.map<RepairServiceListMerchant>((Map<String, dynamic> e) =>
  636. RepairServiceListMerchant.fromJson(e)).toList() as M;
  637. }
  638. if (<RepairServiceListCategory>[] is M) {
  639. return data.map<RepairServiceListCategory>((Map<String, dynamic> e) =>
  640. RepairServiceListCategory.fromJson(e)).toList() as M;
  641. }
  642. if (<RewardsActiveDetailEntity>[] is M) {
  643. return data.map<RewardsActiveDetailEntity>((Map<String, dynamic> e) =>
  644. RewardsActiveDetailEntity.fromJson(e)).toList() as M;
  645. }
  646. if (<RewardsActiveDetailData>[] is M) {
  647. return data.map<RewardsActiveDetailData>((Map<String, dynamic> e) =>
  648. RewardsActiveDetailData.fromJson(e)).toList() as M;
  649. }
  650. if (<RewardsActiveDetailDataAccount>[] is M) {
  651. return data.map<RewardsActiveDetailDataAccount>((
  652. Map<String, dynamic> e) => RewardsActiveDetailDataAccount.fromJson(e))
  653. .toList() as M;
  654. }
  655. if (<RewardsActiveDetailDataReward>[] is M) {
  656. return data.map<RewardsActiveDetailDataReward>((Map<String, dynamic> e) =>
  657. RewardsActiveDetailDataReward.fromJson(e)).toList() as M;
  658. }
  659. if (<RewardsBuyEntity>[] is M) {
  660. return data.map<RewardsBuyEntity>((Map<String, dynamic> e) =>
  661. RewardsBuyEntity.fromJson(e)).toList() as M;
  662. }
  663. if (<RewardsBuyReward>[] is M) {
  664. return data.map<RewardsBuyReward>((Map<String, dynamic> e) =>
  665. RewardsBuyReward.fromJson(e)).toList() as M;
  666. }
  667. if (<RewardsBuyRewardRedeemable>[] is M) {
  668. return data.map<RewardsBuyRewardRedeemable>((Map<String, dynamic> e) =>
  669. RewardsBuyRewardRedeemable.fromJson(e)).toList() as M;
  670. }
  671. if (<RewardsCategoryEntity>[] is M) {
  672. return data.map<RewardsCategoryEntity>((Map<String, dynamic> e) =>
  673. RewardsCategoryEntity.fromJson(e)).toList() as M;
  674. }
  675. if (<RewardsDetailEntity>[] is M) {
  676. return data.map<RewardsDetailEntity>((Map<String, dynamic> e) =>
  677. RewardsDetailEntity.fromJson(e)).toList() as M;
  678. }
  679. if (<RewardsDetailRedeemable>[] is M) {
  680. return data.map<RewardsDetailRedeemable>((Map<String, dynamic> e) =>
  681. RewardsDetailRedeemable.fromJson(e)).toList() as M;
  682. }
  683. if (<RewardsHistoryEarnedEntity>[] is M) {
  684. return data.map<RewardsHistoryEarnedEntity>((Map<String, dynamic> e) =>
  685. RewardsHistoryEarnedEntity.fromJson(e)).toList() as M;
  686. }
  687. if (<RewardsHistoryEarnedList>[] is M) {
  688. return data.map<RewardsHistoryEarnedList>((Map<String, dynamic> e) =>
  689. RewardsHistoryEarnedList.fromJson(e)).toList() as M;
  690. }
  691. if (<RewardsHomeEntity>[] is M) {
  692. return data.map<RewardsHomeEntity>((Map<String, dynamic> e) =>
  693. RewardsHomeEntity.fromJson(e)).toList() as M;
  694. }
  695. if (<RewardsHomeData>[] is M) {
  696. return data.map<RewardsHomeData>((Map<String, dynamic> e) =>
  697. RewardsHomeData.fromJson(e)).toList() as M;
  698. }
  699. if (<RewardsHomeDataRewards>[] is M) {
  700. return data.map<RewardsHomeDataRewards>((Map<String, dynamic> e) =>
  701. RewardsHomeDataRewards.fromJson(e)).toList() as M;
  702. }
  703. if (<RewardsHomeTesEntity>[] is M) {
  704. return data.map<RewardsHomeTesEntity>((Map<String, dynamic> e) =>
  705. RewardsHomeTesEntity.fromJson(e)).toList() as M;
  706. }
  707. if (<RewardsHomeTesRewards>[] is M) {
  708. return data.map<RewardsHomeTesRewards>((Map<String, dynamic> e) =>
  709. RewardsHomeTesRewards.fromJson(e)).toList() as M;
  710. }
  711. if (<RewardsHomeTestEntity>[] is M) {
  712. return data.map<RewardsHomeTestEntity>((Map<String, dynamic> e) =>
  713. RewardsHomeTestEntity.fromJson(e)).toList() as M;
  714. }
  715. if (<RewardsHomeTxEntity>[] is M) {
  716. return data.map<RewardsHomeTxEntity>((Map<String, dynamic> e) =>
  717. RewardsHomeTxEntity.fromJson(e)).toList() as M;
  718. }
  719. if (<RewardsIndexEntity>[] is M) {
  720. return data.map<RewardsIndexEntity>((Map<String, dynamic> e) =>
  721. RewardsIndexEntity.fromJson(e)).toList() as M;
  722. }
  723. if (<RewardsIndexContinuous>[] is M) {
  724. return data.map<RewardsIndexContinuous>((Map<String, dynamic> e) =>
  725. RewardsIndexContinuous.fromJson(e)).toList() as M;
  726. }
  727. if (<RewardsIndexTasks>[] is M) {
  728. return data.map<RewardsIndexTasks>((Map<String, dynamic> e) =>
  729. RewardsIndexTasks.fromJson(e)).toList() as M;
  730. }
  731. if (<RewardsListEntity>[] is M) {
  732. return data.map<RewardsListEntity>((Map<String, dynamic> e) =>
  733. RewardsListEntity.fromJson(e)).toList() as M;
  734. }
  735. if (<RewardsListList>[] is M) {
  736. return data.map<RewardsListList>((Map<String, dynamic> e) =>
  737. RewardsListList.fromJson(e)).toList() as M;
  738. }
  739. if (<RewardsMyDetailEntity>[] is M) {
  740. return data.map<RewardsMyDetailEntity>((Map<String, dynamic> e) =>
  741. RewardsMyDetailEntity.fromJson(e)).toList() as M;
  742. }
  743. if (<RewardsMyDetailAccount>[] is M) {
  744. return data.map<RewardsMyDetailAccount>((Map<String, dynamic> e) =>
  745. RewardsMyDetailAccount.fromJson(e)).toList() as M;
  746. }
  747. if (<RewardsMyDetailReward>[] is M) {
  748. return data.map<RewardsMyDetailReward>((Map<String, dynamic> e) =>
  749. RewardsMyDetailReward.fromJson(e)).toList() as M;
  750. }
  751. if (<RewardsMyEntity>[] is M) {
  752. return data.map<RewardsMyEntity>((Map<String, dynamic> e) =>
  753. RewardsMyEntity.fromJson(e)).toList() as M;
  754. }
  755. if (<RewardsMyList>[] is M) {
  756. return data.map<RewardsMyList>((Map<String, dynamic> e) =>
  757. RewardsMyList.fromJson(e)).toList() as M;
  758. }
  759. if (<RewardsMyListReward>[] is M) {
  760. return data.map<RewardsMyListReward>((Map<String, dynamic> e) =>
  761. RewardsMyListReward.fromJson(e)).toList() as M;
  762. }
  763. if (<RewardsSearchEntity>[] is M) {
  764. return data.map<RewardsSearchEntity>((Map<String, dynamic> e) =>
  765. RewardsSearchEntity.fromJson(e)).toList() as M;
  766. }
  767. if (<RewardsSearchRewards>[] is M) {
  768. return data.map<RewardsSearchRewards>((Map<String, dynamic> e) =>
  769. RewardsSearchRewards.fromJson(e)).toList() as M;
  770. }
  771. if (<ServerTime>[] is M) {
  772. return data.map<ServerTime>((Map<String, dynamic> e) =>
  773. ServerTime.fromJson(e)).toList() as M;
  774. }
  775. if (<ServiceCategoryEntity>[] is M) {
  776. return data.map<ServiceCategoryEntity>((Map<String, dynamic> e) =>
  777. ServiceCategoryEntity.fromJson(e)).toList() as M;
  778. }
  779. if (<ServiceEvaluateListEntity>[] is M) {
  780. return data.map<ServiceEvaluateListEntity>((Map<String, dynamic> e) =>
  781. ServiceEvaluateListEntity.fromJson(e)).toList() as M;
  782. }
  783. if (<ServiceEvaluateListList>[] is M) {
  784. return data.map<ServiceEvaluateListList>((Map<String, dynamic> e) =>
  785. ServiceEvaluateListList.fromJson(e)).toList() as M;
  786. }
  787. if (<ServiceEvaluateListListAccount>[] is M) {
  788. return data.map<ServiceEvaluateListListAccount>((
  789. Map<String, dynamic> e) => ServiceEvaluateListListAccount.fromJson(e))
  790. .toList() as M;
  791. }
  792. if (<ServiceInProgressEntity>[] is M) {
  793. return data.map<ServiceInProgressEntity>((Map<String, dynamic> e) =>
  794. ServiceInProgressEntity.fromJson(e)).toList() as M;
  795. }
  796. if (<ServiceInProgressList>[] is M) {
  797. return data.map<ServiceInProgressList>((Map<String, dynamic> e) =>
  798. ServiceInProgressList.fromJson(e)).toList() as M;
  799. }
  800. if (<ServiceInProgressListService>[] is M) {
  801. return data.map<ServiceInProgressListService>((Map<String, dynamic> e) =>
  802. ServiceInProgressListService.fromJson(e)).toList() as M;
  803. }
  804. if (<ServiceInProgressListMerchant>[] is M) {
  805. return data.map<ServiceInProgressListMerchant>((Map<String, dynamic> e) =>
  806. ServiceInProgressListMerchant.fromJson(e)).toList() as M;
  807. }
  808. if (<ServiceOrderDetailEntity>[] is M) {
  809. return data.map<ServiceOrderDetailEntity>((Map<String, dynamic> e) =>
  810. ServiceOrderDetailEntity.fromJson(e)).toList() as M;
  811. }
  812. if (<ServiceOrderDetailAccount>[] is M) {
  813. return data.map<ServiceOrderDetailAccount>((Map<String, dynamic> e) =>
  814. ServiceOrderDetailAccount.fromJson(e)).toList() as M;
  815. }
  816. if (<ServiceOrderDetailOrderService>[] is M) {
  817. return data.map<ServiceOrderDetailOrderService>((
  818. Map<String, dynamic> e) => ServiceOrderDetailOrderService.fromJson(e))
  819. .toList() as M;
  820. }
  821. if (<ServiceOrderDetailMerchant>[] is M) {
  822. return data.map<ServiceOrderDetailMerchant>((Map<String, dynamic> e) =>
  823. ServiceOrderDetailMerchant.fromJson(e)).toList() as M;
  824. }
  825. if (<ServiceOrderDetailStaff>[] is M) {
  826. return data.map<ServiceOrderDetailStaff>((Map<String, dynamic> e) =>
  827. ServiceOrderDetailStaff.fromJson(e)).toList() as M;
  828. }
  829. if (<ServiceOrderDetailOrderProducts>[] is M) {
  830. return data.map<ServiceOrderDetailOrderProducts>((
  831. Map<String, dynamic> e) =>
  832. ServiceOrderDetailOrderProducts.fromJson(e)).toList() as M;
  833. }
  834. if (<ServiceOrderDetailEstate>[] is M) {
  835. return data.map<ServiceOrderDetailEstate>((Map<String, dynamic> e) =>
  836. ServiceOrderDetailEstate.fromJson(e)).toList() as M;
  837. }
  838. if (<ServiceOrderDetailEstateUnit>[] is M) {
  839. return data.map<ServiceOrderDetailEstateUnit>((Map<String, dynamic> e) =>
  840. ServiceOrderDetailEstateUnit.fromJson(e)).toList() as M;
  841. }
  842. if (<ServiceOrderDetailOrder>[] is M) {
  843. return data.map<ServiceOrderDetailOrder>((Map<String, dynamic> e) =>
  844. ServiceOrderDetailOrder.fromJson(e)).toList() as M;
  845. }
  846. if (<ServiceRepairDetailEntity>[] is M) {
  847. return data.map<ServiceRepairDetailEntity>((Map<String, dynamic> e) =>
  848. ServiceRepairDetailEntity.fromJson(e)).toList() as M;
  849. }
  850. if (<ServiceRepairDetailMerchant>[] is M) {
  851. return data.map<ServiceRepairDetailMerchant>((Map<String, dynamic> e) =>
  852. ServiceRepairDetailMerchant.fromJson(e)).toList() as M;
  853. }
  854. if (<ServiceRepairDetailCategory>[] is M) {
  855. return data.map<ServiceRepairDetailCategory>((Map<String, dynamic> e) =>
  856. ServiceRepairDetailCategory.fromJson(e)).toList() as M;
  857. }
  858. if (<ServiceTimePeriodEntity>[] is M) {
  859. return data.map<ServiceTimePeriodEntity>((Map<String, dynamic> e) =>
  860. ServiceTimePeriodEntity.fromJson(e)).toList() as M;
  861. }
  862. if (<TextKonEntity>[] is M) {
  863. return data.map<TextKonEntity>((Map<String, dynamic> e) =>
  864. TextKonEntity.fromJson(e)).toList() as M;
  865. }
  866. if (<UserMeEntity>[] is M) {
  867. return data.map<UserMeEntity>((Map<String, dynamic> e) =>
  868. UserMeEntity.fromJson(e)).toList() as M;
  869. }
  870. if (<UserMeHouseholds>[] is M) {
  871. return data.map<UserMeHouseholds>((Map<String, dynamic> e) =>
  872. UserMeHouseholds.fromJson(e)).toList() as M;
  873. }
  874. if (<UserMeEstates>[] is M) {
  875. return data.map<UserMeEstates>((Map<String, dynamic> e) =>
  876. UserMeEstates.fromJson(e)).toList() as M;
  877. }
  878. if (<UserMeEstatesAccounts>[] is M) {
  879. return data.map<UserMeEstatesAccounts>((Map<String, dynamic> e) =>
  880. UserMeEstatesAccounts.fromJson(e)).toList() as M;
  881. }
  882. if (<UserMeEstatesAccountsUnit>[] is M) {
  883. return data.map<UserMeEstatesAccountsUnit>((Map<String, dynamic> e) =>
  884. UserMeEstatesAccountsUnit.fromJson(e)).toList() as M;
  885. }
  886. if (<UserMeDefaultUnit>[] is M) {
  887. return data.map<UserMeDefaultUnit>((Map<String, dynamic> e) =>
  888. UserMeDefaultUnit.fromJson(e)).toList() as M;
  889. }
  890. if (<UserMeInformation>[] is M) {
  891. return data.map<UserMeInformation>((Map<String, dynamic> e) =>
  892. UserMeInformation.fromJson(e)).toList() as M;
  893. }
  894. if (<VisitorPageEntity>[] is M) {
  895. return data.map<VisitorPageEntity>((Map<String, dynamic> e) =>
  896. VisitorPageEntity.fromJson(e)).toList() as M;
  897. }
  898. if (<VisitorPageList>[] is M) {
  899. return data.map<VisitorPageList>((Map<String, dynamic> e) =>
  900. VisitorPageList.fromJson(e)).toList() as M;
  901. }
  902. debugPrint("$M not found");
  903. return null;
  904. }
  905. static M? fromJsonAsT<M>(dynamic json) {
  906. if (json is M) {
  907. return json;
  908. }
  909. if (json is List) {
  910. return _getListChildType<M>(
  911. json.map((dynamic e) => e as Map<String, dynamic>).toList());
  912. } else {
  913. return jsonConvert.convert<M>(json);
  914. }
  915. }
  916. }
  917. class JsonConvertClassCollection {
  918. Map<String, JsonConvertFunction> convertFuncMap = {
  919. (AuthLoginEntity).toString(): AuthLoginEntity.fromJson,
  920. (CaptchaImgEntity).toString(): CaptchaImgEntity.fromJson,
  921. (CommPaymentDetailEntity).toString(): CommPaymentDetailEntity.fromJson,
  922. (CommPaymentDetailOrderable).toString(): CommPaymentDetailOrderable
  923. .fromJson,
  924. (FacilityBookEntity).toString(): FacilityBookEntity.fromJson,
  925. (FacilityBookFacilityType).toString(): FacilityBookFacilityType.fromJson,
  926. (FacilityBookFacilities).toString(): FacilityBookFacilities.fromJson,
  927. (FacilityBookFacilitiesPeriods).toString(): FacilityBookFacilitiesPeriods
  928. .fromJson,
  929. (FacilityIndexEntity).toString(): FacilityIndexEntity.fromJson,
  930. (FacilityPageEntity).toString(): FacilityPageEntity.fromJson,
  931. (FacilityDetail).toString(): FacilityDetail.fromJson,
  932. (FacilityPageListBooking).toString(): FacilityPageListBooking.fromJson,
  933. (FacilityPageListFacility).toString(): FacilityPageListFacility.fromJson,
  934. (FacilityPageListTimePeriod).toString(): FacilityPageListTimePeriod
  935. .fromJson,
  936. (FacilityOrder).toString(): FacilityOrder.fromJson,
  937. (FeedbackDetailEntity).toString(): FeedbackDetailEntity.fromJson,
  938. (FeedbackDetailReplies).toString(): FeedbackDetailReplies.fromJson,
  939. (FeedbackListEntity).toString(): FeedbackListEntity.fromJson,
  940. (FeedbackItemEntity).toString(): FeedbackItemEntity.fromJson,
  941. (FormContentEntity).toString(): FormContentEntity.fromJson,
  942. (FormDetailEntity).toString(): FormDetailEntity.fromJson,
  943. (FormOrder).toString(): FormOrder.fromJson,
  944. (FormListEntity).toString(): FormListEntity.fromJson,
  945. (FormOptionEntity).toString(): FormOptionEntity.fromJson,
  946. (FormOrderEntity).toString(): FormOrderEntity.fromJson,
  947. (FormOrderOrder).toString(): FormOrderOrder.fromJson,
  948. (FormSubmittedEntity).toString(): FormSubmittedEntity.fromJson,
  949. (FormSubmittedEstateOnlineForm).toString(): FormSubmittedEstateOnlineForm
  950. .fromJson,
  951. (FormSubmittedOrder).toString(): FormSubmittedOrder.fromJson,
  952. (FormSubmittedPageEntity).toString(): FormSubmittedPageEntity.fromJson,
  953. (GarageSaleHistoryEntity).toString(): GarageSaleHistoryEntity.fromJson,
  954. (GarageSaleHistoryList).toString(): GarageSaleHistoryList.fromJson,
  955. (GarageSaleHistoryListOrderProducts)
  956. .toString(): GarageSaleHistoryListOrderProducts.fromJson,
  957. (GarageSaleRentDetailEntity).toString(): GarageSaleRentDetailEntity
  958. .fromJson,
  959. (GarageSaleRentDetailAccount).toString(): GarageSaleRentDetailAccount
  960. .fromJson,
  961. (GarageSaleRentEntity).toString(): GarageSaleRentEntity.fromJson,
  962. (GarageSaleRentList).toString(): GarageSaleRentList.fromJson,
  963. (GarageSaleRentListAccount).toString(): GarageSaleRentListAccount.fromJson,
  964. (HomeListEntity).toString(): HomeListEntity.fromJson,
  965. (HomeListBanners).toString(): HomeListBanners.fromJson,
  966. (HomeListLatestTransactions).toString(): HomeListLatestTransactions
  967. .fromJson,
  968. (HomeListPropertyNews).toString(): HomeListPropertyNews.fromJson,
  969. (IdNameEntity).toString(): IdNameEntity.fromJson,
  970. (LatestNewsDetailEntity).toString(): LatestNewsDetailEntity.fromJson,
  971. (LatestNewsPageEntity).toString(): LatestNewsPageEntity.fromJson,
  972. (LatestNewsList).toString(): LatestNewsList.fromJson,
  973. (MyfollowingListEntity).toString(): MyfollowingListEntity.fromJson,
  974. (MypostsNewsfeedEntity).toString(): MypostsNewsfeedEntity.fromJson,
  975. (MypostsNewsfeedList).toString(): MypostsNewsfeedList.fromJson,
  976. (MypostsNewsfeedListAccount).toString(): MypostsNewsfeedListAccount
  977. .fromJson,
  978. (MypostsSaleRentEntity).toString(): MypostsSaleRentEntity.fromJson,
  979. (MypostsSaleRentList).toString(): MypostsSaleRentList.fromJson,
  980. (NewsfeedCommentPublishEntity).toString(): NewsfeedCommentPublishEntity
  981. .fromJson,
  982. (NewsfeedDetailEntity).toString(): NewsfeedDetailEntity.fromJson,
  983. (NewsfeedDetailAccount).toString(): NewsfeedDetailAccount.fromJson,
  984. (NewsfeedDetailComments).toString(): NewsfeedDetailComments.fromJson,
  985. (NewsfeedDetailCommentsAccount).toString(): NewsfeedDetailCommentsAccount
  986. .fromJson,
  987. (NewsfeedDetailCommentsToAccount)
  988. .toString(): NewsfeedDetailCommentsToAccount.fromJson,
  989. (NewsfeedFollowingEntity).toString(): NewsfeedFollowingEntity.fromJson,
  990. (NewsfeedFollowingList).toString(): NewsfeedFollowingList.fromJson,
  991. (NewsfeedFollowingListAccount).toString(): NewsfeedFollowingListAccount
  992. .fromJson,
  993. (NewsfeedForyouEntity).toString(): NewsfeedForyouEntity.fromJson,
  994. (NewsfeedForyouList).toString(): NewsfeedForyouList.fromJson,
  995. (NewsfeedForyouListAccount).toString(): NewsfeedForyouListAccount.fromJson,
  996. (NewsfeedNewsEntity).toString(): NewsfeedNewsEntity.fromJson,
  997. (NewsfeedNewsList).toString(): NewsfeedNewsList.fromJson,
  998. (NewsfeedNewsListAccount).toString(): NewsfeedNewsListAccount.fromJson,
  999. (NoticeBoardAnnounDetailEntity).toString(): NoticeBoardAnnounDetailEntity
  1000. .fromJson,
  1001. (NoticeBoardAnnounEntity).toString(): NoticeBoardAnnounEntity.fromJson,
  1002. (NoticeBoardAnnounList).toString(): NoticeBoardAnnounList.fromJson,
  1003. (NoticeBoardDocumentsEntity).toString(): NoticeBoardDocumentsEntity
  1004. .fromJson,
  1005. (NoticeBoardDocumentsList).toString(): NoticeBoardDocumentsList.fromJson,
  1006. (NoticeBoardEventDetailEntity).toString(): NoticeBoardEventDetailEntity
  1007. .fromJson,
  1008. (NoticeBoardEventEntity).toString(): NoticeBoardEventEntity.fromJson,
  1009. (NoticeBoardEventList).toString(): NoticeBoardEventList.fromJson,
  1010. (PaidServiceDetailEntity).toString(): PaidServiceDetailEntity.fromJson,
  1011. (PaidServiceDetailMerchant).toString(): PaidServiceDetailMerchant.fromJson,
  1012. (PaidServiceDetailCategory).toString(): PaidServiceDetailCategory.fromJson,
  1013. (PaidServiceDetailProducts).toString(): PaidServiceDetailProducts.fromJson,
  1014. (PaidServiceDetailEvaluations).toString(): PaidServiceDetailEvaluations
  1015. .fromJson,
  1016. (PaidServiceDetailEvaluationsAccount)
  1017. .toString(): PaidServiceDetailEvaluationsAccount.fromJson,
  1018. (PaidServiceEntity).toString(): PaidServiceEntity.fromJson,
  1019. (PaidServiceList).toString(): PaidServiceList.fromJson,
  1020. (PaidServiceListMerchant).toString(): PaidServiceListMerchant.fromJson,
  1021. (PaidServiceListCategory).toString(): PaidServiceListCategory.fromJson,
  1022. (PaidServicePaySuccessInfoEntity)
  1023. .toString(): PaidServicePaySuccessInfoEntity.fromJson,
  1024. (PaidServicePaySuccessInfoAccount)
  1025. .toString(): PaidServicePaySuccessInfoAccount.fromJson,
  1026. (PaidServicePaySuccessInfoOrderService)
  1027. .toString(): PaidServicePaySuccessInfoOrderService.fromJson,
  1028. (PaidServicePaySuccessInfoMerchant)
  1029. .toString(): PaidServicePaySuccessInfoMerchant.fromJson,
  1030. (PaidServicePaySuccessInfoStaff).toString(): PaidServicePaySuccessInfoStaff
  1031. .fromJson,
  1032. (PaidServicePaySuccessInfoOrderProducts)
  1033. .toString(): PaidServicePaySuccessInfoOrderProducts.fromJson,
  1034. (PaidServicePaySuccessInfoEstate)
  1035. .toString(): PaidServicePaySuccessInfoEstate.fromJson,
  1036. (PaidServicePaySuccessInfoEstateUnit)
  1037. .toString(): PaidServicePaySuccessInfoEstateUnit.fromJson,
  1038. (PaidServicePaySuccessInfoOrder).toString(): PaidServicePaySuccessInfoOrder
  1039. .fromJson,
  1040. (PaymentIntentEntity).toString(): PaymentIntentEntity.fromJson,
  1041. (PaymentPageEntity).toString(): PaymentPageEntity.fromJson,
  1042. (PaymentPageList).toString(): PaymentPageList.fromJson,
  1043. (OrderableEntity).toString(): OrderableEntity.fromJson,
  1044. (PropertyNewsDetailEntity).toString(): PropertyNewsDetailEntity.fromJson,
  1045. (PropertyNewsEntity).toString(): PropertyNewsEntity.fromJson,
  1046. (PropertyNewsList).toString(): PropertyNewsList.fromJson,
  1047. (PropertySaleRentEntity).toString(): PropertySaleRentEntity.fromJson,
  1048. (PropertySaleRentList).toString(): PropertySaleRentList.fromJson,
  1049. (RepairServiceEntity).toString(): RepairServiceEntity.fromJson,
  1050. (RepairServiceList).toString(): RepairServiceList.fromJson,
  1051. (RepairServiceListMerchant).toString(): RepairServiceListMerchant.fromJson,
  1052. (RepairServiceListCategory).toString(): RepairServiceListCategory.fromJson,
  1053. (RewardsActiveDetailEntity).toString(): RewardsActiveDetailEntity.fromJson,
  1054. (RewardsActiveDetailData).toString(): RewardsActiveDetailData.fromJson,
  1055. (RewardsActiveDetailDataAccount).toString(): RewardsActiveDetailDataAccount
  1056. .fromJson,
  1057. (RewardsActiveDetailDataReward).toString(): RewardsActiveDetailDataReward
  1058. .fromJson,
  1059. (RewardsBuyEntity).toString(): RewardsBuyEntity.fromJson,
  1060. (RewardsBuyReward).toString(): RewardsBuyReward.fromJson,
  1061. (RewardsBuyRewardRedeemable).toString(): RewardsBuyRewardRedeemable
  1062. .fromJson,
  1063. (RewardsCategoryEntity).toString(): RewardsCategoryEntity.fromJson,
  1064. (RewardsDetailEntity).toString(): RewardsDetailEntity.fromJson,
  1065. (RewardsDetailRedeemable).toString(): RewardsDetailRedeemable.fromJson,
  1066. (RewardsHistoryEarnedEntity).toString(): RewardsHistoryEarnedEntity
  1067. .fromJson,
  1068. (RewardsHistoryEarnedList).toString(): RewardsHistoryEarnedList.fromJson,
  1069. (RewardsHomeEntity).toString(): RewardsHomeEntity.fromJson,
  1070. (RewardsHomeData).toString(): RewardsHomeData.fromJson,
  1071. (RewardsHomeDataRewards).toString(): RewardsHomeDataRewards.fromJson,
  1072. (RewardsHomeTesEntity).toString(): RewardsHomeTesEntity.fromJson,
  1073. (RewardsHomeTesRewards).toString(): RewardsHomeTesRewards.fromJson,
  1074. (RewardsHomeTestEntity).toString(): RewardsHomeTestEntity.fromJson,
  1075. (RewardsHomeTxEntity).toString(): RewardsHomeTxEntity.fromJson,
  1076. (RewardsIndexEntity).toString(): RewardsIndexEntity.fromJson,
  1077. (RewardsIndexContinuous).toString(): RewardsIndexContinuous.fromJson,
  1078. (RewardsIndexTasks).toString(): RewardsIndexTasks.fromJson,
  1079. (RewardsListEntity).toString(): RewardsListEntity.fromJson,
  1080. (RewardsListList).toString(): RewardsListList.fromJson,
  1081. (RewardsMyDetailEntity).toString(): RewardsMyDetailEntity.fromJson,
  1082. (RewardsMyDetailAccount).toString(): RewardsMyDetailAccount.fromJson,
  1083. (RewardsMyDetailReward).toString(): RewardsMyDetailReward.fromJson,
  1084. (RewardsMyEntity).toString(): RewardsMyEntity.fromJson,
  1085. (RewardsMyList).toString(): RewardsMyList.fromJson,
  1086. (RewardsMyListReward).toString(): RewardsMyListReward.fromJson,
  1087. (RewardsSearchEntity).toString(): RewardsSearchEntity.fromJson,
  1088. (RewardsSearchRewards).toString(): RewardsSearchRewards.fromJson,
  1089. (ServerTime).toString(): ServerTime.fromJson,
  1090. (ServiceCategoryEntity).toString(): ServiceCategoryEntity.fromJson,
  1091. (ServiceEvaluateListEntity).toString(): ServiceEvaluateListEntity.fromJson,
  1092. (ServiceEvaluateListList).toString(): ServiceEvaluateListList.fromJson,
  1093. (ServiceEvaluateListListAccount).toString(): ServiceEvaluateListListAccount
  1094. .fromJson,
  1095. (ServiceInProgressEntity).toString(): ServiceInProgressEntity.fromJson,
  1096. (ServiceInProgressList).toString(): ServiceInProgressList.fromJson,
  1097. (ServiceInProgressListService).toString(): ServiceInProgressListService
  1098. .fromJson,
  1099. (ServiceInProgressListMerchant).toString(): ServiceInProgressListMerchant
  1100. .fromJson,
  1101. (ServiceOrderDetailEntity).toString(): ServiceOrderDetailEntity.fromJson,
  1102. (ServiceOrderDetailAccount).toString(): ServiceOrderDetailAccount.fromJson,
  1103. (ServiceOrderDetailOrderService).toString(): ServiceOrderDetailOrderService
  1104. .fromJson,
  1105. (ServiceOrderDetailMerchant).toString(): ServiceOrderDetailMerchant
  1106. .fromJson,
  1107. (ServiceOrderDetailStaff).toString(): ServiceOrderDetailStaff.fromJson,
  1108. (ServiceOrderDetailOrderProducts)
  1109. .toString(): ServiceOrderDetailOrderProducts.fromJson,
  1110. (ServiceOrderDetailEstate).toString(): ServiceOrderDetailEstate.fromJson,
  1111. (ServiceOrderDetailEstateUnit).toString(): ServiceOrderDetailEstateUnit
  1112. .fromJson,
  1113. (ServiceOrderDetailOrder).toString(): ServiceOrderDetailOrder.fromJson,
  1114. (ServiceRepairDetailEntity).toString(): ServiceRepairDetailEntity.fromJson,
  1115. (ServiceRepairDetailMerchant).toString(): ServiceRepairDetailMerchant
  1116. .fromJson,
  1117. (ServiceRepairDetailCategory).toString(): ServiceRepairDetailCategory
  1118. .fromJson,
  1119. (ServiceTimePeriodEntity).toString(): ServiceTimePeriodEntity.fromJson,
  1120. (TextKonEntity).toString(): TextKonEntity.fromJson,
  1121. (UserMeEntity).toString(): UserMeEntity.fromJson,
  1122. (UserMeHouseholds).toString(): UserMeHouseholds.fromJson,
  1123. (UserMeEstates).toString(): UserMeEstates.fromJson,
  1124. (UserMeEstatesAccounts).toString(): UserMeEstatesAccounts.fromJson,
  1125. (UserMeEstatesAccountsUnit).toString(): UserMeEstatesAccountsUnit.fromJson,
  1126. (UserMeDefaultUnit).toString(): UserMeDefaultUnit.fromJson,
  1127. (UserMeInformation).toString(): UserMeInformation.fromJson,
  1128. (VisitorPageEntity).toString(): VisitorPageEntity.fromJson,
  1129. (VisitorPageList).toString(): VisitorPageList.fromJson,
  1130. };
  1131. bool containsKey(String type) {
  1132. return convertFuncMap.containsKey(type);
  1133. }
  1134. JsonConvertFunction? operator [](String key) {
  1135. return convertFuncMap[key];
  1136. }
  1137. }