json_convert_content.dart 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144
  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) => CommPaymentDetailEntity.fromJson(e)).toList() as M;
  212. }
  213. if (<CommPaymentDetailOrderable>[] is M) {
  214. return data.map<CommPaymentDetailOrderable>((Map<String, dynamic> e) => CommPaymentDetailOrderable.fromJson(e)).toList() as M;
  215. }
  216. if (<FacilityBookEntity>[] is M) {
  217. return data.map<FacilityBookEntity>((Map<String, dynamic> e) =>
  218. FacilityBookEntity.fromJson(e)).toList() as M;
  219. }
  220. if (<FacilityBookFacilityType>[] is M) {
  221. return data.map<FacilityBookFacilityType>((Map<String, dynamic> e) =>
  222. FacilityBookFacilityType.fromJson(e)).toList() as M;
  223. }
  224. if (<FacilityBookFacilities>[] is M) {
  225. return data.map<FacilityBookFacilities>((Map<String, dynamic> e) =>
  226. FacilityBookFacilities.fromJson(e)).toList() as M;
  227. }
  228. if (<FacilityBookFacilitiesPeriods>[] is M) {
  229. return data.map<FacilityBookFacilitiesPeriods>((Map<String, dynamic> e) =>
  230. FacilityBookFacilitiesPeriods.fromJson(e)).toList() as M;
  231. }
  232. if (<FacilityIndexEntity>[] is M) {
  233. return data.map<FacilityIndexEntity>((Map<String, dynamic> e) =>
  234. FacilityIndexEntity.fromJson(e)).toList() as M;
  235. }
  236. if (<FacilityPageEntity>[] is M) {
  237. return data.map<FacilityPageEntity>((Map<String, dynamic> e) =>
  238. FacilityPageEntity.fromJson(e)).toList() as M;
  239. }
  240. if (<FacilityDetail>[] is M) {
  241. return data.map<FacilityDetail>((Map<String, dynamic> e) =>
  242. FacilityDetail.fromJson(e)).toList() as M;
  243. }
  244. if (<FacilityPageListBooking>[] is M) {
  245. return data.map<FacilityPageListBooking>((Map<String, dynamic> e) =>
  246. FacilityPageListBooking.fromJson(e)).toList() as M;
  247. }
  248. if (<FacilityPageListFacility>[] is M) {
  249. return data.map<FacilityPageListFacility>((Map<String, dynamic> e) =>
  250. FacilityPageListFacility.fromJson(e)).toList() as M;
  251. }
  252. if (<FacilityPageListTimePeriod>[] is M) {
  253. return data.map<FacilityPageListTimePeriod>((Map<String, dynamic> e) =>
  254. FacilityPageListTimePeriod.fromJson(e)).toList() as M;
  255. }
  256. if (<FacilityOrder>[] is M) {
  257. return data.map<FacilityOrder>((Map<String, dynamic> e) =>
  258. FacilityOrder.fromJson(e)).toList() as M;
  259. }
  260. if (<FeedbackDetailEntity>[] is M) {
  261. return data.map<FeedbackDetailEntity>((Map<String, dynamic> e) =>
  262. FeedbackDetailEntity.fromJson(e)).toList() as M;
  263. }
  264. if (<FeedbackDetailReplies>[] is M) {
  265. return data.map<FeedbackDetailReplies>((Map<String, dynamic> e) =>
  266. FeedbackDetailReplies.fromJson(e)).toList() as M;
  267. }
  268. if (<FeedbackListEntity>[] is M) {
  269. return data.map<FeedbackListEntity>((Map<String, dynamic> e) =>
  270. FeedbackListEntity.fromJson(e)).toList() as M;
  271. }
  272. if (<FeedbackItemEntity>[] is M) {
  273. return data.map<FeedbackItemEntity>((Map<String, dynamic> e) =>
  274. FeedbackItemEntity.fromJson(e)).toList() as M;
  275. }
  276. if (<FormContentEntity>[] is M) {
  277. return data.map<FormContentEntity>((Map<String, dynamic> e) =>
  278. FormContentEntity.fromJson(e)).toList() as M;
  279. }
  280. if (<FormDetailEntity>[] is M) {
  281. return data.map<FormDetailEntity>((Map<String, dynamic> e) =>
  282. FormDetailEntity.fromJson(e)).toList() as M;
  283. }
  284. if (<FormOrder>[] is M) {
  285. return data.map<FormOrder>((Map<String, dynamic> e) =>
  286. FormOrder.fromJson(e)).toList() as M;
  287. }
  288. if (<FormListEntity>[] is M) {
  289. return data.map<FormListEntity>((Map<String, dynamic> e) =>
  290. FormListEntity.fromJson(e)).toList() as M;
  291. }
  292. if (<FormOptionEntity>[] is M) {
  293. return data.map<FormOptionEntity>((Map<String, dynamic> e) =>
  294. FormOptionEntity.fromJson(e)).toList() as M;
  295. }
  296. if (<FormOrderEntity>[] is M) {
  297. return data.map<FormOrderEntity>((Map<String, dynamic> e) =>
  298. FormOrderEntity.fromJson(e)).toList() as M;
  299. }
  300. if (<FormOrderOrder>[] is M) {
  301. return data.map<FormOrderOrder>((Map<String, dynamic> e) =>
  302. FormOrderOrder.fromJson(e)).toList() as M;
  303. }
  304. if (<FormSubmittedEntity>[] is M) {
  305. return data.map<FormSubmittedEntity>((Map<String, dynamic> e) =>
  306. FormSubmittedEntity.fromJson(e)).toList() as M;
  307. }
  308. if (<FormSubmittedEstateOnlineForm>[] is M) {
  309. return data.map<FormSubmittedEstateOnlineForm>((Map<String, dynamic> e) =>
  310. FormSubmittedEstateOnlineForm.fromJson(e)).toList() as M;
  311. }
  312. if (<FormSubmittedOrder>[] is M) {
  313. return data.map<FormSubmittedOrder>((Map<String, dynamic> e) =>
  314. FormSubmittedOrder.fromJson(e)).toList() as M;
  315. }
  316. if (<FormSubmittedPageEntity>[] is M) {
  317. return data.map<FormSubmittedPageEntity>((Map<String, dynamic> e) =>
  318. FormSubmittedPageEntity.fromJson(e)).toList() as M;
  319. }
  320. if (<GarageSaleHistoryEntity>[] is M) {
  321. return data.map<GarageSaleHistoryEntity>((Map<String, dynamic> e) =>
  322. GarageSaleHistoryEntity.fromJson(e)).toList() as M;
  323. }
  324. if (<GarageSaleHistoryList>[] is M) {
  325. return data.map<GarageSaleHistoryList>((Map<String, dynamic> e) =>
  326. GarageSaleHistoryList.fromJson(e)).toList() as M;
  327. }
  328. if (<GarageSaleHistoryListOrderProducts>[] is M) {
  329. return data.map<GarageSaleHistoryListOrderProducts>((
  330. Map<String, dynamic> e) =>
  331. GarageSaleHistoryListOrderProducts.fromJson(e)).toList() as M;
  332. }
  333. if (<GarageSaleRentDetailEntity>[] is M) {
  334. return data.map<GarageSaleRentDetailEntity>((Map<String, dynamic> e) =>
  335. GarageSaleRentDetailEntity.fromJson(e)).toList() as M;
  336. }
  337. if (<GarageSaleRentDetailAccount>[] is M) {
  338. return data.map<GarageSaleRentDetailAccount>((Map<String, dynamic> e) =>
  339. GarageSaleRentDetailAccount.fromJson(e)).toList() as M;
  340. }
  341. if (<GarageSaleRentEntity>[] is M) {
  342. return data.map<GarageSaleRentEntity>((Map<String, dynamic> e) =>
  343. GarageSaleRentEntity.fromJson(e)).toList() as M;
  344. }
  345. if (<GarageSaleRentList>[] is M) {
  346. return data.map<GarageSaleRentList>((Map<String, dynamic> e) =>
  347. GarageSaleRentList.fromJson(e)).toList() as M;
  348. }
  349. if (<GarageSaleRentListAccount>[] is M) {
  350. return data.map<GarageSaleRentListAccount>((Map<String, dynamic> e) =>
  351. GarageSaleRentListAccount.fromJson(e)).toList() as M;
  352. }
  353. if (<HomeListEntity>[] is M) {
  354. return data.map<HomeListEntity>((Map<String, dynamic> e) =>
  355. HomeListEntity.fromJson(e)).toList() as M;
  356. }
  357. if (<HomeListBanners>[] is M) {
  358. return data.map<HomeListBanners>((Map<String, dynamic> e) =>
  359. HomeListBanners.fromJson(e)).toList() as M;
  360. }
  361. if (<HomeListLatestTransactions>[] is M) {
  362. return data.map<HomeListLatestTransactions>((Map<String, dynamic> e) =>
  363. HomeListLatestTransactions.fromJson(e)).toList() as M;
  364. }
  365. if (<HomeListPropertyNews>[] is M) {
  366. return data.map<HomeListPropertyNews>((Map<String, dynamic> e) =>
  367. HomeListPropertyNews.fromJson(e)).toList() as M;
  368. }
  369. if (<IdNameEntity>[] is M) {
  370. return data.map<IdNameEntity>((Map<String, dynamic> e) =>
  371. IdNameEntity.fromJson(e)).toList() as M;
  372. }
  373. if (<LatestNewsDetailEntity>[] is M) {
  374. return data.map<LatestNewsDetailEntity>((Map<String, dynamic> e) =>
  375. LatestNewsDetailEntity.fromJson(e)).toList() as M;
  376. }
  377. if (<LatestNewsPageEntity>[] is M) {
  378. return data.map<LatestNewsPageEntity>((Map<String, dynamic> e) =>
  379. LatestNewsPageEntity.fromJson(e)).toList() as M;
  380. }
  381. if (<LatestNewsList>[] is M) {
  382. return data.map<LatestNewsList>((Map<String, dynamic> e) =>
  383. LatestNewsList.fromJson(e)).toList() as M;
  384. }
  385. if (<MyfollowingListEntity>[] is M) {
  386. return data.map<MyfollowingListEntity>((Map<String, dynamic> e) =>
  387. MyfollowingListEntity.fromJson(e)).toList() as M;
  388. }
  389. if (<MypostsNewsfeedEntity>[] is M) {
  390. return data.map<MypostsNewsfeedEntity>((Map<String, dynamic> e) =>
  391. MypostsNewsfeedEntity.fromJson(e)).toList() as M;
  392. }
  393. if (<MypostsNewsfeedList>[] is M) {
  394. return data.map<MypostsNewsfeedList>((Map<String, dynamic> e) =>
  395. MypostsNewsfeedList.fromJson(e)).toList() as M;
  396. }
  397. if (<MypostsNewsfeedListAccount>[] is M) {
  398. return data.map<MypostsNewsfeedListAccount>((Map<String, dynamic> e) =>
  399. MypostsNewsfeedListAccount.fromJson(e)).toList() as M;
  400. }
  401. if (<MypostsSaleRentEntity>[] is M) {
  402. return data.map<MypostsSaleRentEntity>((Map<String, dynamic> e) =>
  403. MypostsSaleRentEntity.fromJson(e)).toList() as M;
  404. }
  405. if (<MypostsSaleRentList>[] is M) {
  406. return data.map<MypostsSaleRentList>((Map<String, dynamic> e) =>
  407. MypostsSaleRentList.fromJson(e)).toList() as M;
  408. }
  409. if (<NewsfeedCommentPublishEntity>[] is M) {
  410. return data.map<NewsfeedCommentPublishEntity>((Map<String, dynamic> e) =>
  411. NewsfeedCommentPublishEntity.fromJson(e)).toList() as M;
  412. }
  413. if (<NewsfeedDetailEntity>[] is M) {
  414. return data.map<NewsfeedDetailEntity>((Map<String, dynamic> e) =>
  415. NewsfeedDetailEntity.fromJson(e)).toList() as M;
  416. }
  417. if (<NewsfeedDetailAccount>[] is M) {
  418. return data.map<NewsfeedDetailAccount>((Map<String, dynamic> e) =>
  419. NewsfeedDetailAccount.fromJson(e)).toList() as M;
  420. }
  421. if (<NewsfeedDetailComments>[] is M) {
  422. return data.map<NewsfeedDetailComments>((Map<String, dynamic> e) =>
  423. NewsfeedDetailComments.fromJson(e)).toList() as M;
  424. }
  425. if (<NewsfeedDetailCommentsAccount>[] is M) {
  426. return data.map<NewsfeedDetailCommentsAccount>((Map<String, dynamic> e) =>
  427. NewsfeedDetailCommentsAccount.fromJson(e)).toList() as M;
  428. }
  429. if (<NewsfeedDetailCommentsToAccount>[] is M) {
  430. return data.map<NewsfeedDetailCommentsToAccount>((
  431. Map<String, dynamic> e) =>
  432. NewsfeedDetailCommentsToAccount.fromJson(e)).toList() as M;
  433. }
  434. if (<NewsfeedFollowingEntity>[] is M) {
  435. return data.map<NewsfeedFollowingEntity>((Map<String, dynamic> e) =>
  436. NewsfeedFollowingEntity.fromJson(e)).toList() as M;
  437. }
  438. if (<NewsfeedFollowingList>[] is M) {
  439. return data.map<NewsfeedFollowingList>((Map<String, dynamic> e) =>
  440. NewsfeedFollowingList.fromJson(e)).toList() as M;
  441. }
  442. if (<NewsfeedFollowingListAccount>[] is M) {
  443. return data.map<NewsfeedFollowingListAccount>((Map<String, dynamic> e) =>
  444. NewsfeedFollowingListAccount.fromJson(e)).toList() as M;
  445. }
  446. if (<NewsfeedForyouEntity>[] is M) {
  447. return data.map<NewsfeedForyouEntity>((Map<String, dynamic> e) =>
  448. NewsfeedForyouEntity.fromJson(e)).toList() as M;
  449. }
  450. if (<NewsfeedForyouList>[] is M) {
  451. return data.map<NewsfeedForyouList>((Map<String, dynamic> e) =>
  452. NewsfeedForyouList.fromJson(e)).toList() as M;
  453. }
  454. if (<NewsfeedForyouListAccount>[] is M) {
  455. return data.map<NewsfeedForyouListAccount>((Map<String, dynamic> e) =>
  456. NewsfeedForyouListAccount.fromJson(e)).toList() as M;
  457. }
  458. if (<NewsfeedNewsEntity>[] is M) {
  459. return data.map<NewsfeedNewsEntity>((Map<String, dynamic> e) =>
  460. NewsfeedNewsEntity.fromJson(e)).toList() as M;
  461. }
  462. if (<NewsfeedNewsList>[] is M) {
  463. return data.map<NewsfeedNewsList>((Map<String, dynamic> e) =>
  464. NewsfeedNewsList.fromJson(e)).toList() as M;
  465. }
  466. if (<NewsfeedNewsListAccount>[] is M) {
  467. return data.map<NewsfeedNewsListAccount>((Map<String, dynamic> e) =>
  468. NewsfeedNewsListAccount.fromJson(e)).toList() as M;
  469. }
  470. if (<NoticeBoardAnnounDetailEntity>[] is M) {
  471. return data.map<NoticeBoardAnnounDetailEntity>((Map<String, dynamic> e) =>
  472. NoticeBoardAnnounDetailEntity.fromJson(e)).toList() as M;
  473. }
  474. if (<NoticeBoardAnnounEntity>[] is M) {
  475. return data.map<NoticeBoardAnnounEntity>((Map<String, dynamic> e) =>
  476. NoticeBoardAnnounEntity.fromJson(e)).toList() as M;
  477. }
  478. if (<NoticeBoardAnnounList>[] is M) {
  479. return data.map<NoticeBoardAnnounList>((Map<String, dynamic> e) =>
  480. NoticeBoardAnnounList.fromJson(e)).toList() as M;
  481. }
  482. if (<NoticeBoardDocumentsEntity>[] is M) {
  483. return data.map<NoticeBoardDocumentsEntity>((Map<String, dynamic> e) =>
  484. NoticeBoardDocumentsEntity.fromJson(e)).toList() as M;
  485. }
  486. if (<NoticeBoardDocumentsList>[] is M) {
  487. return data.map<NoticeBoardDocumentsList>((Map<String, dynamic> e) =>
  488. NoticeBoardDocumentsList.fromJson(e)).toList() as M;
  489. }
  490. if (<NoticeBoardEventDetailEntity>[] is M) {
  491. return data.map<NoticeBoardEventDetailEntity>((Map<String, dynamic> e) =>
  492. NoticeBoardEventDetailEntity.fromJson(e)).toList() as M;
  493. }
  494. if (<NoticeBoardEventEntity>[] is M) {
  495. return data.map<NoticeBoardEventEntity>((Map<String, dynamic> e) =>
  496. NoticeBoardEventEntity.fromJson(e)).toList() as M;
  497. }
  498. if (<NoticeBoardEventList>[] is M) {
  499. return data.map<NoticeBoardEventList>((Map<String, dynamic> e) =>
  500. NoticeBoardEventList.fromJson(e)).toList() as M;
  501. }
  502. if (<PaidServiceDetailEntity>[] is M) {
  503. return data.map<PaidServiceDetailEntity>((Map<String, dynamic> e) =>
  504. PaidServiceDetailEntity.fromJson(e)).toList() as M;
  505. }
  506. if (<PaidServiceDetailMerchant>[] is M) {
  507. return data.map<PaidServiceDetailMerchant>((Map<String, dynamic> e) =>
  508. PaidServiceDetailMerchant.fromJson(e)).toList() as M;
  509. }
  510. if (<PaidServiceDetailCategory>[] is M) {
  511. return data.map<PaidServiceDetailCategory>((Map<String, dynamic> e) =>
  512. PaidServiceDetailCategory.fromJson(e)).toList() as M;
  513. }
  514. if (<PaidServiceDetailProducts>[] is M) {
  515. return data.map<PaidServiceDetailProducts>((Map<String, dynamic> e) =>
  516. PaidServiceDetailProducts.fromJson(e)).toList() as M;
  517. }
  518. if (<PaidServiceDetailEvaluations>[] is M) {
  519. return data.map<PaidServiceDetailEvaluations>((Map<String, dynamic> e) =>
  520. PaidServiceDetailEvaluations.fromJson(e)).toList() as M;
  521. }
  522. if (<PaidServiceDetailEvaluationsAccount>[] is M) {
  523. return data.map<PaidServiceDetailEvaluationsAccount>((
  524. Map<String, dynamic> e) =>
  525. PaidServiceDetailEvaluationsAccount.fromJson(e)).toList() as M;
  526. }
  527. if (<PaidServiceEntity>[] is M) {
  528. return data.map<PaidServiceEntity>((Map<String, dynamic> e) =>
  529. PaidServiceEntity.fromJson(e)).toList() as M;
  530. }
  531. if (<PaidServiceList>[] is M) {
  532. return data.map<PaidServiceList>((Map<String, dynamic> e) =>
  533. PaidServiceList.fromJson(e)).toList() as M;
  534. }
  535. if (<PaidServiceListMerchant>[] is M) {
  536. return data.map<PaidServiceListMerchant>((Map<String, dynamic> e) =>
  537. PaidServiceListMerchant.fromJson(e)).toList() as M;
  538. }
  539. if (<PaidServiceListCategory>[] is M) {
  540. return data.map<PaidServiceListCategory>((Map<String, dynamic> e) =>
  541. PaidServiceListCategory.fromJson(e)).toList() as M;
  542. }
  543. if (<PaidServicePaySuccessInfoEntity>[] is M) {
  544. return data.map<PaidServicePaySuccessInfoEntity>((
  545. Map<String, dynamic> e) =>
  546. PaidServicePaySuccessInfoEntity.fromJson(e)).toList() as M;
  547. }
  548. if (<PaidServicePaySuccessInfoAccount>[] is M) {
  549. return data.map<PaidServicePaySuccessInfoAccount>((
  550. Map<String, dynamic> e) =>
  551. PaidServicePaySuccessInfoAccount.fromJson(e)).toList() as M;
  552. }
  553. if (<PaidServicePaySuccessInfoOrderService>[] is M) {
  554. return data.map<PaidServicePaySuccessInfoOrderService>((
  555. Map<String, dynamic> e) =>
  556. PaidServicePaySuccessInfoOrderService.fromJson(e)).toList() as M;
  557. }
  558. if (<PaidServicePaySuccessInfoMerchant>[] is M) {
  559. return data.map<PaidServicePaySuccessInfoMerchant>((
  560. Map<String, dynamic> e) =>
  561. PaidServicePaySuccessInfoMerchant.fromJson(e)).toList() as M;
  562. }
  563. if (<PaidServicePaySuccessInfoStaff>[] is M) {
  564. return data.map<PaidServicePaySuccessInfoStaff>((
  565. Map<String, dynamic> e) => PaidServicePaySuccessInfoStaff.fromJson(e))
  566. .toList() as M;
  567. }
  568. if (<PaidServicePaySuccessInfoOrderProducts>[] is M) {
  569. return data.map<PaidServicePaySuccessInfoOrderProducts>((
  570. Map<String, dynamic> e) =>
  571. PaidServicePaySuccessInfoOrderProducts.fromJson(e)).toList() as M;
  572. }
  573. if (<PaidServicePaySuccessInfoEstate>[] is M) {
  574. return data.map<PaidServicePaySuccessInfoEstate>((
  575. Map<String, dynamic> e) =>
  576. PaidServicePaySuccessInfoEstate.fromJson(e)).toList() as M;
  577. }
  578. if (<PaidServicePaySuccessInfoEstateUnit>[] is M) {
  579. return data.map<PaidServicePaySuccessInfoEstateUnit>((
  580. Map<String, dynamic> e) =>
  581. PaidServicePaySuccessInfoEstateUnit.fromJson(e)).toList() as M;
  582. }
  583. if (<PaidServicePaySuccessInfoOrder>[] is M) {
  584. return data.map<PaidServicePaySuccessInfoOrder>((
  585. Map<String, dynamic> e) => PaidServicePaySuccessInfoOrder.fromJson(e))
  586. .toList() as M;
  587. }
  588. if (<PaymentIntentEntity>[] is M) {
  589. return data.map<PaymentIntentEntity>((Map<String, dynamic> e) =>
  590. PaymentIntentEntity.fromJson(e)).toList() as M;
  591. }
  592. if (<PaymentPageEntity>[] is M) {
  593. return data.map<PaymentPageEntity>((Map<String, dynamic> e) =>
  594. PaymentPageEntity.fromJson(e)).toList() as M;
  595. }
  596. if (<PaymentPageList>[] is M) {
  597. return data.map<PaymentPageList>((Map<String, dynamic> e) =>
  598. PaymentPageList.fromJson(e)).toList() as M;
  599. }
  600. if (<OrderableEntity>[] is M) {
  601. return data.map<OrderableEntity>((Map<String, dynamic> e) => OrderableEntity.fromJson(e)).toList() as M;
  602. }
  603. if (<PropertyNewsDetailEntity>[] is M) {
  604. return data.map<PropertyNewsDetailEntity>((Map<String, dynamic> e) =>
  605. PropertyNewsDetailEntity.fromJson(e)).toList() as M;
  606. }
  607. if (<PropertyNewsEntity>[] is M) {
  608. return data.map<PropertyNewsEntity>((Map<String, dynamic> e) =>
  609. PropertyNewsEntity.fromJson(e)).toList() as M;
  610. }
  611. if (<PropertyNewsList>[] is M) {
  612. return data.map<PropertyNewsList>((Map<String, dynamic> e) =>
  613. PropertyNewsList.fromJson(e)).toList() as M;
  614. }
  615. if (<PropertySaleRentEntity>[] is M) {
  616. return data.map<PropertySaleRentEntity>((Map<String, dynamic> e) =>
  617. PropertySaleRentEntity.fromJson(e)).toList() as M;
  618. }
  619. if (<PropertySaleRentList>[] is M) {
  620. return data.map<PropertySaleRentList>((Map<String, dynamic> e) =>
  621. PropertySaleRentList.fromJson(e)).toList() as M;
  622. }
  623. if (<RepairServiceEntity>[] is M) {
  624. return data.map<RepairServiceEntity>((Map<String, dynamic> e) =>
  625. RepairServiceEntity.fromJson(e)).toList() as M;
  626. }
  627. if (<RepairServiceList>[] is M) {
  628. return data.map<RepairServiceList>((Map<String, dynamic> e) =>
  629. RepairServiceList.fromJson(e)).toList() as M;
  630. }
  631. if (<RepairServiceListMerchant>[] is M) {
  632. return data.map<RepairServiceListMerchant>((Map<String, dynamic> e) =>
  633. RepairServiceListMerchant.fromJson(e)).toList() as M;
  634. }
  635. if (<RepairServiceListCategory>[] is M) {
  636. return data.map<RepairServiceListCategory>((Map<String, dynamic> e) =>
  637. RepairServiceListCategory.fromJson(e)).toList() as M;
  638. }
  639. if (<RewardsActiveDetailEntity>[] is M) {
  640. return data.map<RewardsActiveDetailEntity>((Map<String, dynamic> e) =>
  641. RewardsActiveDetailEntity.fromJson(e)).toList() as M;
  642. }
  643. if (<RewardsActiveDetailData>[] is M) {
  644. return data.map<RewardsActiveDetailData>((Map<String, dynamic> e) =>
  645. RewardsActiveDetailData.fromJson(e)).toList() as M;
  646. }
  647. if (<RewardsActiveDetailDataAccount>[] is M) {
  648. return data.map<RewardsActiveDetailDataAccount>((
  649. Map<String, dynamic> e) => RewardsActiveDetailDataAccount.fromJson(e))
  650. .toList() as M;
  651. }
  652. if (<RewardsActiveDetailDataReward>[] is M) {
  653. return data.map<RewardsActiveDetailDataReward>((Map<String, dynamic> e) =>
  654. RewardsActiveDetailDataReward.fromJson(e)).toList() as M;
  655. }
  656. if (<RewardsBuyEntity>[] is M) {
  657. return data.map<RewardsBuyEntity>((Map<String, dynamic> e) =>
  658. RewardsBuyEntity.fromJson(e)).toList() as M;
  659. }
  660. if (<RewardsBuyReward>[] is M) {
  661. return data.map<RewardsBuyReward>((Map<String, dynamic> e) =>
  662. RewardsBuyReward.fromJson(e)).toList() as M;
  663. }
  664. if (<RewardsBuyRewardRedeemable>[] is M) {
  665. return data.map<RewardsBuyRewardRedeemable>((Map<String, dynamic> e) =>
  666. RewardsBuyRewardRedeemable.fromJson(e)).toList() as M;
  667. }
  668. if (<RewardsCategoryEntity>[] is M) {
  669. return data.map<RewardsCategoryEntity>((Map<String, dynamic> e) =>
  670. RewardsCategoryEntity.fromJson(e)).toList() as M;
  671. }
  672. if (<RewardsDetailEntity>[] is M) {
  673. return data.map<RewardsDetailEntity>((Map<String, dynamic> e) =>
  674. RewardsDetailEntity.fromJson(e)).toList() as M;
  675. }
  676. if (<RewardsDetailRedeemable>[] is M) {
  677. return data.map<RewardsDetailRedeemable>((Map<String, dynamic> e) =>
  678. RewardsDetailRedeemable.fromJson(e)).toList() as M;
  679. }
  680. if (<RewardsHistoryEarnedEntity>[] is M) {
  681. return data.map<RewardsHistoryEarnedEntity>((Map<String, dynamic> e) =>
  682. RewardsHistoryEarnedEntity.fromJson(e)).toList() as M;
  683. }
  684. if (<RewardsHistoryEarnedList>[] is M) {
  685. return data.map<RewardsHistoryEarnedList>((Map<String, dynamic> e) =>
  686. RewardsHistoryEarnedList.fromJson(e)).toList() as M;
  687. }
  688. if (<RewardsHomeEntity>[] is M) {
  689. return data.map<RewardsHomeEntity>((Map<String, dynamic> e) =>
  690. RewardsHomeEntity.fromJson(e)).toList() as M;
  691. }
  692. if (<RewardsHomeData>[] is M) {
  693. return data.map<RewardsHomeData>((Map<String, dynamic> e) =>
  694. RewardsHomeData.fromJson(e)).toList() as M;
  695. }
  696. if (<RewardsHomeDataRewards>[] is M) {
  697. return data.map<RewardsHomeDataRewards>((Map<String, dynamic> e) =>
  698. RewardsHomeDataRewards.fromJson(e)).toList() as M;
  699. }
  700. if (<RewardsHomeTesEntity>[] is M) {
  701. return data.map<RewardsHomeTesEntity>((Map<String, dynamic> e) =>
  702. RewardsHomeTesEntity.fromJson(e)).toList() as M;
  703. }
  704. if (<RewardsHomeTesRewards>[] is M) {
  705. return data.map<RewardsHomeTesRewards>((Map<String, dynamic> e) =>
  706. RewardsHomeTesRewards.fromJson(e)).toList() as M;
  707. }
  708. if (<RewardsHomeTestEntity>[] is M) {
  709. return data.map<RewardsHomeTestEntity>((Map<String, dynamic> e) =>
  710. RewardsHomeTestEntity.fromJson(e)).toList() as M;
  711. }
  712. if (<RewardsHomeTxEntity>[] is M) {
  713. return data.map<RewardsHomeTxEntity>((Map<String, dynamic> e) =>
  714. RewardsHomeTxEntity.fromJson(e)).toList() as M;
  715. }
  716. if (<RewardsIndexEntity>[] is M) {
  717. return data.map<RewardsIndexEntity>((Map<String, dynamic> e) =>
  718. RewardsIndexEntity.fromJson(e)).toList() as M;
  719. }
  720. if (<RewardsIndexContinuous>[] is M) {
  721. return data.map<RewardsIndexContinuous>((Map<String, dynamic> e) =>
  722. RewardsIndexContinuous.fromJson(e)).toList() as M;
  723. }
  724. if (<RewardsIndexTasks>[] is M) {
  725. return data.map<RewardsIndexTasks>((Map<String, dynamic> e) =>
  726. RewardsIndexTasks.fromJson(e)).toList() as M;
  727. }
  728. if (<RewardsListEntity>[] is M) {
  729. return data.map<RewardsListEntity>((Map<String, dynamic> e) =>
  730. RewardsListEntity.fromJson(e)).toList() as M;
  731. }
  732. if (<RewardsListList>[] is M) {
  733. return data.map<RewardsListList>((Map<String, dynamic> e) =>
  734. RewardsListList.fromJson(e)).toList() as M;
  735. }
  736. if (<RewardsMyDetailEntity>[] is M) {
  737. return data.map<RewardsMyDetailEntity>((Map<String, dynamic> e) =>
  738. RewardsMyDetailEntity.fromJson(e)).toList() as M;
  739. }
  740. if (<RewardsMyDetailAccount>[] is M) {
  741. return data.map<RewardsMyDetailAccount>((Map<String, dynamic> e) =>
  742. RewardsMyDetailAccount.fromJson(e)).toList() as M;
  743. }
  744. if (<RewardsMyDetailReward>[] is M) {
  745. return data.map<RewardsMyDetailReward>((Map<String, dynamic> e) =>
  746. RewardsMyDetailReward.fromJson(e)).toList() as M;
  747. }
  748. if (<RewardsMyEntity>[] is M) {
  749. return data.map<RewardsMyEntity>((Map<String, dynamic> e) =>
  750. RewardsMyEntity.fromJson(e)).toList() as M;
  751. }
  752. if (<RewardsMyList>[] is M) {
  753. return data.map<RewardsMyList>((Map<String, dynamic> e) =>
  754. RewardsMyList.fromJson(e)).toList() as M;
  755. }
  756. if (<RewardsMyListReward>[] is M) {
  757. return data.map<RewardsMyListReward>((Map<String, dynamic> e) =>
  758. RewardsMyListReward.fromJson(e)).toList() as M;
  759. }
  760. if (<RewardsSearchEntity>[] is M) {
  761. return data.map<RewardsSearchEntity>((Map<String, dynamic> e) =>
  762. RewardsSearchEntity.fromJson(e)).toList() as M;
  763. }
  764. if (<RewardsSearchRewards>[] is M) {
  765. return data.map<RewardsSearchRewards>((Map<String, dynamic> e) =>
  766. RewardsSearchRewards.fromJson(e)).toList() as M;
  767. }
  768. if (<ServerTime>[] is M) {
  769. return data.map<ServerTime>((Map<String, dynamic> e) =>
  770. ServerTime.fromJson(e)).toList() as M;
  771. }
  772. if (<ServiceCategoryEntity>[] is M) {
  773. return data.map<ServiceCategoryEntity>((Map<String, dynamic> e) =>
  774. ServiceCategoryEntity.fromJson(e)).toList() as M;
  775. }
  776. if (<ServiceEvaluateListEntity>[] is M) {
  777. return data.map<ServiceEvaluateListEntity>((Map<String, dynamic> e) =>
  778. ServiceEvaluateListEntity.fromJson(e)).toList() as M;
  779. }
  780. if (<ServiceEvaluateListList>[] is M) {
  781. return data.map<ServiceEvaluateListList>((Map<String, dynamic> e) =>
  782. ServiceEvaluateListList.fromJson(e)).toList() as M;
  783. }
  784. if (<ServiceEvaluateListListAccount>[] is M) {
  785. return data.map<ServiceEvaluateListListAccount>((
  786. Map<String, dynamic> e) => ServiceEvaluateListListAccount.fromJson(e))
  787. .toList() as M;
  788. }
  789. if (<ServiceInProgressEntity>[] is M) {
  790. return data.map<ServiceInProgressEntity>((Map<String, dynamic> e) =>
  791. ServiceInProgressEntity.fromJson(e)).toList() as M;
  792. }
  793. if (<ServiceInProgressList>[] is M) {
  794. return data.map<ServiceInProgressList>((Map<String, dynamic> e) =>
  795. ServiceInProgressList.fromJson(e)).toList() as M;
  796. }
  797. if (<ServiceInProgressListService>[] is M) {
  798. return data.map<ServiceInProgressListService>((Map<String, dynamic> e) =>
  799. ServiceInProgressListService.fromJson(e)).toList() as M;
  800. }
  801. if (<ServiceInProgressListMerchant>[] is M) {
  802. return data.map<ServiceInProgressListMerchant>((Map<String, dynamic> e) =>
  803. ServiceInProgressListMerchant.fromJson(e)).toList() as M;
  804. }
  805. if (<ServiceOrderDetailEntity>[] is M) {
  806. return data.map<ServiceOrderDetailEntity>((Map<String, dynamic> e) =>
  807. ServiceOrderDetailEntity.fromJson(e)).toList() as M;
  808. }
  809. if (<ServiceOrderDetailAccount>[] is M) {
  810. return data.map<ServiceOrderDetailAccount>((Map<String, dynamic> e) =>
  811. ServiceOrderDetailAccount.fromJson(e)).toList() as M;
  812. }
  813. if (<ServiceOrderDetailOrderService>[] is M) {
  814. return data.map<ServiceOrderDetailOrderService>((
  815. Map<String, dynamic> e) => ServiceOrderDetailOrderService.fromJson(e))
  816. .toList() as M;
  817. }
  818. if (<ServiceOrderDetailMerchant>[] is M) {
  819. return data.map<ServiceOrderDetailMerchant>((Map<String, dynamic> e) =>
  820. ServiceOrderDetailMerchant.fromJson(e)).toList() as M;
  821. }
  822. if (<ServiceOrderDetailStaff>[] is M) {
  823. return data.map<ServiceOrderDetailStaff>((Map<String, dynamic> e) =>
  824. ServiceOrderDetailStaff.fromJson(e)).toList() as M;
  825. }
  826. if (<ServiceOrderDetailOrderProducts>[] is M) {
  827. return data.map<ServiceOrderDetailOrderProducts>((
  828. Map<String, dynamic> e) =>
  829. ServiceOrderDetailOrderProducts.fromJson(e)).toList() as M;
  830. }
  831. if (<ServiceOrderDetailEstate>[] is M) {
  832. return data.map<ServiceOrderDetailEstate>((Map<String, dynamic> e) =>
  833. ServiceOrderDetailEstate.fromJson(e)).toList() as M;
  834. }
  835. if (<ServiceOrderDetailEstateUnit>[] is M) {
  836. return data.map<ServiceOrderDetailEstateUnit>((Map<String, dynamic> e) =>
  837. ServiceOrderDetailEstateUnit.fromJson(e)).toList() as M;
  838. }
  839. if (<ServiceRepairDetailEntity>[] is M) {
  840. return data.map<ServiceRepairDetailEntity>((Map<String, dynamic> e) =>
  841. ServiceRepairDetailEntity.fromJson(e)).toList() as M;
  842. }
  843. if (<ServiceRepairDetailMerchant>[] is M) {
  844. return data.map<ServiceRepairDetailMerchant>((Map<String, dynamic> e) =>
  845. ServiceRepairDetailMerchant.fromJson(e)).toList() as M;
  846. }
  847. if (<ServiceRepairDetailCategory>[] is M) {
  848. return data.map<ServiceRepairDetailCategory>((Map<String, dynamic> e) =>
  849. ServiceRepairDetailCategory.fromJson(e)).toList() as M;
  850. }
  851. if (<ServiceTimePeriodEntity>[] is M) {
  852. return data.map<ServiceTimePeriodEntity>((Map<String, dynamic> e) =>
  853. ServiceTimePeriodEntity.fromJson(e)).toList() as M;
  854. }
  855. if (<TextKonEntity>[] is M) {
  856. return data.map<TextKonEntity>((Map<String, dynamic> e) =>
  857. TextKonEntity.fromJson(e)).toList() as M;
  858. }
  859. if (<UserMeEntity>[] is M) {
  860. return data.map<UserMeEntity>((Map<String, dynamic> e) =>
  861. UserMeEntity.fromJson(e)).toList() as M;
  862. }
  863. if (<UserMeHouseholds>[] is M) {
  864. return data.map<UserMeHouseholds>((Map<String, dynamic> e) =>
  865. UserMeHouseholds.fromJson(e)).toList() as M;
  866. }
  867. if (<UserMeEstates>[] is M) {
  868. return data.map<UserMeEstates>((Map<String, dynamic> e) =>
  869. UserMeEstates.fromJson(e)).toList() as M;
  870. }
  871. if (<UserMeEstatesAccounts>[] is M) {
  872. return data.map<UserMeEstatesAccounts>((Map<String, dynamic> e) =>
  873. UserMeEstatesAccounts.fromJson(e)).toList() as M;
  874. }
  875. if (<UserMeEstatesAccountsUnit>[] is M) {
  876. return data.map<UserMeEstatesAccountsUnit>((Map<String, dynamic> e) =>
  877. UserMeEstatesAccountsUnit.fromJson(e)).toList() as M;
  878. }
  879. if (<UserMeDefaultUnit>[] is M) {
  880. return data.map<UserMeDefaultUnit>((Map<String, dynamic> e) =>
  881. UserMeDefaultUnit.fromJson(e)).toList() as M;
  882. }
  883. if (<UserMeInformation>[] is M) {
  884. return data.map<UserMeInformation>((Map<String, dynamic> e) =>
  885. UserMeInformation.fromJson(e)).toList() as M;
  886. }
  887. if (<VisitorPageEntity>[] is M) {
  888. return data.map<VisitorPageEntity>((Map<String, dynamic> e) =>
  889. VisitorPageEntity.fromJson(e)).toList() as M;
  890. }
  891. if (<VisitorPageList>[] is M) {
  892. return data.map<VisitorPageList>((Map<String, dynamic> e) =>
  893. VisitorPageList.fromJson(e)).toList() as M;
  894. }
  895. debugPrint("$M not found");
  896. return null;
  897. }
  898. static M? fromJsonAsT<M>(dynamic json) {
  899. if (json is M) {
  900. return json;
  901. }
  902. if (json is List) {
  903. return _getListChildType<M>(
  904. json.map((dynamic e) => e as Map<String, dynamic>).toList());
  905. } else {
  906. return jsonConvert.convert<M>(json);
  907. }
  908. }
  909. }
  910. class JsonConvertClassCollection {
  911. Map<String, JsonConvertFunction> convertFuncMap = {
  912. (AuthLoginEntity).toString(): AuthLoginEntity.fromJson,
  913. (CaptchaImgEntity).toString(): CaptchaImgEntity.fromJson,
  914. (CommPaymentDetailEntity).toString(): CommPaymentDetailEntity.fromJson,
  915. (CommPaymentDetailOrderable).toString(): CommPaymentDetailOrderable.fromJson,
  916. (FacilityBookEntity).toString(): FacilityBookEntity.fromJson,
  917. (FacilityBookFacilityType).toString(): FacilityBookFacilityType.fromJson,
  918. (FacilityBookFacilities).toString(): FacilityBookFacilities.fromJson,
  919. (FacilityBookFacilitiesPeriods).toString(): FacilityBookFacilitiesPeriods
  920. .fromJson,
  921. (FacilityIndexEntity).toString(): FacilityIndexEntity.fromJson,
  922. (FacilityPageEntity).toString(): FacilityPageEntity.fromJson,
  923. (FacilityDetail).toString(): FacilityDetail.fromJson,
  924. (FacilityPageListBooking).toString(): FacilityPageListBooking.fromJson,
  925. (FacilityPageListFacility).toString(): FacilityPageListFacility.fromJson,
  926. (FacilityPageListTimePeriod).toString(): FacilityPageListTimePeriod
  927. .fromJson,
  928. (FacilityOrder).toString(): FacilityOrder.fromJson,
  929. (FeedbackDetailEntity).toString(): FeedbackDetailEntity.fromJson,
  930. (FeedbackDetailReplies).toString(): FeedbackDetailReplies.fromJson,
  931. (FeedbackListEntity).toString(): FeedbackListEntity.fromJson,
  932. (FeedbackItemEntity).toString(): FeedbackItemEntity.fromJson,
  933. (FormContentEntity).toString(): FormContentEntity.fromJson,
  934. (FormDetailEntity).toString(): FormDetailEntity.fromJson,
  935. (FormOrder).toString(): FormOrder.fromJson,
  936. (FormListEntity).toString(): FormListEntity.fromJson,
  937. (FormOptionEntity).toString(): FormOptionEntity.fromJson,
  938. (FormOrderEntity).toString(): FormOrderEntity.fromJson,
  939. (FormOrderOrder).toString(): FormOrderOrder.fromJson,
  940. (FormSubmittedEntity).toString(): FormSubmittedEntity.fromJson,
  941. (FormSubmittedEstateOnlineForm).toString(): FormSubmittedEstateOnlineForm
  942. .fromJson,
  943. (FormSubmittedOrder).toString(): FormSubmittedOrder.fromJson,
  944. (FormSubmittedPageEntity).toString(): FormSubmittedPageEntity.fromJson,
  945. (GarageSaleHistoryEntity).toString(): GarageSaleHistoryEntity.fromJson,
  946. (GarageSaleHistoryList).toString(): GarageSaleHistoryList.fromJson,
  947. (GarageSaleHistoryListOrderProducts)
  948. .toString(): GarageSaleHistoryListOrderProducts.fromJson,
  949. (GarageSaleRentDetailEntity).toString(): GarageSaleRentDetailEntity
  950. .fromJson,
  951. (GarageSaleRentDetailAccount).toString(): GarageSaleRentDetailAccount
  952. .fromJson,
  953. (GarageSaleRentEntity).toString(): GarageSaleRentEntity.fromJson,
  954. (GarageSaleRentList).toString(): GarageSaleRentList.fromJson,
  955. (GarageSaleRentListAccount).toString(): GarageSaleRentListAccount.fromJson,
  956. (HomeListEntity).toString(): HomeListEntity.fromJson,
  957. (HomeListBanners).toString(): HomeListBanners.fromJson,
  958. (HomeListLatestTransactions).toString(): HomeListLatestTransactions
  959. .fromJson,
  960. (HomeListPropertyNews).toString(): HomeListPropertyNews.fromJson,
  961. (IdNameEntity).toString(): IdNameEntity.fromJson,
  962. (LatestNewsDetailEntity).toString(): LatestNewsDetailEntity.fromJson,
  963. (LatestNewsPageEntity).toString(): LatestNewsPageEntity.fromJson,
  964. (LatestNewsList).toString(): LatestNewsList.fromJson,
  965. (MyfollowingListEntity).toString(): MyfollowingListEntity.fromJson,
  966. (MypostsNewsfeedEntity).toString(): MypostsNewsfeedEntity.fromJson,
  967. (MypostsNewsfeedList).toString(): MypostsNewsfeedList.fromJson,
  968. (MypostsNewsfeedListAccount).toString(): MypostsNewsfeedListAccount
  969. .fromJson,
  970. (MypostsSaleRentEntity).toString(): MypostsSaleRentEntity.fromJson,
  971. (MypostsSaleRentList).toString(): MypostsSaleRentList.fromJson,
  972. (NewsfeedCommentPublishEntity).toString(): NewsfeedCommentPublishEntity
  973. .fromJson,
  974. (NewsfeedDetailEntity).toString(): NewsfeedDetailEntity.fromJson,
  975. (NewsfeedDetailAccount).toString(): NewsfeedDetailAccount.fromJson,
  976. (NewsfeedDetailComments).toString(): NewsfeedDetailComments.fromJson,
  977. (NewsfeedDetailCommentsAccount).toString(): NewsfeedDetailCommentsAccount
  978. .fromJson,
  979. (NewsfeedDetailCommentsToAccount)
  980. .toString(): NewsfeedDetailCommentsToAccount.fromJson,
  981. (NewsfeedFollowingEntity).toString(): NewsfeedFollowingEntity.fromJson,
  982. (NewsfeedFollowingList).toString(): NewsfeedFollowingList.fromJson,
  983. (NewsfeedFollowingListAccount).toString(): NewsfeedFollowingListAccount
  984. .fromJson,
  985. (NewsfeedForyouEntity).toString(): NewsfeedForyouEntity.fromJson,
  986. (NewsfeedForyouList).toString(): NewsfeedForyouList.fromJson,
  987. (NewsfeedForyouListAccount).toString(): NewsfeedForyouListAccount.fromJson,
  988. (NewsfeedNewsEntity).toString(): NewsfeedNewsEntity.fromJson,
  989. (NewsfeedNewsList).toString(): NewsfeedNewsList.fromJson,
  990. (NewsfeedNewsListAccount).toString(): NewsfeedNewsListAccount.fromJson,
  991. (NoticeBoardAnnounDetailEntity).toString(): NoticeBoardAnnounDetailEntity
  992. .fromJson,
  993. (NoticeBoardAnnounEntity).toString(): NoticeBoardAnnounEntity.fromJson,
  994. (NoticeBoardAnnounList).toString(): NoticeBoardAnnounList.fromJson,
  995. (NoticeBoardDocumentsEntity).toString(): NoticeBoardDocumentsEntity
  996. .fromJson,
  997. (NoticeBoardDocumentsList).toString(): NoticeBoardDocumentsList.fromJson,
  998. (NoticeBoardEventDetailEntity).toString(): NoticeBoardEventDetailEntity
  999. .fromJson,
  1000. (NoticeBoardEventEntity).toString(): NoticeBoardEventEntity.fromJson,
  1001. (NoticeBoardEventList).toString(): NoticeBoardEventList.fromJson,
  1002. (PaidServiceDetailEntity).toString(): PaidServiceDetailEntity.fromJson,
  1003. (PaidServiceDetailMerchant).toString(): PaidServiceDetailMerchant.fromJson,
  1004. (PaidServiceDetailCategory).toString(): PaidServiceDetailCategory.fromJson,
  1005. (PaidServiceDetailProducts).toString(): PaidServiceDetailProducts.fromJson,
  1006. (PaidServiceDetailEvaluations).toString(): PaidServiceDetailEvaluations
  1007. .fromJson,
  1008. (PaidServiceDetailEvaluationsAccount)
  1009. .toString(): PaidServiceDetailEvaluationsAccount.fromJson,
  1010. (PaidServiceEntity).toString(): PaidServiceEntity.fromJson,
  1011. (PaidServiceList).toString(): PaidServiceList.fromJson,
  1012. (PaidServiceListMerchant).toString(): PaidServiceListMerchant.fromJson,
  1013. (PaidServiceListCategory).toString(): PaidServiceListCategory.fromJson,
  1014. (PaidServicePaySuccessInfoEntity)
  1015. .toString(): PaidServicePaySuccessInfoEntity.fromJson,
  1016. (PaidServicePaySuccessInfoAccount)
  1017. .toString(): PaidServicePaySuccessInfoAccount.fromJson,
  1018. (PaidServicePaySuccessInfoOrderService)
  1019. .toString(): PaidServicePaySuccessInfoOrderService.fromJson,
  1020. (PaidServicePaySuccessInfoMerchant)
  1021. .toString(): PaidServicePaySuccessInfoMerchant.fromJson,
  1022. (PaidServicePaySuccessInfoStaff).toString(): PaidServicePaySuccessInfoStaff
  1023. .fromJson,
  1024. (PaidServicePaySuccessInfoOrderProducts)
  1025. .toString(): PaidServicePaySuccessInfoOrderProducts.fromJson,
  1026. (PaidServicePaySuccessInfoEstate)
  1027. .toString(): PaidServicePaySuccessInfoEstate.fromJson,
  1028. (PaidServicePaySuccessInfoEstateUnit)
  1029. .toString(): PaidServicePaySuccessInfoEstateUnit.fromJson,
  1030. (PaidServicePaySuccessInfoOrder).toString(): PaidServicePaySuccessInfoOrder
  1031. .fromJson,
  1032. (PaymentIntentEntity).toString(): PaymentIntentEntity.fromJson,
  1033. (PaymentPageEntity).toString(): PaymentPageEntity.fromJson,
  1034. (PaymentPageList).toString(): PaymentPageList.fromJson,
  1035. (OrderableEntity).toString(): OrderableEntity.fromJson,
  1036. (PropertyNewsDetailEntity).toString(): PropertyNewsDetailEntity.fromJson,
  1037. (PropertyNewsEntity).toString(): PropertyNewsEntity.fromJson,
  1038. (PropertyNewsList).toString(): PropertyNewsList.fromJson,
  1039. (PropertySaleRentEntity).toString(): PropertySaleRentEntity.fromJson,
  1040. (PropertySaleRentList).toString(): PropertySaleRentList.fromJson,
  1041. (RepairServiceEntity).toString(): RepairServiceEntity.fromJson,
  1042. (RepairServiceList).toString(): RepairServiceList.fromJson,
  1043. (RepairServiceListMerchant).toString(): RepairServiceListMerchant.fromJson,
  1044. (RepairServiceListCategory).toString(): RepairServiceListCategory.fromJson,
  1045. (RewardsActiveDetailEntity).toString(): RewardsActiveDetailEntity.fromJson,
  1046. (RewardsActiveDetailData).toString(): RewardsActiveDetailData.fromJson,
  1047. (RewardsActiveDetailDataAccount).toString(): RewardsActiveDetailDataAccount
  1048. .fromJson,
  1049. (RewardsActiveDetailDataReward).toString(): RewardsActiveDetailDataReward
  1050. .fromJson,
  1051. (RewardsBuyEntity).toString(): RewardsBuyEntity.fromJson,
  1052. (RewardsBuyReward).toString(): RewardsBuyReward.fromJson,
  1053. (RewardsBuyRewardRedeemable).toString(): RewardsBuyRewardRedeemable
  1054. .fromJson,
  1055. (RewardsCategoryEntity).toString(): RewardsCategoryEntity.fromJson,
  1056. (RewardsDetailEntity).toString(): RewardsDetailEntity.fromJson,
  1057. (RewardsDetailRedeemable).toString(): RewardsDetailRedeemable.fromJson,
  1058. (RewardsHistoryEarnedEntity).toString(): RewardsHistoryEarnedEntity
  1059. .fromJson,
  1060. (RewardsHistoryEarnedList).toString(): RewardsHistoryEarnedList.fromJson,
  1061. (RewardsHomeEntity).toString(): RewardsHomeEntity.fromJson,
  1062. (RewardsHomeData).toString(): RewardsHomeData.fromJson,
  1063. (RewardsHomeDataRewards).toString(): RewardsHomeDataRewards.fromJson,
  1064. (RewardsHomeTesEntity).toString(): RewardsHomeTesEntity.fromJson,
  1065. (RewardsHomeTesRewards).toString(): RewardsHomeTesRewards.fromJson,
  1066. (RewardsHomeTestEntity).toString(): RewardsHomeTestEntity.fromJson,
  1067. (RewardsHomeTxEntity).toString(): RewardsHomeTxEntity.fromJson,
  1068. (RewardsIndexEntity).toString(): RewardsIndexEntity.fromJson,
  1069. (RewardsIndexContinuous).toString(): RewardsIndexContinuous.fromJson,
  1070. (RewardsIndexTasks).toString(): RewardsIndexTasks.fromJson,
  1071. (RewardsListEntity).toString(): RewardsListEntity.fromJson,
  1072. (RewardsListList).toString(): RewardsListList.fromJson,
  1073. (RewardsMyDetailEntity).toString(): RewardsMyDetailEntity.fromJson,
  1074. (RewardsMyDetailAccount).toString(): RewardsMyDetailAccount.fromJson,
  1075. (RewardsMyDetailReward).toString(): RewardsMyDetailReward.fromJson,
  1076. (RewardsMyEntity).toString(): RewardsMyEntity.fromJson,
  1077. (RewardsMyList).toString(): RewardsMyList.fromJson,
  1078. (RewardsMyListReward).toString(): RewardsMyListReward.fromJson,
  1079. (RewardsSearchEntity).toString(): RewardsSearchEntity.fromJson,
  1080. (RewardsSearchRewards).toString(): RewardsSearchRewards.fromJson,
  1081. (ServerTime).toString(): ServerTime.fromJson,
  1082. (ServiceCategoryEntity).toString(): ServiceCategoryEntity.fromJson,
  1083. (ServiceEvaluateListEntity).toString(): ServiceEvaluateListEntity.fromJson,
  1084. (ServiceEvaluateListList).toString(): ServiceEvaluateListList.fromJson,
  1085. (ServiceEvaluateListListAccount).toString(): ServiceEvaluateListListAccount
  1086. .fromJson,
  1087. (ServiceInProgressEntity).toString(): ServiceInProgressEntity.fromJson,
  1088. (ServiceInProgressList).toString(): ServiceInProgressList.fromJson,
  1089. (ServiceInProgressListService).toString(): ServiceInProgressListService
  1090. .fromJson,
  1091. (ServiceInProgressListMerchant).toString(): ServiceInProgressListMerchant
  1092. .fromJson,
  1093. (ServiceOrderDetailEntity).toString(): ServiceOrderDetailEntity.fromJson,
  1094. (ServiceOrderDetailAccount).toString(): ServiceOrderDetailAccount.fromJson,
  1095. (ServiceOrderDetailOrderService).toString(): ServiceOrderDetailOrderService
  1096. .fromJson,
  1097. (ServiceOrderDetailMerchant).toString(): ServiceOrderDetailMerchant
  1098. .fromJson,
  1099. (ServiceOrderDetailStaff).toString(): ServiceOrderDetailStaff.fromJson,
  1100. (ServiceOrderDetailOrderProducts)
  1101. .toString(): ServiceOrderDetailOrderProducts.fromJson,
  1102. (ServiceOrderDetailEstate).toString(): ServiceOrderDetailEstate.fromJson,
  1103. (ServiceOrderDetailEstateUnit).toString(): ServiceOrderDetailEstateUnit
  1104. .fromJson,
  1105. (ServiceRepairDetailEntity).toString(): ServiceRepairDetailEntity.fromJson,
  1106. (ServiceRepairDetailMerchant).toString(): ServiceRepairDetailMerchant
  1107. .fromJson,
  1108. (ServiceRepairDetailCategory).toString(): ServiceRepairDetailCategory
  1109. .fromJson,
  1110. (ServiceTimePeriodEntity).toString(): ServiceTimePeriodEntity.fromJson,
  1111. (TextKonEntity).toString(): TextKonEntity.fromJson,
  1112. (UserMeEntity).toString(): UserMeEntity.fromJson,
  1113. (UserMeHouseholds).toString(): UserMeHouseholds.fromJson,
  1114. (UserMeEstates).toString(): UserMeEstates.fromJson,
  1115. (UserMeEstatesAccounts).toString(): UserMeEstatesAccounts.fromJson,
  1116. (UserMeEstatesAccountsUnit).toString(): UserMeEstatesAccountsUnit.fromJson,
  1117. (UserMeDefaultUnit).toString(): UserMeDefaultUnit.fromJson,
  1118. (UserMeInformation).toString(): UserMeInformation.fromJson,
  1119. (VisitorPageEntity).toString(): VisitorPageEntity.fromJson,
  1120. (VisitorPageList).toString(): VisitorPageList.fromJson,
  1121. };
  1122. bool containsKey(String type) {
  1123. return convertFuncMap.containsKey(type);
  1124. }
  1125. JsonConvertFunction? operator [](String key) {
  1126. return convertFuncMap[key];
  1127. }
  1128. }