Files
amap_location_fluttify/lib/src/ios/AMapLocationPolygonRegion.g.dart
2024-11-17 15:42:58 +08:00

129 lines
5.2 KiB
Dart

// 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_location_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 AMapLocationPolygonRegion extends AMapLocationRegion with NSCopying {
//region constants
static const String name__ = 'AMapLocationPolygonRegion';
@override
final String tag__ = 'amap_location_fluttify';
//endregion
//region creators
static Future<AMapLocationPolygonRegion> create__({ bool init = true /* ios only */ }) async {
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
'ObjectFactory::createAMapLocationPolygonRegion',
{'init': init}
);
return AmapLocationFluttifyIOSAs<AMapLocationPolygonRegion>(__result__)!;
}
static Future<List<AMapLocationPolygonRegion>> create_batch__(int length, { bool init = true /* ios only */ }) async {
assert(true);
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
'ObjectFactory::create_batchAMapLocationPolygonRegion',
{'length': length, 'init': init}
);
return __result_batch__
?.map((it) => AmapLocationFluttifyIOSAs<AMapLocationPolygonRegion>(it))
.where((element) => element !=null)
.cast<AMapLocationPolygonRegion>()
.toList() ?? <AMapLocationPolygonRegion>[];
}
//endregion
//region getters
Future<List<CLLocationCoordinate2D>?> get_coordinates() async {
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPolygonRegion::get_coordinates", {'__this__': this});
return (__result__ as List?)?.map((it) => AmapLocationFluttifyIOSAs<CLLocationCoordinate2D>(it)).where((e) => e != null).cast<CLLocationCoordinate2D>().toList();
}
Future<int?> get_count() async {
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPolygonRegion::get_count", {'__this__': this});
return __result__;
}
//endregion
//region setters
//endregion
//region methods
Future<AMapLocationPolygonRegion?> initWithCoordinates_count_identifier(List<CLLocationCoordinate2D> coordinates, int count, String identifier) async {
// print log
if (fluttifyLogEnabled) {
debugPrint('fluttify-dart: AMapLocationPolygonRegion@$refId::initWithCoordinates([\'count\':$count, \'identifier\':$identifier])');
}
// invoke native method
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPolygonRegion::initWithCoordinates_count_identifier', {"coordinates": coordinates, "count": count, "identifier": identifier, "__this__": this});
// handle native call
return AmapLocationFluttifyIOSAs<AMapLocationPolygonRegion>(__result__);
}
//endregion
@override
String toString() {
return 'AMapLocationPolygonRegion{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
}
}
extension AMapLocationPolygonRegion_Batch on List<AMapLocationPolygonRegion?> {
String? get refId {
if (isEmpty) return null;
return first?.refId;
}
//region getters
Future<List<List<CLLocationCoordinate2D>?>> get_coordinates_batch() async {
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPolygonRegion::get_coordinates_batch", [for (final __item__ in this) {'__this__': __item__}]);
return (resultBatch as List).map((__result__) => (__result__ as List?)?.map((it) => AmapLocationFluttifyIOSAs<CLLocationCoordinate2D>(it)).where((e) => e != null).cast<CLLocationCoordinate2D>().toList()).cast<List<CLLocationCoordinate2D>?>().toList();
}
Future<List<int?>> get_count_batch() async {
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPolygonRegion::get_count_batch", [for (final __item__ in this) {'__this__': __item__}]);
return (resultBatch as List).map((__result__) => __result__).cast<int?>().toList();
}
//endregion
//region setters
//endregion
//region methods
Future<List<AMapLocationPolygonRegion?>> initWithCoordinates_count_identifier_batch(List<List<CLLocationCoordinate2D>> coordinates, List<int> count, List<String> identifier) async {
assert(coordinates.length == count.length && count.length == identifier.length);
// invoke native method
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPolygonRegion::initWithCoordinates_count_identifier_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"coordinates": coordinates[__i__], "count": count[__i__], "identifier": identifier[__i__], "__this__": this[__i__]}]);
return (resultBatch as List).map((__result__) => AmapLocationFluttifyIOSAs<AMapLocationPolygonRegion>(__result__)).cast<AMapLocationPolygonRegion?>().toList();
}
//endregion
}