json_convert_content.dart 50 KB

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