json_convert_content.dart 51 KB

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