// ignore_for_file: non_constant_identifier_names, camel_case_types, missing_return, unused_import, unused_local_variable, dead_code, unnecessary_cast ////////////////////////////////////////////////////////// // GENERATED BY FLUTTIFY. DO NOT EDIT IT. ////////////////////////////////////////////////////////// import 'dart:typed_data'; import 'package:amap_search_fluttify/src/ios/ios.export.g.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:foundation_fluttify/foundation_fluttify.dart'; import 'package:core_location_fluttify/core_location_fluttify.dart'; import 'package:amap_core_fluttify/amap_core_fluttify.dart'; class AMapRoutePOISearchRequest extends AMapSearchObject with NSCoding, NSCopying { //region constants static const String name__ = 'AMapRoutePOISearchRequest'; @override final String tag__ = 'amap_search_fluttify'; //endregion //region creators static Future create__({ bool init = true /* ios only */ }) async { final __result__ = await kAmapSearchFluttifyChannel.invokeMethod( 'ObjectFactory::createAMapRoutePOISearchRequest', {'init': init} ); return AmapSearchFluttifyIOSAs(__result__)!; } static Future> create_batch__(int length, { bool init = true /* ios only */ }) async { assert(true); final __result_batch__ = await kAmapSearchFluttifyChannel.invokeListMethod( 'ObjectFactory::create_batchAMapRoutePOISearchRequest', {'length': length, 'init': init} ); return __result_batch__ ?.map((it) => AmapSearchFluttifyIOSAs(it)) .where((element) => element !=null) .cast() .toList() ?? []; } //endregion //region getters Future get_origin() async { final __result__ = await kAmapSearchFluttifyChannel.invokeMethod("AMapRoutePOISearchRequest::get_origin", {'__this__': this}); return AmapSearchFluttifyIOSAs(__result__); } Future get_destination() async { final __result__ = await kAmapSearchFluttifyChannel.invokeMethod("AMapRoutePOISearchRequest::get_destination", {'__this__': this}); return AmapSearchFluttifyIOSAs(__result__); } Future get_searchType() async { final __result__ = await kAmapSearchFluttifyChannel.invokeMethod("AMapRoutePOISearchRequest::get_searchType", {'__this__': this}); return (__result__ as int).toAMapRoutePOISearchType(); } Future get_strategy() async { final __result__ = await kAmapSearchFluttifyChannel.invokeMethod("AMapRoutePOISearchRequest::get_strategy", {'__this__': this}); return __result__; } Future get_range() async { final __result__ = await kAmapSearchFluttifyChannel.invokeMethod("AMapRoutePOISearchRequest::get_range", {'__this__': this}); return __result__; } Future get_polylineStr() async { final __result__ = await kAmapSearchFluttifyChannel.invokeMethod("AMapRoutePOISearchRequest::get_polylineStr", {'__this__': this}); return __result__; } Future?> get_polyline() async { final __result__ = await kAmapSearchFluttifyChannel.invokeMethod("AMapRoutePOISearchRequest::get_polyline", {'__this__': this}); return (__result__ as List?)?.map((it) => AmapSearchFluttifyIOSAs(it)).where((e) => e != null).cast().toList(); } //endregion //region setters Future set_origin(AMapGeoPoint origin) async { await kAmapSearchFluttifyChannel.invokeMethod('AMapRoutePOISearchRequest::set_origin', {'__this__': this, "origin": origin}); } Future set_destination(AMapGeoPoint destination) async { await kAmapSearchFluttifyChannel.invokeMethod('AMapRoutePOISearchRequest::set_destination', {'__this__': this, "destination": destination}); } Future set_searchType(AMapRoutePOISearchType searchType) async { await kAmapSearchFluttifyChannel.invokeMethod('AMapRoutePOISearchRequest::set_searchType', {'__this__': this, "searchType": searchType.toValue()}); } Future set_strategy(int strategy) async { await kAmapSearchFluttifyChannel.invokeMethod('AMapRoutePOISearchRequest::set_strategy', {'__this__': this, "strategy": strategy}); } Future set_range(int range) async { await kAmapSearchFluttifyChannel.invokeMethod('AMapRoutePOISearchRequest::set_range', {'__this__': this, "range": range}); } Future set_polylineStr(String polylineStr) async { await kAmapSearchFluttifyChannel.invokeMethod('AMapRoutePOISearchRequest::set_polylineStr', {'__this__': this, "polylineStr": polylineStr}); } Future set_polyline(List polyline) async { await kAmapSearchFluttifyChannel.invokeMethod('AMapRoutePOISearchRequest::set_polyline', {'__this__': this, "polyline": polyline}); } //endregion //region methods //endregion @override String toString() { return 'AMapRoutePOISearchRequest{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}'; } } extension AMapRoutePOISearchRequest_Batch on List { String? get refId { if (isEmpty) return null; return first?.refId; } //region getters Future> get_origin_batch() async { final resultBatch = await kAmapSearchFluttifyChannel.invokeMethod("AMapRoutePOISearchRequest::get_origin_batch", [for (final __item__ in this) {'__this__': __item__}]); return (resultBatch as List).map((__result__) => AmapSearchFluttifyIOSAs(__result__)).cast().toList(); } Future> get_destination_batch() async { final resultBatch = await kAmapSearchFluttifyChannel.invokeMethod("AMapRoutePOISearchRequest::get_destination_batch", [for (final __item__ in this) {'__this__': __item__}]); return (resultBatch as List).map((__result__) => AmapSearchFluttifyIOSAs(__result__)).cast().toList(); } Future> get_searchType_batch() async { final resultBatch = await kAmapSearchFluttifyChannel.invokeMethod("AMapRoutePOISearchRequest::get_searchType_batch", [for (final __item__ in this) {'__this__': __item__}]); return (resultBatch as List).map((__result__) => (__result__ as int).toAMapRoutePOISearchType()).cast().toList(); } Future> get_strategy_batch() async { final resultBatch = await kAmapSearchFluttifyChannel.invokeMethod("AMapRoutePOISearchRequest::get_strategy_batch", [for (final __item__ in this) {'__this__': __item__}]); return (resultBatch as List).map((__result__) => __result__).cast().toList(); } Future> get_range_batch() async { final resultBatch = await kAmapSearchFluttifyChannel.invokeMethod("AMapRoutePOISearchRequest::get_range_batch", [for (final __item__ in this) {'__this__': __item__}]); return (resultBatch as List).map((__result__) => __result__).cast().toList(); } Future> get_polylineStr_batch() async { final resultBatch = await kAmapSearchFluttifyChannel.invokeMethod("AMapRoutePOISearchRequest::get_polylineStr_batch", [for (final __item__ in this) {'__this__': __item__}]); return (resultBatch as List).map((__result__) => __result__).cast().toList(); } Future?>> get_polyline_batch() async { final resultBatch = await kAmapSearchFluttifyChannel.invokeMethod("AMapRoutePOISearchRequest::get_polyline_batch", [for (final __item__ in this) {'__this__': __item__}]); return (resultBatch as List).map((__result__) => (__result__ as List?)?.map((it) => AmapSearchFluttifyIOSAs(it)).where((e) => e != null).cast().toList()).cast?>().toList(); } //endregion //region setters Future set_origin_batch(List origin) async { await kAmapSearchFluttifyChannel.invokeMethod('AMapRoutePOISearchRequest::set_origin_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "origin": origin[__i__]}]); } Future set_destination_batch(List destination) async { await kAmapSearchFluttifyChannel.invokeMethod('AMapRoutePOISearchRequest::set_destination_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "destination": destination[__i__]}]); } Future set_searchType_batch(List searchType) async { await kAmapSearchFluttifyChannel.invokeMethod('AMapRoutePOISearchRequest::set_searchType_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "searchType": searchType[__i__].toValue()}]); } Future set_strategy_batch(List strategy) async { await kAmapSearchFluttifyChannel.invokeMethod('AMapRoutePOISearchRequest::set_strategy_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "strategy": strategy[__i__]}]); } Future set_range_batch(List range) async { await kAmapSearchFluttifyChannel.invokeMethod('AMapRoutePOISearchRequest::set_range_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "range": range[__i__]}]); } Future set_polylineStr_batch(List polylineStr) async { await kAmapSearchFluttifyChannel.invokeMethod('AMapRoutePOISearchRequest::set_polylineStr_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "polylineStr": polylineStr[__i__]}]); } Future set_polyline_batch(List> polyline) async { await kAmapSearchFluttifyChannel.invokeMethod('AMapRoutePOISearchRequest::set_polyline_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "polyline": polyline[__i__]}]); } //endregion //region methods //endregion }