amap_location_fluttify
This commit is contained in:
23
lib/src/android/android.export.g.dart
Normal file
23
lib/src/android/android.export.g.dart
Normal file
@ -0,0 +1,23 @@
|
||||
export 'type_op.g.dart';
|
||||
export 'constants.g.dart';
|
||||
export 'com/amap/api/location/AMapLocationClientOption/AMapLocationProtocol.g.dart';
|
||||
export 'com/amap/api/location/AMapLocationClientOption/AMapLocationPurpose.g.dart';
|
||||
export 'com/amap/api/location/AMapLocationClientOption/GeoLanguage.g.dart';
|
||||
export 'com/amap/api/location/AMapLocationClientOption/AMapLocationMode.g.dart';
|
||||
export 'com/amap/api/location/CoordUtil.g.dart';
|
||||
export 'com/amap/api/location/APSService.g.dart';
|
||||
export 'com/amap/api/location/UmidtokenInfo.g.dart';
|
||||
export 'com/amap/api/location/AMapLocationClientOption.g.dart';
|
||||
export 'com/amap/api/location/CoordinateConverter.g.dart';
|
||||
export 'com/amap/api/location/CoordinateConverter/CoordType.g.dart';
|
||||
export 'com/amap/api/location/AMapLocation.g.dart';
|
||||
export 'com/amap/api/location/AMapLocationListener.g.dart';
|
||||
export 'com/amap/api/location/AMapLocationQualityReport.g.dart';
|
||||
export 'com/amap/api/location/AMapLocationClient.g.dart';
|
||||
export 'com/amap/api/location/DPoint.g.dart';
|
||||
export 'com/amap/api/fence/DistrictItem.g.dart';
|
||||
export 'com/amap/api/fence/PoiItem.g.dart';
|
||||
export 'com/amap/api/fence/GeoFenceClient.g.dart';
|
||||
export 'com/amap/api/fence/GeoFenceListener.g.dart';
|
||||
export 'com/amap/api/fence/GeoFence.g.dart';
|
||||
export '../facade/shared.g.dart';
|
307
lib/src/android/com/amap/api/fence/DistrictItem.g.dart
Normal file
307
lib/src/android/com/amap/api/fence/DistrictItem.g.dart
Normal file
@ -0,0 +1,307 @@
|
||||
// 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/android/android.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 com_amap_api_fence_DistrictItem extends java_lang_Object with android_os_Parcelable {
|
||||
//region constants
|
||||
static const String name__ = 'com.amap.api.fence.DistrictItem';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<com_amap_api_fence_DistrictItem> create__() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createcom_amap_api_fence_DistrictItem__',
|
||||
|
||||
);
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_fence_DistrictItem>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<com_amap_api_fence_DistrictItem>> create_batch__(int length) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchcom_amap_api_fence_DistrictItem__',
|
||||
{'length': length}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_fence_DistrictItem>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<com_amap_api_fence_DistrictItem>()
|
||||
.toList() ?? <com_amap_api_fence_DistrictItem>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<String?> getCitycode() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.DistrictItem@$refId::getCitycode([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::getCitycode', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setCitycode(String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.DistrictItem@$refId::setCitycode([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::setCitycode', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<String?> getAdcode() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.DistrictItem@$refId::getAdcode([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::getAdcode', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setAdcode(String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.DistrictItem@$refId::setAdcode([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::setAdcode', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<List<com_amap_api_location_DPoint>?> getPolyline() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.DistrictItem@$refId::getPolyline([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::getPolyline', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return (__result__ as List?)?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_location_DPoint>(it)).where((e) => e != null).cast<com_amap_api_location_DPoint>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<void> setPolyline(List<com_amap_api_location_DPoint> var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.DistrictItem@$refId::setPolyline([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::setPolyline', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<String?> getDistrictName() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.DistrictItem@$refId::getDistrictName([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::getDistrictName', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setDistrictName(String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.DistrictItem@$refId::setDistrictName([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::setDistrictName', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'com_amap_api_fence_DistrictItem{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_fence_DistrictItem_Batch on List<com_amap_api_fence_DistrictItem?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<List<String?>> getCitycode_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::getCitycode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setCitycode_batch(List<String> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::setCitycode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<String?>> getAdcode_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::getAdcode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setAdcode_batch(List<String> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::setAdcode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<List<com_amap_api_location_DPoint>?>> getPolyline_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::getPolyline_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => (__result__ as List?)?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_location_DPoint>(it)).where((e) => e != null).cast<com_amap_api_location_DPoint>().toList()).cast<List<com_amap_api_location_DPoint>?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setPolyline_batch(List<List<com_amap_api_location_DPoint>> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::setPolyline_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<String?>> getDistrictName_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::getDistrictName_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setDistrictName_batch(List<String> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.DistrictItem::setDistrictName_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
1084
lib/src/android/com/amap/api/fence/GeoFence.g.dart
Normal file
1084
lib/src/android/com/amap/api/fence/GeoFence.g.dart
Normal file
File diff suppressed because it is too large
Load Diff
494
lib/src/android/com/amap/api/fence/GeoFenceClient.g.dart
Normal file
494
lib/src/android/com/amap/api/fence/GeoFenceClient.g.dart
Normal file
@ -0,0 +1,494 @@
|
||||
// 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/android/android.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 com_amap_api_fence_GeoFenceClient extends java_lang_Object {
|
||||
//region constants
|
||||
static const String name__ = 'com.amap.api.fence.GeoFenceClient';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
static final int GEOFENCE_IN = 1;
|
||||
static final int GEOFENCE_OUT = 2;
|
||||
static final int GEOFENCE_STAYED = 4;
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<com_amap_api_fence_GeoFenceClient> create__android_content_Context(android_content_Context var1) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createcom_amap_api_fence_GeoFenceClient__android_content_Context',
|
||||
{"var1": var1}
|
||||
);
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_fence_GeoFenceClient>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<com_amap_api_fence_GeoFenceClient>> create_batch__android_content_Context(List<android_content_Context> var1) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchcom_amap_api_fence_GeoFenceClient__android_content_Context',
|
||||
[for (int __i__ = 0; __i__ < var1.length; __i__++) {"var1": var1[__i__]}]
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_fence_GeoFenceClient>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<com_amap_api_fence_GeoFenceClient>()
|
||||
.toList() ?? <com_amap_api_fence_GeoFenceClient>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<android_app_PendingIntent?> createPendingIntent(String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::createPendingIntent([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::createPendingIntent', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return AmapLocationFluttifyAndroidAs<android_app_PendingIntent>(__result__);
|
||||
}
|
||||
|
||||
|
||||
Future<void> setActivateAction(int var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::setActivateAction([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::setActivateAction', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setGeoFenceListener(com_amap_api_fence_GeoFenceListener var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::setGeoFenceListener([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::setGeoFenceListener', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> addGeoFence__com_amap_api_location_DPoint__double__String(com_amap_api_location_DPoint var1, double var2, String var3) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::addGeoFence([\'var2\':$var2, \'var3\':$var3])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::addGeoFence__com_amap_api_location_DPoint__double__String', {"var1": var1, "var2": var2, "var3": var3, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> addGeoFence__List_com_amap_api_location_DPoint___String(List<com_amap_api_location_DPoint> var1, String var2) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::addGeoFence([\'var2\':$var2])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::addGeoFence__List_com_amap_api_location_DPoint___String', {"var1": var1, "var2": var2, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> addGeoFence__String__String__com_amap_api_location_DPoint__double__int__String(String var1, String var2, com_amap_api_location_DPoint var3, double var4, int var5, String var6) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::addGeoFence([\'var1\':$var1, \'var2\':$var2, \'var4\':$var4, \'var5\':$var5, \'var6\':$var6])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::addGeoFence__String__String__com_amap_api_location_DPoint__double__int__String', {"var1": var1, "var2": var2, "var3": var3, "var4": var4, "var5": var5, "var6": var6, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> addGeoFence__String__String__String__int__String(String var1, String var2, String var3, int var4, String var5) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::addGeoFence([\'var1\':$var1, \'var2\':$var2, \'var3\':$var3, \'var4\':$var4, \'var5\':$var5])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::addGeoFence__String__String__String__int__String', {"var1": var1, "var2": var2, "var3": var3, "var4": var4, "var5": var5, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> addGeoFence__String__String(String var1, String var2) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::addGeoFence([\'var1\':$var1, \'var2\':$var2])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::addGeoFence__String__String', {"var1": var1, "var2": var2, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> removeGeoFence() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::removeGeoFence([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::removeGeoFence', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<bool?> removeGeoFence__com_amap_api_fence_GeoFence(com_amap_api_fence_GeoFence var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::removeGeoFence([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::removeGeoFence__com_amap_api_fence_GeoFence', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<List<com_amap_api_fence_GeoFence>?> getAllGeoFence() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::getAllGeoFence([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::getAllGeoFence', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return (__result__ as List?)?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_fence_GeoFence>(it)).where((e) => e != null).cast<com_amap_api_fence_GeoFence>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<void> setGeoFenceAble(String var1, bool var2) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::setGeoFenceAble([\'var1\':$var1, \'var2\':$var2])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::setGeoFenceAble', {"var1": var1, "var2": var2, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> pauseGeoFence() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::pauseGeoFence([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::pauseGeoFence', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> resumeGeoFence() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::resumeGeoFence([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::resumeGeoFence', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<bool?> isPause() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.GeoFenceClient@$refId::isPause([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::isPause', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'com_amap_api_fence_GeoFenceClient{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_fence_GeoFenceClient_Batch on List<com_amap_api_fence_GeoFenceClient?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<List<android_app_PendingIntent?>> createPendingIntent_batch(List<String> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::createPendingIntent_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => AmapLocationFluttifyAndroidAs<android_app_PendingIntent>(__result__)).cast<android_app_PendingIntent?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setActivateAction_batch(List<int> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::setActivateAction_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> addGeoFence__com_amap_api_location_DPoint__double__String_batch(List<com_amap_api_location_DPoint> var1, List<double> var2, List<String> var3) async {
|
||||
assert(var1.length == var2.length && var2.length == var3.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::addGeoFence__com_amap_api_location_DPoint__double__String_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "var2": var2[__i__], "var3": var3[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> addGeoFence__List_com_amap_api_location_DPoint___String_batch(List<List<com_amap_api_location_DPoint>> var1, List<String> var2) async {
|
||||
assert(var1.length == var2.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::addGeoFence__List_com_amap_api_location_DPoint___String_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "var2": var2[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> addGeoFence__String__String__com_amap_api_location_DPoint__double__int__String_batch(List<String> var1, List<String> var2, List<com_amap_api_location_DPoint> var3, List<double> var4, List<int> var5, List<String> var6) async {
|
||||
assert(var1.length == var2.length && var2.length == var3.length && var3.length == var4.length && var4.length == var5.length && var5.length == var6.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::addGeoFence__String__String__com_amap_api_location_DPoint__double__int__String_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "var2": var2[__i__], "var3": var3[__i__], "var4": var4[__i__], "var5": var5[__i__], "var6": var6[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> addGeoFence__String__String__String__int__String_batch(List<String> var1, List<String> var2, List<String> var3, List<int> var4, List<String> var5) async {
|
||||
assert(var1.length == var2.length && var2.length == var3.length && var3.length == var4.length && var4.length == var5.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::addGeoFence__String__String__String__int__String_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "var2": var2[__i__], "var3": var3[__i__], "var4": var4[__i__], "var5": var5[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> addGeoFence__String__String_batch(List<String> var1, List<String> var2) async {
|
||||
assert(var1.length == var2.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::addGeoFence__String__String_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "var2": var2[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> removeGeoFence_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::removeGeoFence_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<bool?>> removeGeoFence__com_amap_api_fence_GeoFence_batch(List<com_amap_api_fence_GeoFence> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::removeGeoFence__com_amap_api_fence_GeoFence_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<List<com_amap_api_fence_GeoFence>?>> getAllGeoFence_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::getAllGeoFence_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => (__result__ as List?)?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_fence_GeoFence>(it)).where((e) => e != null).cast<com_amap_api_fence_GeoFence>().toList()).cast<List<com_amap_api_fence_GeoFence>?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setGeoFenceAble_batch(List<String> var1, List<bool> var2) async {
|
||||
assert(var1.length == var2.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::setGeoFenceAble_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "var2": var2[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> pauseGeoFence_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::pauseGeoFence_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> resumeGeoFence_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::resumeGeoFence_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<bool?>> isPause_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceClient::isPause_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
67
lib/src/android/com/amap/api/fence/GeoFenceListener.g.dart
Normal file
67
lib/src/android/com/amap/api/fence/GeoFenceListener.g.dart
Normal file
@ -0,0 +1,67 @@
|
||||
// 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/android/android.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 _com_amap_api_fence_GeoFenceListener_SUB extends java_lang_Object with com_amap_api_fence_GeoFenceListener {}
|
||||
|
||||
mixin com_amap_api_fence_GeoFenceListener on java_lang_Object {
|
||||
|
||||
|
||||
static com_amap_api_fence_GeoFenceListener subInstance() => _com_amap_api_fence_GeoFenceListener_SUB();
|
||||
|
||||
static Future<com_amap_api_fence_GeoFenceListener> anonymous__() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.GeoFenceListener::createAnonymous__');
|
||||
|
||||
final __object__ = AmapLocationFluttifyAndroidAs<com_amap_api_fence_GeoFenceListener>(__result__)!;
|
||||
|
||||
// handle callback
|
||||
MethodChannel('com.amap.api.fence.GeoFenceListener::Callback@${__object__.refId}', kAmapLocationFluttifyMethodCodec)
|
||||
.setMethodCallHandler((methodCall) async {
|
||||
try {
|
||||
final args = methodCall.arguments as Map;
|
||||
switch (methodCall.method) {
|
||||
case 'onGeoFenceCreateFinished__':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.onGeoFenceCreateFinished?.call([\'var1\':${args['var1']}, \'var2\':${args['var2']}, \'var3\':${args['var3']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.onGeoFenceCreateFinished?.call((args['var1'] as List? ?? []).map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_fence_GeoFence>(it)).where((e) => e != null).cast<com_amap_api_fence_GeoFence>().toList(), args['var2'], args['var3']);
|
||||
break;
|
||||
default:
|
||||
throw MissingPluginException('方法${methodCall.method}未实现');
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint(e.toString());
|
||||
rethrow;
|
||||
}
|
||||
});
|
||||
|
||||
return __object__;
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Future<void> Function(List<com_amap_api_fence_GeoFence>? var1, int? var2, String? var3)? onGeoFenceCreateFinished;
|
||||
|
||||
}
|
||||
|
699
lib/src/android/com/amap/api/fence/PoiItem.g.dart
Normal file
699
lib/src/android/com/amap/api/fence/PoiItem.g.dart
Normal file
@ -0,0 +1,699 @@
|
||||
// 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/android/android.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 com_amap_api_fence_PoiItem extends java_lang_Object with android_os_Parcelable {
|
||||
//region constants
|
||||
static const String name__ = 'com.amap.api.fence.PoiItem';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<com_amap_api_fence_PoiItem> create__() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createcom_amap_api_fence_PoiItem__',
|
||||
|
||||
);
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_fence_PoiItem>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<com_amap_api_fence_PoiItem>> create_batch__(int length) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchcom_amap_api_fence_PoiItem__',
|
||||
{'length': length}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_fence_PoiItem>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<com_amap_api_fence_PoiItem>()
|
||||
.toList() ?? <com_amap_api_fence_PoiItem>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<double?> getLatitude() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::getLatitude([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getLatitude', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setLatitude(double var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::setLatitude([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setLatitude', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<double?> getLongitude() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::getLongitude([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getLongitude', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setLongitude(double var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::setLongitude([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setLongitude', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<String?> getPoiId() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::getPoiId([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getPoiId', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setPoiId(String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::setPoiId([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setPoiId', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<String?> getPoiType() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::getPoiType([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getPoiType', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setPoiType(String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::setPoiType([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setPoiType', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<String?> getTypeCode() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::getTypeCode([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getTypeCode', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setTypeCode(String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::setTypeCode([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setTypeCode', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<String?> getAddress() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::getAddress([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getAddress', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setAddress(String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::setAddress([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setAddress', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<String?> getTel() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::getTel([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getTel', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setTel(String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::setTel([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setTel', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<String?> getProvince() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::getProvince([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getProvince', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setProvince(String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::setProvince([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setProvince', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<String?> getCity() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::getCity([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getCity', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setCity(String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::setCity([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setCity', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<String?> getAdname() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::getAdname([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getAdname', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<String?> getPoiName() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::getPoiName([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getPoiName', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setPoiName(String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::setPoiName([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setPoiName', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setAdname(String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.fence.PoiItem@$refId::setAdname([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setAdname', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'com_amap_api_fence_PoiItem{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_fence_PoiItem_Batch on List<com_amap_api_fence_PoiItem?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<List<double?>> getLatitude_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getLatitude_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setLatitude_batch(List<double> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setLatitude_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<double?>> getLongitude_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getLongitude_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setLongitude_batch(List<double> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setLongitude_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<String?>> getPoiId_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getPoiId_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setPoiId_batch(List<String> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setPoiId_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<String?>> getPoiType_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getPoiType_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setPoiType_batch(List<String> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setPoiType_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<String?>> getTypeCode_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getTypeCode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setTypeCode_batch(List<String> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setTypeCode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<String?>> getAddress_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getAddress_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setAddress_batch(List<String> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setAddress_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<String?>> getTel_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getTel_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setTel_batch(List<String> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setTel_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<String?>> getProvince_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getProvince_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setProvince_batch(List<String> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setProvince_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<String?>> getCity_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getCity_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setCity_batch(List<String> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setCity_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<String?>> getAdname_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getAdname_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<String?>> getPoiName_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::getPoiName_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setPoiName_batch(List<String> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setPoiName_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setAdname_batch(List<String> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.fence.PoiItem::setAdname_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
2215
lib/src/android/com/amap/api/location/AMapLocation.g.dart
Normal file
2215
lib/src/android/com/amap/api/location/AMapLocation.g.dart
Normal file
File diff suppressed because it is too large
Load Diff
558
lib/src/android/com/amap/api/location/AMapLocationClient.g.dart
Normal file
558
lib/src/android/com/amap/api/location/AMapLocationClient.g.dart
Normal file
@ -0,0 +1,558 @@
|
||||
// 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/android/android.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 com_amap_api_location_AMapLocationClient extends java_lang_Object {
|
||||
//region constants
|
||||
static const String name__ = 'com.amap.api.location.AMapLocationClient';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<com_amap_api_location_AMapLocationClient> create__android_content_Context(android_content_Context var1) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createcom_amap_api_location_AMapLocationClient__android_content_Context',
|
||||
{"var1": var1}
|
||||
);
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_location_AMapLocationClient>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<com_amap_api_location_AMapLocationClient> create__android_content_Context__android_content_Intent(android_content_Context var1, android_content_Intent var2) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createcom_amap_api_location_AMapLocationClient__android_content_Context__android_content_Intent',
|
||||
{"var1": var1, "var2": var2}
|
||||
);
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_location_AMapLocationClient>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<com_amap_api_location_AMapLocationClient>> create_batch__android_content_Context(List<android_content_Context> var1) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchcom_amap_api_location_AMapLocationClient__android_content_Context',
|
||||
[for (int __i__ = 0; __i__ < var1.length; __i__++) {"var1": var1[__i__]}]
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_location_AMapLocationClient>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<com_amap_api_location_AMapLocationClient>()
|
||||
.toList() ?? <com_amap_api_location_AMapLocationClient>[];
|
||||
}
|
||||
|
||||
static Future<List<com_amap_api_location_AMapLocationClient>> create_batch__android_content_Context__android_content_Intent(List<android_content_Context> var1, List<android_content_Intent> var2) async {
|
||||
assert(var1.length == var2.length);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchcom_amap_api_location_AMapLocationClient__android_content_Context__android_content_Intent',
|
||||
[for (int __i__ = 0; __i__ < var1.length; __i__++) {"var1": var1[__i__], "var2": var2[__i__]}]
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_location_AMapLocationClient>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<com_amap_api_location_AMapLocationClient>()
|
||||
.toList() ?? <com_amap_api_location_AMapLocationClient>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<void> setLocationOption(com_amap_api_location_AMapLocationClientOption var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient@$refId::setLocationOption([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::setLocationOption', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setLocationListener(com_amap_api_location_AMapLocationListener var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient@$refId::setLocationListener([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::setLocationListener', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> startLocation() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient@$refId::startLocation([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::startLocation', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> stopLocation() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient@$refId::stopLocation([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::stopLocation', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<com_amap_api_location_AMapLocation?> getLastKnownLocation() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient@$refId::getLastKnownLocation([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::getLastKnownLocation', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_location_AMapLocation>(__result__);
|
||||
}
|
||||
|
||||
|
||||
Future<void> stopAssistantLocation() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient@$refId::stopAssistantLocation([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::stopAssistantLocation', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<String?> getVersion() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient@$refId::getVersion([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::getVersion', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
static Future<void> updatePrivacyShow(android_content_Context var0, bool var1, bool var2) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient::updatePrivacyShow([\'var1\':$var1, \'var2\':$var2])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::updatePrivacyShow', {"var0": var0, "var1": var1, "var2": var2});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
static Future<void> updatePrivacyAgree(android_content_Context var0, bool var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient::updatePrivacyAgree([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::updatePrivacyAgree', {"var0": var0, "var1": var1});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
static Future<void> setApiKey(String var0) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient::setApiKey([\'var0\':$var0])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::setApiKey', {"var0": var0});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<bool?> isStarted() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient@$refId::isStarted([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::isStarted', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> unRegisterLocationListener(com_amap_api_location_AMapLocationListener var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient@$refId::unRegisterLocationListener([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::unRegisterLocationListener', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> onDestroy() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient@$refId::onDestroy([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::onDestroy', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> enableBackgroundLocation(int var1, android_app_Notification var2) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient@$refId::enableBackgroundLocation([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::enableBackgroundLocation', {"var1": var1, "var2": var2, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> disableBackgroundLocation(bool var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient@$refId::disableBackgroundLocation([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::disableBackgroundLocation', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
static Future<String?> getDeviceId(android_content_Context var0) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient::getDeviceId([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::getDeviceId', {"var0": var0});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
static Future<void> setHost(String var0) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationClient::setHost([\'var0\':$var0])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::setHost', {"var0": var0});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'com_amap_api_location_AMapLocationClient{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_location_AMapLocationClient_Batch on List<com_amap_api_location_AMapLocationClient?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<List<void>> setLocationOption_batch(List<com_amap_api_location_AMapLocationClientOption> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::setLocationOption_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> startLocation_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::startLocation_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> stopLocation_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::stopLocation_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<com_amap_api_location_AMapLocation?>> getLastKnownLocation_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::getLastKnownLocation_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => AmapLocationFluttifyAndroidAs<com_amap_api_location_AMapLocation>(__result__)).cast<com_amap_api_location_AMapLocation?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> stopAssistantLocation_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::stopAssistantLocation_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<String?>> getVersion_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::getVersion_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
static Future<List<void>> updatePrivacyShow_batch(List<android_content_Context> var0, List<bool> var1, List<bool> var2) async {
|
||||
assert(var0.length == var1.length && var1.length == var2.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::updatePrivacyShow_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__], "var1": var1[__i__], "var2": var2[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
static Future<List<void>> updatePrivacyAgree_batch(List<android_content_Context> var0, List<bool> var1) async {
|
||||
assert(var0.length == var1.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::updatePrivacyAgree_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__], "var1": var1[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
static Future<List<void>> setApiKey_batch(List<String> var0) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::setApiKey_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<bool?>> isStarted_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::isStarted_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> onDestroy_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::onDestroy_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> enableBackgroundLocation_batch(List<int> var1, List<android_app_Notification> var2) async {
|
||||
assert(var1.length == var2.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::enableBackgroundLocation_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "var2": var2[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> disableBackgroundLocation_batch(List<bool> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::disableBackgroundLocation_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
static Future<List<String?>> getDeviceId_batch(List<android_content_Context> var0) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::getDeviceId_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
static Future<List<void>> setHost_batch(List<String> var0) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationClient::setHost_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,30 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum com_amap_api_location_AMapLocationClientOption_AMapLocationMode {
|
||||
Battery_Saving /* null */,
|
||||
Device_Sensors /* null */,
|
||||
Hight_Accuracy /* null */
|
||||
}
|
||||
|
||||
extension com_amap_api_location_AMapLocationClientOption_AMapLocationModeToX on com_amap_api_location_AMapLocationClientOption_AMapLocationMode {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case com_amap_api_location_AMapLocationClientOption_AMapLocationMode.Battery_Saving: return com_amap_api_location_AMapLocationClientOption_AMapLocationMode.Battery_Saving.index + 0;
|
||||
case com_amap_api_location_AMapLocationClientOption_AMapLocationMode.Device_Sensors: return com_amap_api_location_AMapLocationClientOption_AMapLocationMode.Device_Sensors.index + 0;
|
||||
case com_amap_api_location_AMapLocationClientOption_AMapLocationMode.Hight_Accuracy: return com_amap_api_location_AMapLocationClientOption_AMapLocationMode.Hight_Accuracy.index + 0;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_location_AMapLocationClientOption_AMapLocationModeFromX on int {
|
||||
com_amap_api_location_AMapLocationClientOption_AMapLocationMode tocom_amap_api_location_AMapLocationClientOption_AMapLocationMode() {
|
||||
switch (this) {
|
||||
|
||||
default: return com_amap_api_location_AMapLocationClientOption_AMapLocationMode.values[this + 0];
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum com_amap_api_location_AMapLocationClientOption_AMapLocationProtocol {
|
||||
HTTP /* null */,
|
||||
HTTPS /* null */
|
||||
}
|
||||
|
||||
extension com_amap_api_location_AMapLocationClientOption_AMapLocationProtocolToX on com_amap_api_location_AMapLocationClientOption_AMapLocationProtocol {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case com_amap_api_location_AMapLocationClientOption_AMapLocationProtocol.HTTP: return com_amap_api_location_AMapLocationClientOption_AMapLocationProtocol.HTTP.index + 0;
|
||||
case com_amap_api_location_AMapLocationClientOption_AMapLocationProtocol.HTTPS: return com_amap_api_location_AMapLocationClientOption_AMapLocationProtocol.HTTPS.index + 0;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_location_AMapLocationClientOption_AMapLocationProtocolFromX on int {
|
||||
com_amap_api_location_AMapLocationClientOption_AMapLocationProtocol tocom_amap_api_location_AMapLocationClientOption_AMapLocationProtocol() {
|
||||
switch (this) {
|
||||
|
||||
default: return com_amap_api_location_AMapLocationClientOption_AMapLocationProtocol.values[this + 0];
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum com_amap_api_location_AMapLocationClientOption_AMapLocationPurpose {
|
||||
SignIn /* null */,
|
||||
Transport /* null */,
|
||||
Sport /* null */
|
||||
}
|
||||
|
||||
extension com_amap_api_location_AMapLocationClientOption_AMapLocationPurposeToX on com_amap_api_location_AMapLocationClientOption_AMapLocationPurpose {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case com_amap_api_location_AMapLocationClientOption_AMapLocationPurpose.SignIn: return com_amap_api_location_AMapLocationClientOption_AMapLocationPurpose.SignIn.index + 0;
|
||||
case com_amap_api_location_AMapLocationClientOption_AMapLocationPurpose.Transport: return com_amap_api_location_AMapLocationClientOption_AMapLocationPurpose.Transport.index + 0;
|
||||
case com_amap_api_location_AMapLocationClientOption_AMapLocationPurpose.Sport: return com_amap_api_location_AMapLocationClientOption_AMapLocationPurpose.Sport.index + 0;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_location_AMapLocationClientOption_AMapLocationPurposeFromX on int {
|
||||
com_amap_api_location_AMapLocationClientOption_AMapLocationPurpose tocom_amap_api_location_AMapLocationClientOption_AMapLocationPurpose() {
|
||||
switch (this) {
|
||||
|
||||
default: return com_amap_api_location_AMapLocationClientOption_AMapLocationPurpose.values[this + 0];
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum com_amap_api_location_AMapLocationClientOption_GeoLanguage {
|
||||
DEFAULT /* null */,
|
||||
ZH /* null */,
|
||||
EN /* null */
|
||||
}
|
||||
|
||||
extension com_amap_api_location_AMapLocationClientOption_GeoLanguageToX on com_amap_api_location_AMapLocationClientOption_GeoLanguage {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case com_amap_api_location_AMapLocationClientOption_GeoLanguage.DEFAULT: return com_amap_api_location_AMapLocationClientOption_GeoLanguage.DEFAULT.index + 0;
|
||||
case com_amap_api_location_AMapLocationClientOption_GeoLanguage.ZH: return com_amap_api_location_AMapLocationClientOption_GeoLanguage.ZH.index + 0;
|
||||
case com_amap_api_location_AMapLocationClientOption_GeoLanguage.EN: return com_amap_api_location_AMapLocationClientOption_GeoLanguage.EN.index + 0;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_location_AMapLocationClientOption_GeoLanguageFromX on int {
|
||||
com_amap_api_location_AMapLocationClientOption_GeoLanguage tocom_amap_api_location_AMapLocationClientOption_GeoLanguage() {
|
||||
switch (this) {
|
||||
|
||||
default: return com_amap_api_location_AMapLocationClientOption_GeoLanguage.values[this + 0];
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
// 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/android/android.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 _com_amap_api_location_AMapLocationListener_SUB extends java_lang_Object with com_amap_api_location_AMapLocationListener {}
|
||||
|
||||
mixin com_amap_api_location_AMapLocationListener on java_lang_Object {
|
||||
|
||||
|
||||
static com_amap_api_location_AMapLocationListener subInstance() => _com_amap_api_location_AMapLocationListener_SUB();
|
||||
|
||||
static Future<com_amap_api_location_AMapLocationListener> anonymous__() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationListener::createAnonymous__');
|
||||
|
||||
final __object__ = AmapLocationFluttifyAndroidAs<com_amap_api_location_AMapLocationListener>(__result__)!;
|
||||
|
||||
// handle callback
|
||||
MethodChannel('com.amap.api.location.AMapLocationListener::Callback@${__object__.refId}', kAmapLocationFluttifyMethodCodec)
|
||||
.setMethodCallHandler((methodCall) async {
|
||||
try {
|
||||
final args = methodCall.arguments as Map;
|
||||
switch (methodCall.method) {
|
||||
case 'onLocationChanged':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.onLocationChanged?.call([\'var1\':${args['var1']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.onLocationChanged?.call(AmapLocationFluttifyAndroidAs<com_amap_api_location_AMapLocation>(args['var1']));
|
||||
break;
|
||||
default:
|
||||
throw MissingPluginException('方法${methodCall.method}未实现');
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint(e.toString());
|
||||
rethrow;
|
||||
}
|
||||
});
|
||||
|
||||
return __object__;
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Future<void> Function(com_amap_api_location_AMapLocation? var1)? onLocationChanged;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,479 @@
|
||||
// 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/android/android.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 com_amap_api_location_AMapLocationQualityReport extends java_lang_Object {
|
||||
//region constants
|
||||
static const String name__ = 'com.amap.api.location.AMapLocationQualityReport';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
static final int GPS_STATUS_OK = 0;
|
||||
static final int GPS_STATUS_NOGPSPROVIDER = 1;
|
||||
static final int GPS_STATUS_OFF = 2;
|
||||
static final int GPS_STATUS_MODE_SAVING = 3;
|
||||
static final int GPS_STATUS_NOGPSPERMISSION = 4;
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<com_amap_api_location_AMapLocationQualityReport> create__() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createcom_amap_api_location_AMapLocationQualityReport__',
|
||||
|
||||
);
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_location_AMapLocationQualityReport>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<com_amap_api_location_AMapLocationQualityReport>> create_batch__(int length) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchcom_amap_api_location_AMapLocationQualityReport__',
|
||||
{'length': length}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_location_AMapLocationQualityReport>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<com_amap_api_location_AMapLocationQualityReport>()
|
||||
.toList() ?? <com_amap_api_location_AMapLocationQualityReport>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<void> setWifiAble(bool var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationQualityReport@$refId::setWifiAble([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::setWifiAble', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setGpsStatus(int var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationQualityReport@$refId::setGpsStatus([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::setGpsStatus', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setGPSSatellites(int var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationQualityReport@$refId::setGPSSatellites([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::setGPSSatellites', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<bool?> isWifiAble() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationQualityReport@$refId::isWifiAble([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::isWifiAble', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<int?> getGPSStatus() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationQualityReport@$refId::getGPSStatus([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::getGPSStatus', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<int?> getGPSSatellites() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationQualityReport@$refId::getGPSSatellites([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::getGPSSatellites', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<String?> getNetworkType() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationQualityReport@$refId::getNetworkType([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::getNetworkType', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setNetworkType(String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationQualityReport@$refId::setNetworkType([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::setNetworkType', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<int?> getNetUseTime() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationQualityReport@$refId::getNetUseTime([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::getNetUseTime', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setNetUseTime(int var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationQualityReport@$refId::setNetUseTime([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::setNetUseTime', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setInstallHighDangerMockApp(bool var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationQualityReport@$refId::setInstallHighDangerMockApp([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::setInstallHighDangerMockApp', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<bool?> isInstalledHighDangerMockApp() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationQualityReport@$refId::isInstalledHighDangerMockApp([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::isInstalledHighDangerMockApp', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setLocationMode(com_amap_api_location_AMapLocationClientOption_AMapLocationMode var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationQualityReport@$refId::setLocationMode([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::setLocationMode', {"var1": var1.toValue(), "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<String?> getAdviseMessage() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.AMapLocationQualityReport@$refId::getAdviseMessage([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::getAdviseMessage', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'com_amap_api_location_AMapLocationQualityReport{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_location_AMapLocationQualityReport_Batch on List<com_amap_api_location_AMapLocationQualityReport?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<List<void>> setWifiAble_batch(List<bool> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::setWifiAble_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setGpsStatus_batch(List<int> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::setGpsStatus_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setGPSSatellites_batch(List<int> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::setGPSSatellites_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<bool?>> isWifiAble_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::isWifiAble_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<int?>> getGPSStatus_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::getGPSStatus_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<int?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<int?>> getGPSSatellites_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::getGPSSatellites_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<int?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<String?>> getNetworkType_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::getNetworkType_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setNetworkType_batch(List<String> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::setNetworkType_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<int?>> getNetUseTime_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::getNetUseTime_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<int?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setNetUseTime_batch(List<int> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::setNetUseTime_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setInstallHighDangerMockApp_batch(List<bool> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::setInstallHighDangerMockApp_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<bool?>> isInstalledHighDangerMockApp_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::isInstalledHighDangerMockApp_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setLocationMode_batch(List<com_amap_api_location_AMapLocationClientOption_AMapLocationMode> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::setLocationMode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__].toValue(), "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<String?>> getAdviseMessage_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationQualityReport::getAdviseMessage_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
167
lib/src/android/com/amap/api/location/APSService.g.dart
Normal file
167
lib/src/android/com/amap/api/location/APSService.g.dart
Normal file
@ -0,0 +1,167 @@
|
||||
// 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/android/android.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 com_amap_api_location_APSService extends java_lang_Object {
|
||||
//region constants
|
||||
static const String name__ = 'com.amap.api.location.APSService';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<com_amap_api_location_APSService> create__() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createcom_amap_api_location_APSService__',
|
||||
|
||||
);
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_location_APSService>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<com_amap_api_location_APSService>> create_batch__(int length) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchcom_amap_api_location_APSService__',
|
||||
{'length': length}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_location_APSService>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<com_amap_api_location_APSService>()
|
||||
.toList() ?? <com_amap_api_location_APSService>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<void> onCreate() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.APSService@$refId::onCreate([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.APSService::onCreate', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<int?> onStartCommand(android_content_Intent var1, int var2, int var3) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.APSService@$refId::onStartCommand([\'var2\':$var2, \'var3\':$var3])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.APSService::onStartCommand', {"var1": var1, "var2": var2, "var3": var3, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> onDestroy() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.APSService@$refId::onDestroy([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.APSService::onDestroy', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'com_amap_api_location_APSService{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_location_APSService_Batch on List<com_amap_api_location_APSService?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<List<void>> onCreate_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.APSService::onCreate_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<int?>> onStartCommand_batch(List<android_content_Intent> var1, List<int> var2, List<int> var3) async {
|
||||
assert(var1.length == var2.length && var2.length == var3.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.APSService::onStartCommand_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "var2": var2[__i__], "var3": var3[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<int?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> onDestroy_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.APSService::onDestroy_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
167
lib/src/android/com/amap/api/location/CoordUtil.g.dart
Normal file
167
lib/src/android/com/amap/api/location/CoordUtil.g.dart
Normal file
@ -0,0 +1,167 @@
|
||||
// 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/android/android.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 com_amap_api_location_CoordUtil extends java_lang_Object {
|
||||
//region constants
|
||||
static const String name__ = 'com.amap.api.location.CoordUtil';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<com_amap_api_location_CoordUtil> create__() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createcom_amap_api_location_CoordUtil__',
|
||||
|
||||
);
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_location_CoordUtil>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<com_amap_api_location_CoordUtil>> create_batch__(int length) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchcom_amap_api_location_CoordUtil__',
|
||||
{'length': length}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_location_CoordUtil>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<com_amap_api_location_CoordUtil>()
|
||||
.toList() ?? <com_amap_api_location_CoordUtil>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
static Future<int?> convertToGcj(Float64List var0, Float64List var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.CoordUtil::convertToGcj([\'var0\':$var0, \'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordUtil::convertToGcj', {"var0": var0, "var1": var1});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
static Future<bool?> isLoadedSo() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.CoordUtil::isLoadedSo([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordUtil::isLoadedSo', );
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
static Future<void> setLoadedSo(bool var0) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.CoordUtil::setLoadedSo([\'var0\':$var0])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordUtil::setLoadedSo', {"var0": var0});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'com_amap_api_location_CoordUtil{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_location_CoordUtil_Batch on List<com_amap_api_location_CoordUtil?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
static Future<List<int?>> convertToGcj_batch(List<Float64List> var0, List<Float64List> var1) async {
|
||||
assert(var0.length == var1.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordUtil::convertToGcj_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__], "var1": var1[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<int?>().toList();
|
||||
}
|
||||
|
||||
|
||||
static Future<List<bool?>> isLoadedSo_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordUtil::isLoadedSo_batch', );
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
|
||||
static Future<List<void>> setLoadedSo_batch(List<bool> var0) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordUtil::setLoadedSo_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
223
lib/src/android/com/amap/api/location/CoordinateConverter.g.dart
Normal file
223
lib/src/android/com/amap/api/location/CoordinateConverter.g.dart
Normal file
@ -0,0 +1,223 @@
|
||||
// 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/android/android.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 com_amap_api_location_CoordinateConverter extends java_lang_Object {
|
||||
//region constants
|
||||
static const String name__ = 'com.amap.api.location.CoordinateConverter';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<com_amap_api_location_CoordinateConverter> create__android_content_Context(android_content_Context var1) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createcom_amap_api_location_CoordinateConverter__android_content_Context',
|
||||
{"var1": var1}
|
||||
);
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_location_CoordinateConverter>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<com_amap_api_location_CoordinateConverter>> create_batch__android_content_Context(List<android_content_Context> var1) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchcom_amap_api_location_CoordinateConverter__android_content_Context',
|
||||
[for (int __i__ = 0; __i__ < var1.length; __i__++) {"var1": var1[__i__]}]
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_location_CoordinateConverter>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<com_amap_api_location_CoordinateConverter>()
|
||||
.toList() ?? <com_amap_api_location_CoordinateConverter>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<com_amap_api_location_CoordinateConverter?> from(com_amap_api_location_CoordinateConverter_CoordType var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.CoordinateConverter@$refId::from([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordinateConverter::from', {"var1": var1.toValue(), "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_location_CoordinateConverter>(__result__);
|
||||
}
|
||||
|
||||
|
||||
Future<com_amap_api_location_CoordinateConverter?> coord(com_amap_api_location_DPoint var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.CoordinateConverter@$refId::coord([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordinateConverter::coord', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_location_CoordinateConverter>(__result__);
|
||||
}
|
||||
|
||||
|
||||
Future<com_amap_api_location_DPoint?> convert() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.CoordinateConverter@$refId::convert([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordinateConverter::convert', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_location_DPoint>(__result__);
|
||||
}
|
||||
|
||||
|
||||
static Future<bool?> isAMapDataAvailable(double var0, double var2) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.CoordinateConverter::isAMapDataAvailable([\'var0\':$var0, \'var2\':$var2])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordinateConverter::isAMapDataAvailable', {"var0": var0, "var2": var2});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
static Future<double?> calculateLineDistance(com_amap_api_location_DPoint var0, com_amap_api_location_DPoint var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.CoordinateConverter::calculateLineDistance([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordinateConverter::calculateLineDistance', {"var0": var0, "var1": var1});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'com_amap_api_location_CoordinateConverter{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_location_CoordinateConverter_Batch on List<com_amap_api_location_CoordinateConverter?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<List<com_amap_api_location_CoordinateConverter?>> from_batch(List<com_amap_api_location_CoordinateConverter_CoordType> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordinateConverter::from_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__].toValue(), "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => AmapLocationFluttifyAndroidAs<com_amap_api_location_CoordinateConverter>(__result__)).cast<com_amap_api_location_CoordinateConverter?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<com_amap_api_location_CoordinateConverter?>> coord_batch(List<com_amap_api_location_DPoint> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordinateConverter::coord_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => AmapLocationFluttifyAndroidAs<com_amap_api_location_CoordinateConverter>(__result__)).cast<com_amap_api_location_CoordinateConverter?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<com_amap_api_location_DPoint?>> convert_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordinateConverter::convert_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => AmapLocationFluttifyAndroidAs<com_amap_api_location_DPoint>(__result__)).cast<com_amap_api_location_DPoint?>().toList();
|
||||
}
|
||||
|
||||
|
||||
static Future<List<bool?>> isAMapDataAvailable_batch(List<double> var0, List<double> var2) async {
|
||||
assert(var0.length == var2.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordinateConverter::isAMapDataAvailable_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__], "var2": var2[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
|
||||
static Future<List<double?>> calculateLineDistance_batch(List<com_amap_api_location_DPoint> var0, List<com_amap_api_location_DPoint> var1) async {
|
||||
assert(var0.length == var1.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.CoordinateConverter::calculateLineDistance_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__], "var1": var1[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum com_amap_api_location_CoordinateConverter_CoordType {
|
||||
BAIDU /* null */,
|
||||
MAPBAR /* null */,
|
||||
MAPABC /* null */,
|
||||
SOSOMAP /* null */,
|
||||
ALIYUN /* null */,
|
||||
GOOGLE /* null */,
|
||||
GPS /* null */
|
||||
}
|
||||
|
||||
extension com_amap_api_location_CoordinateConverter_CoordTypeToX on com_amap_api_location_CoordinateConverter_CoordType {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case com_amap_api_location_CoordinateConverter_CoordType.BAIDU: return com_amap_api_location_CoordinateConverter_CoordType.BAIDU.index + 0;
|
||||
case com_amap_api_location_CoordinateConverter_CoordType.MAPBAR: return com_amap_api_location_CoordinateConverter_CoordType.MAPBAR.index + 0;
|
||||
case com_amap_api_location_CoordinateConverter_CoordType.MAPABC: return com_amap_api_location_CoordinateConverter_CoordType.MAPABC.index + 0;
|
||||
case com_amap_api_location_CoordinateConverter_CoordType.SOSOMAP: return com_amap_api_location_CoordinateConverter_CoordType.SOSOMAP.index + 0;
|
||||
case com_amap_api_location_CoordinateConverter_CoordType.ALIYUN: return com_amap_api_location_CoordinateConverter_CoordType.ALIYUN.index + 0;
|
||||
case com_amap_api_location_CoordinateConverter_CoordType.GOOGLE: return com_amap_api_location_CoordinateConverter_CoordType.GOOGLE.index + 0;
|
||||
case com_amap_api_location_CoordinateConverter_CoordType.GPS: return com_amap_api_location_CoordinateConverter_CoordType.GPS.index + 0;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_location_CoordinateConverter_CoordTypeFromX on int {
|
||||
com_amap_api_location_CoordinateConverter_CoordType tocom_amap_api_location_CoordinateConverter_CoordType() {
|
||||
switch (this) {
|
||||
|
||||
default: return com_amap_api_location_CoordinateConverter_CoordType.values[this + 0];
|
||||
}
|
||||
}
|
||||
}
|
216
lib/src/android/com/amap/api/location/DPoint.g.dart
Normal file
216
lib/src/android/com/amap/api/location/DPoint.g.dart
Normal file
@ -0,0 +1,216 @@
|
||||
// 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/android/android.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 com_amap_api_location_DPoint extends java_lang_Object with android_os_Parcelable {
|
||||
//region constants
|
||||
static const String name__ = 'com.amap.api.location.DPoint';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<com_amap_api_location_DPoint> create__() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createcom_amap_api_location_DPoint__',
|
||||
|
||||
);
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_location_DPoint>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<com_amap_api_location_DPoint> create__double__double(double var1, double var3) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createcom_amap_api_location_DPoint__double__double',
|
||||
{"var1": var1, "var3": var3}
|
||||
);
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_location_DPoint>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<com_amap_api_location_DPoint>> create_batch__(int length) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchcom_amap_api_location_DPoint__',
|
||||
{'length': length}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_location_DPoint>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<com_amap_api_location_DPoint>()
|
||||
.toList() ?? <com_amap_api_location_DPoint>[];
|
||||
}
|
||||
|
||||
static Future<List<com_amap_api_location_DPoint>> create_batch__double__double(List<double> var1, List<double> var3) async {
|
||||
assert(var1.length == var3.length);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchcom_amap_api_location_DPoint__double__double',
|
||||
[for (int __i__ = 0; __i__ < var1.length; __i__++) {"var1": var1[__i__], "var3": var3[__i__]}]
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_location_DPoint>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<com_amap_api_location_DPoint>()
|
||||
.toList() ?? <com_amap_api_location_DPoint>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<double?> getLongitude() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.DPoint@$refId::getLongitude([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.DPoint::getLongitude', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setLongitude(double var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.DPoint@$refId::setLongitude([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.DPoint::setLongitude', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<double?> getLatitude() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.DPoint@$refId::getLatitude([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.DPoint::getLatitude', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> setLatitude(double var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.DPoint@$refId::setLatitude([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.DPoint::setLatitude', {"var1": var1, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'com_amap_api_location_DPoint{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_location_DPoint_Batch on List<com_amap_api_location_DPoint?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<List<double?>> getLongitude_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.DPoint::getLongitude_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setLongitude_batch(List<double> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.DPoint::setLongitude_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<double?>> getLatitude_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.DPoint::getLatitude_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> setLatitude_batch(List<double> var1) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.DPoint::setLatitude_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
167
lib/src/android/com/amap/api/location/UmidtokenInfo.g.dart
Normal file
167
lib/src/android/com/amap/api/location/UmidtokenInfo.g.dart
Normal file
@ -0,0 +1,167 @@
|
||||
// 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/android/android.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 com_amap_api_location_UmidtokenInfo extends java_lang_Object {
|
||||
//region constants
|
||||
static const String name__ = 'com.amap.api.location.UmidtokenInfo';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<com_amap_api_location_UmidtokenInfo> create__() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createcom_amap_api_location_UmidtokenInfo__',
|
||||
|
||||
);
|
||||
return AmapLocationFluttifyAndroidAs<com_amap_api_location_UmidtokenInfo>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<com_amap_api_location_UmidtokenInfo>> create_batch__(int length) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchcom_amap_api_location_UmidtokenInfo__',
|
||||
{'length': length}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyAndroidAs<com_amap_api_location_UmidtokenInfo>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<com_amap_api_location_UmidtokenInfo>()
|
||||
.toList() ?? <com_amap_api_location_UmidtokenInfo>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
static Future<String?> getUmidtoken() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.UmidtokenInfo::getUmidtoken([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.UmidtokenInfo::getUmidtoken', );
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
static Future<void> setLocAble(bool var0) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.UmidtokenInfo::setLocAble([\'var0\':$var0])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.UmidtokenInfo::setLocAble', {"var0": var0});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
static Future<void> setUmidtoken(android_content_Context var0, String var1) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: com.amap.api.location.UmidtokenInfo::setUmidtoken([\'var1\':$var1])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.UmidtokenInfo::setUmidtoken', {"var0": var0, "var1": var1});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'com_amap_api_location_UmidtokenInfo{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_location_UmidtokenInfo_Batch on List<com_amap_api_location_UmidtokenInfo?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
static Future<List<String?>> getUmidtoken_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.UmidtokenInfo::getUmidtoken_batch', );
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
|
||||
static Future<List<void>> setLocAble_batch(List<bool> var0) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.UmidtokenInfo::setLocAble_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
static Future<List<void>> setUmidtoken_batch(List<android_content_Context> var0, List<String> var1) async {
|
||||
assert(var0.length == var1.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.UmidtokenInfo::setUmidtoken_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__], "var1": var1[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
10
lib/src/android/constants.g.dart
Normal file
10
lib/src/android/constants.g.dart
Normal file
@ -0,0 +1,10 @@
|
||||
// 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 'package:flutter/services.dart';
|
||||
import '../facade/shared.g.dart';
|
||||
|
||||
import 'package:amap_location_fluttify/src/ios/ios.export.g.dart';
|
||||
import 'package:amap_location_fluttify/src/android/android.export.g.dart';
|
||||
|
272
lib/src/android/type_op.g.dart
Normal file
272
lib/src/android/type_op.g.dart
Normal file
@ -0,0 +1,272 @@
|
||||
// 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:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:amap_location_fluttify/src/android/android.export.g.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';
|
||||
|
||||
|
||||
// ignore_for_file: non_constant_identifier_names, camel_case_types, missing_return, unused_import
|
||||
// type check
|
||||
@optionalTypeArgs
|
||||
Future<bool> AmapLocationFluttifyAndroidIs<T>(dynamic __this__) async {
|
||||
final typeName = T.toString();
|
||||
if (RegExp(r'^(List<)?(String|int|double)(>)?|(Map<String,(String|int|double)>)$').hasMatch(typeName)) {
|
||||
return __this__ is T;
|
||||
}
|
||||
else if (T == com_amap_api_location_AMapLocationClient) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_location_AMapLocationClient', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == com_amap_api_location_AMapLocationListener) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_location_AMapLocationListener', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == com_amap_api_location_APSService) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_location_APSService', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == com_amap_api_location_DPoint) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_location_DPoint', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == com_amap_api_location_CoordinateConverter) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_location_CoordinateConverter', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == com_amap_api_location_CoordUtil) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_location_CoordUtil', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == com_amap_api_location_UmidtokenInfo) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_location_UmidtokenInfo', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == com_amap_api_location_AMapLocation) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_location_AMapLocation', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == com_amap_api_location_AMapLocationClientOption) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_location_AMapLocationClientOption', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == com_amap_api_location_AMapLocationQualityReport) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_location_AMapLocationQualityReport', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == com_amap_api_fence_DistrictItem) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_fence_DistrictItem', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == com_amap_api_fence_GeoFenceClient) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_fence_GeoFenceClient', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == com_amap_api_fence_GeoFenceListener) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_fence_GeoFenceListener', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == com_amap_api_fence_GeoFence) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_fence_GeoFence', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == com_amap_api_fence_PoiItem) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfcom_amap_api_fence_PoiItem', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_content_Context) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_content_Context', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_content_Intent) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_content_Intent', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_content_ContentProvider) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_content_ContentProvider', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_app_Application) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_app_Application', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_app_Notification) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_app_Notification', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_app_Activity) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_app_Activity', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_app_PendingIntent) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_app_PendingIntent', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_os_Bundle) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_os_Bundle', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_os_Binder) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_os_Binder', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_view_View) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_view_View', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_view_SurfaceView) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_view_SurfaceView', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_view_SurfaceHolder) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_view_SurfaceHolder', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_opengl_GLSurfaceView) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_opengl_GLSurfaceView', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_view_View_OnApplyWindowInsetsListener) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_view_View_OnApplyWindowInsetsListener', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_view_ViewGroup) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_view_ViewGroup', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_graphics_Point) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_graphics_Point', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_graphics_PointF) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_graphics_PointF', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_graphics_Bitmap) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_graphics_Bitmap', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_widget_ImageView) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_widget_ImageView', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == java_io_Serializable) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfjava_io_Serializable', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == java_io_File) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfjava_io_File', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_location_Location) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_location_Location', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_view_MotionEvent) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_view_MotionEvent', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_graphics_drawable_Drawable) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_graphics_drawable_Drawable', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_widget_FrameLayout) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_widget_FrameLayout', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_widget_TextView) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_widget_TextView', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_widget_LinearLayout) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_widget_LinearLayout', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_widget_RelativeLayout) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_widget_RelativeLayout', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_os_Parcelable) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_os_Parcelable', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == android_util_Pair) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfandroid_util_Pair', {'__this__': __this__});
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// type cast
|
||||
// 给一个可选的泛型, 如果没有指定泛型就返回dynamic
|
||||
@optionalTypeArgs
|
||||
T? AmapLocationFluttifyAndroidAs<T>(dynamic __this__) {
|
||||
final typeName = T.toString();
|
||||
|
||||
if (__this__ == null) {
|
||||
return null;
|
||||
} else if (RegExp(r'^(List<)?(String|int|double)(>)?|(Map<String,(String|int|double)>)$').hasMatch(typeName)) {
|
||||
return __this__ as T;
|
||||
}
|
||||
else if (T == com_amap_api_location_AMapLocationClient) {
|
||||
return (com_amap_api_location_AMapLocationClient()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == com_amap_api_location_AMapLocationListener) {
|
||||
return (com_amap_api_location_AMapLocationListener.subInstance()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == com_amap_api_location_APSService) {
|
||||
return (com_amap_api_location_APSService()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == com_amap_api_location_DPoint) {
|
||||
return (com_amap_api_location_DPoint()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == com_amap_api_location_CoordinateConverter) {
|
||||
return (com_amap_api_location_CoordinateConverter()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == com_amap_api_location_CoordUtil) {
|
||||
return (com_amap_api_location_CoordUtil()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == com_amap_api_location_UmidtokenInfo) {
|
||||
return (com_amap_api_location_UmidtokenInfo()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == com_amap_api_location_AMapLocation) {
|
||||
return (com_amap_api_location_AMapLocation()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == com_amap_api_location_AMapLocationClientOption) {
|
||||
return (com_amap_api_location_AMapLocationClientOption()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == com_amap_api_location_AMapLocationQualityReport) {
|
||||
return (com_amap_api_location_AMapLocationQualityReport()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == com_amap_api_fence_DistrictItem) {
|
||||
return (com_amap_api_fence_DistrictItem()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == com_amap_api_fence_GeoFenceClient) {
|
||||
return (com_amap_api_fence_GeoFenceClient()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == com_amap_api_fence_GeoFenceListener) {
|
||||
return (com_amap_api_fence_GeoFenceListener.subInstance()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == com_amap_api_fence_GeoFence) {
|
||||
return (com_amap_api_fence_GeoFence()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == com_amap_api_fence_PoiItem) {
|
||||
return (com_amap_api_fence_PoiItem()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_content_Context) {
|
||||
return (android_content_Context()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_content_Intent) {
|
||||
return (android_content_Intent()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_content_ContentProvider) {
|
||||
return (android_content_ContentProvider()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_app_Application) {
|
||||
return (android_app_Application()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_app_Notification) {
|
||||
return (android_app_Notification()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_app_Activity) {
|
||||
return (android_app_Activity()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_app_PendingIntent) {
|
||||
return (android_app_PendingIntent()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_os_Bundle) {
|
||||
return (android_os_Bundle()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_os_Binder) {
|
||||
return (android_os_Binder()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_view_View) {
|
||||
return (android_view_View()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_view_SurfaceView) {
|
||||
return (android_view_SurfaceView()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_view_SurfaceHolder) {
|
||||
return (android_view_SurfaceHolder.subInstance()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_opengl_GLSurfaceView) {
|
||||
return (android_opengl_GLSurfaceView()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_view_View_OnApplyWindowInsetsListener) {
|
||||
return (android_view_View_OnApplyWindowInsetsListener.subInstance()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_view_ViewGroup) {
|
||||
return (android_view_ViewGroup()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_graphics_Point) {
|
||||
return (android_graphics_Point()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_graphics_PointF) {
|
||||
return (android_graphics_PointF()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_graphics_Bitmap) {
|
||||
return (android_graphics_Bitmap()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_widget_ImageView) {
|
||||
return (android_widget_ImageView()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == java_io_Serializable) {
|
||||
return (java_io_Serializable.subInstance()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == java_io_File) {
|
||||
return (java_io_File()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_location_Location) {
|
||||
return (android_location_Location()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_view_MotionEvent) {
|
||||
return (android_view_MotionEvent()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_graphics_drawable_Drawable) {
|
||||
return (android_graphics_drawable_Drawable()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_widget_FrameLayout) {
|
||||
return (android_widget_FrameLayout()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_widget_TextView) {
|
||||
return (android_widget_TextView()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_widget_LinearLayout) {
|
||||
return (android_widget_LinearLayout()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_widget_RelativeLayout) {
|
||||
return (android_widget_RelativeLayout()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_os_Parcelable) {
|
||||
return (android_os_Parcelable.subInstance()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == android_util_Pair) {
|
||||
return (android_util_Pair()..refId = (__this__ as Ref).refId) as T;
|
||||
}
|
||||
|
||||
else {
|
||||
return __this__;
|
||||
}
|
||||
}
|
784
lib/src/facade/amap_location.dart
Normal file
784
lib/src/facade/amap_location.dart
Normal file
@ -0,0 +1,784 @@
|
||||
// ignore_for_file: non_constant_identifier_names
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:amap_core_fluttify/amap_core_fluttify.dart';
|
||||
import 'package:amap_location_fluttify/src/android/android.export.g.dart';
|
||||
import 'package:amap_location_fluttify/src/ios/ios.export.g.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'enums.dart';
|
||||
import 'extensions.dart';
|
||||
import 'models.dart';
|
||||
|
||||
/// 高德定位 主类
|
||||
class AmapLocation {
|
||||
static AmapLocation instance = AmapLocation._();
|
||||
|
||||
AmapLocation._() {
|
||||
initAndroidListener();
|
||||
}
|
||||
|
||||
com_amap_api_location_AMapLocationClient? _androidClient;
|
||||
com_amap_api_fence_GeoFenceClient? _androidGeoFenceClient;
|
||||
AMapLocationManager? _iosClient;
|
||||
AMapGeoFenceManager? _iosGeoFenceClient;
|
||||
|
||||
AMapGeoFenceManagerDelegate? _iosGeoFenceDelegate;
|
||||
AMapLocationManagerDelegate? _iosLocationDelegate;
|
||||
|
||||
StreamController<Location>? _locationController;
|
||||
StreamController<GeoFenceEvent>? _geoFenceEventController;
|
||||
|
||||
/// 初始化
|
||||
Future<void> init({required String iosKey}) {
|
||||
return platform(
|
||||
android: (pool) async {
|
||||
// 获取上下文, 这里获取的是Application
|
||||
final context = await android_app_Application.get();
|
||||
|
||||
// 创建定位客户端
|
||||
_androidClient ??= await com_amap_api_location_AMapLocationClient
|
||||
.create__android_content_Context(context);
|
||||
},
|
||||
ios: (pool) async {
|
||||
await AmapCore.init(iosKey);
|
||||
_iosClient ??= await AMapLocationManager.create__();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// 隐私是否已经展示
|
||||
Future<void> updatePrivacyShow(bool value) async {
|
||||
return platform(
|
||||
android: (pool) async {
|
||||
final context = await android_app_Application.get();
|
||||
await com_amap_api_location_AMapLocationClient.updatePrivacyShow(
|
||||
context, value, true);
|
||||
},
|
||||
ios: (pool) async {
|
||||
AMapLocationManager.updatePrivacyShow_privacyInfo(
|
||||
value
|
||||
? AMapPrivacyShowStatus.AMapPrivacyShowStatusDidShow
|
||||
: AMapPrivacyShowStatus.AMapPrivacyShowStatusNotShow,
|
||||
AMapPrivacyInfoStatus.AMapPrivacyInfoStatusDidContain,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// 隐私是否已经同意
|
||||
Future<void> updatePrivacyAgree(bool value) async {
|
||||
return platform(
|
||||
android: (pool) async {
|
||||
final context = await android_app_Application.get();
|
||||
await com_amap_api_location_AMapLocationClient.updatePrivacyAgree(
|
||||
context,
|
||||
value,
|
||||
);
|
||||
},
|
||||
ios: (pool) async {
|
||||
await AMapLocationManager.updatePrivacyAgree(
|
||||
value
|
||||
? AMapPrivacyAgreeStatus.AMapPrivacyAgreeStatusDidAgree
|
||||
: AMapPrivacyAgreeStatus.AMapPrivacyAgreeStatusNotAgree,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// 单次获取定位信息
|
||||
///
|
||||
/// 选择定位模式[mode], 设置定位同时是否需要返回地址描述[needAddress], 设置定位请求超时时间,默认为30秒[timeout].
|
||||
Future<Location> fetchLocation({
|
||||
LocationAccuracy mode = LocationAccuracy.Low,
|
||||
bool? needAddress,
|
||||
Duration? timeout,
|
||||
}) async {
|
||||
var completer = Completer<Location>();
|
||||
return platform(
|
||||
android: (pool) async {
|
||||
assert(_androidClient != null,
|
||||
'请先在main方法中调用AmapLocation.instance.init()进行初始化!');
|
||||
|
||||
final listener =
|
||||
await com_amap_api_location_AMapLocationListener.anonymous__();
|
||||
listener.onLocationChanged = (location) async {
|
||||
if (!completer.isCompleted) {
|
||||
completer.complete(
|
||||
Location(
|
||||
address: await location!.getAddress(),
|
||||
latLng: LatLng(
|
||||
await location.getLatitude() ?? 0,
|
||||
await location.getLongitude() ?? 0,
|
||||
),
|
||||
altitude: await location.getAltitude(),
|
||||
bearing: await location.getBearing(),
|
||||
country: await location.getCountry(),
|
||||
province: await location.getProvince(),
|
||||
city: await location.getCity(),
|
||||
cityCode: await location.getCityCode(),
|
||||
adCode: await location.getAdCode(),
|
||||
district: await location.getDistrict(),
|
||||
poiName: await location.getPoiName(),
|
||||
street: await location.getStreet(),
|
||||
streetNumber: await location.getStreetNum(),
|
||||
aoiName: await location.getAoiName(),
|
||||
accuracy: await location.getAccuracy(),
|
||||
speed: await location.speed,
|
||||
),
|
||||
);
|
||||
}
|
||||
};
|
||||
await _androidClient?.setLocationListener(listener);
|
||||
|
||||
// 创建选项
|
||||
final options =
|
||||
await com_amap_api_location_AMapLocationClientOption.create__();
|
||||
// 设置单次定位
|
||||
await options.setOnceLocation(true);
|
||||
// 设置定位模式
|
||||
switch (mode) {
|
||||
// 高精度定位模式:会同时使用网络定位和GPS定位,优先返回最高精度的定位结果,以及对应的地址描述信息。
|
||||
case LocationAccuracy.High:
|
||||
await options.setLocationMode(
|
||||
com_amap_api_location_AMapLocationClientOption_AMapLocationMode
|
||||
.Hight_Accuracy);
|
||||
break;
|
||||
// 低功耗定位模式:不会使用GPS和其他传感器,只会使用网络定位(Wi-Fi和基站定位);
|
||||
case LocationAccuracy.Low:
|
||||
await options.setLocationMode(
|
||||
com_amap_api_location_AMapLocationClientOption_AMapLocationMode
|
||||
.Battery_Saving);
|
||||
break;
|
||||
case LocationAccuracy.DeviceSensor:
|
||||
await options.setLocationMode(
|
||||
com_amap_api_location_AMapLocationClientOption_AMapLocationMode
|
||||
.Device_Sensors);
|
||||
break;
|
||||
}
|
||||
// 是否返回地址描述
|
||||
if (needAddress != null) await options.setNeedAddress(needAddress);
|
||||
// 设置定位请求超时时间,默认为30秒。
|
||||
if (timeout != null) {
|
||||
await options.setHttpTimeOut(timeout.inMilliseconds);
|
||||
}
|
||||
|
||||
await options.setSensorEnable(true);
|
||||
|
||||
// 设置选项
|
||||
await _androidClient?.setLocationOption(options);
|
||||
|
||||
// 开始定位
|
||||
await _androidClient?.startLocation();
|
||||
|
||||
return completer.future;
|
||||
},
|
||||
ios: (pool) async {
|
||||
assert(_iosClient != null,
|
||||
'请先在main方法中调用AmapLocation.instance.init()进行初始化!');
|
||||
// 设置定位模式
|
||||
switch (mode) {
|
||||
// 高精度定位模式:会同时使用网络定位和GPS定位,优先返回最高精度的定位结果,以及对应的地址描述信息。
|
||||
case LocationAccuracy.High:
|
||||
await _iosClient?.set_desiredAccuracy(10);
|
||||
break;
|
||||
// 低功耗定位模式:不会使用GPS和其他传感器,只会使用网络定位(Wi-Fi和基站定位);
|
||||
case LocationAccuracy.DeviceSensor:
|
||||
case LocationAccuracy.Low:
|
||||
await _iosClient?.set_desiredAccuracy(100);
|
||||
break;
|
||||
}
|
||||
// 设置定位请求超时时间,默认为30秒。
|
||||
if (timeout != null) {
|
||||
await _iosClient?.set_locationTimeout(timeout.inSeconds);
|
||||
}
|
||||
|
||||
await _iosClient?.requestLocationWithReGeocode_completionBlock(
|
||||
needAddress ?? true,
|
||||
(location, regeocode, error) async {
|
||||
if (!completer.isCompleted) {
|
||||
final latitude =
|
||||
await location!.coordinate.then((it) => it.latitude);
|
||||
final longitude =
|
||||
await location.coordinate.then((it) => it.longitude);
|
||||
completer.complete(Location(
|
||||
address: await regeocode?.get_formattedAddress(),
|
||||
latLng: LatLng(await latitude ?? 0, await longitude ?? 0),
|
||||
altitude: await location.altitude,
|
||||
bearing: await location.course,
|
||||
country: await regeocode?.get_country(),
|
||||
province: await regeocode?.get_province(),
|
||||
city: await regeocode?.get_city(),
|
||||
cityCode: await regeocode?.get_citycode(),
|
||||
adCode: await regeocode?.get_adcode(),
|
||||
district: await regeocode?.get_district(),
|
||||
poiName: await regeocode?.get_POIName(),
|
||||
street: await regeocode?.get_street(),
|
||||
streetNumber: await regeocode?.get_number(),
|
||||
aoiName: await regeocode?.get_AOIName(),
|
||||
accuracy: await location.horizontalAccuracy,
|
||||
speed: await location.speed,
|
||||
));
|
||||
}
|
||||
},
|
||||
);
|
||||
return completer.future;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// 连续获取定位信息
|
||||
///
|
||||
/// 选择定位模式[mode], 设置定位同时是否需要返回地址描述[needAddress], 设置定位请求超时时间,默认为30秒[timeout]
|
||||
/// 设置定位间隔[interval], 默认2000 ms, 设置是否开启定位缓存机制[cacheEnable].
|
||||
/// [distanceFilter] ios only: 设置更新定位的最小偏移距离, 单位:米.
|
||||
Stream<Location> listenLocation({
|
||||
LocationAccuracy mode = LocationAccuracy.Low,
|
||||
bool? needAddress,
|
||||
Duration? timeout,
|
||||
int? interval,
|
||||
double? distanceFilter,
|
||||
}) async* {
|
||||
_locationController ??= StreamController<Location>();
|
||||
|
||||
if (Platform.isAndroid) {
|
||||
final listener =
|
||||
await com_amap_api_location_AMapLocationListener.anonymous__();
|
||||
listener.onLocationChanged = (location) async {
|
||||
if (!_locationController!.isClosed) {
|
||||
_locationController!.add(
|
||||
Location(
|
||||
address: await location!.getAddress(),
|
||||
latLng: LatLng(
|
||||
await location.getLatitude() ?? 0,
|
||||
await location.getLongitude() ?? 0,
|
||||
),
|
||||
altitude: await location.getAltitude(),
|
||||
bearing: await location.getBearing(),
|
||||
country: await location.getCountry(),
|
||||
province: await location.getProvince(),
|
||||
city: await location.getCity(),
|
||||
cityCode: await location.getCityCode(),
|
||||
adCode: await location.getAdCode(),
|
||||
district: await location.getDistrict(),
|
||||
poiName: await location.getPoiName(),
|
||||
street: await location.getStreet(),
|
||||
streetNumber: await location.getStreetNum(),
|
||||
aoiName: await location.getAoiName(),
|
||||
accuracy: await location.getAccuracy(),
|
||||
speed: await location.speed,
|
||||
),
|
||||
);
|
||||
}
|
||||
};
|
||||
await _androidClient?.setLocationListener(listener);
|
||||
|
||||
// 创建选项
|
||||
final options =
|
||||
await com_amap_api_location_AMapLocationClientOption.create__();
|
||||
// 设置连续定位
|
||||
await options.setOnceLocation(false);
|
||||
// 设置定位模式
|
||||
switch (mode) {
|
||||
// 高精度定位模式:会同时使用网络定位和GPS定位,优先返回最高精度的定位结果,以及对应的地址描述信息。
|
||||
case LocationAccuracy.High:
|
||||
await options.setLocationMode(
|
||||
com_amap_api_location_AMapLocationClientOption_AMapLocationMode
|
||||
.Hight_Accuracy);
|
||||
break;
|
||||
// 低功耗定位模式:不会使用GPS和其他传感器,只会使用网络定位(Wi-Fi和基站定位);
|
||||
case LocationAccuracy.Low:
|
||||
await options.setLocationMode(
|
||||
com_amap_api_location_AMapLocationClientOption_AMapLocationMode
|
||||
.Battery_Saving);
|
||||
break;
|
||||
case LocationAccuracy.DeviceSensor:
|
||||
await options.setLocationMode(
|
||||
com_amap_api_location_AMapLocationClientOption_AMapLocationMode
|
||||
.Device_Sensors);
|
||||
break;
|
||||
}
|
||||
// 是否返回地址描述
|
||||
if (needAddress != null) await options.setNeedAddress(needAddress);
|
||||
// 设置定位请求超时时间,默认为30秒。
|
||||
if (timeout != null) await options.setHttpTimeOut(timeout.inSeconds);
|
||||
// 设置定位间隔
|
||||
if (interval != null) await options.setInterval(interval);
|
||||
|
||||
await options.setSensorEnable(true);
|
||||
|
||||
// 设置选项
|
||||
await _androidClient?.setLocationOption(options);
|
||||
|
||||
// 开始定位
|
||||
await _androidClient?.startLocation();
|
||||
|
||||
yield* _locationController!.stream;
|
||||
} else if (Platform.isIOS) {
|
||||
// 设置定位模式
|
||||
switch (mode) {
|
||||
// 高精度定位模式:会同时使用网络定位和GPS定位,优先返回最高精度的定位结果,以及对应的地址描述信息。
|
||||
case LocationAccuracy.High:
|
||||
await _iosClient?.set_desiredAccuracy(10);
|
||||
break;
|
||||
// 低功耗定位模式:不会使用GPS和其他传感器,只会使用网络定位(Wi-Fi和基站定位);
|
||||
case LocationAccuracy.Low:
|
||||
case LocationAccuracy.DeviceSensor:
|
||||
await _iosClient?.set_desiredAccuracy(100);
|
||||
break;
|
||||
}
|
||||
// 设置定位请求超时时间,默认为30秒。
|
||||
if (timeout != null) {
|
||||
await _iosClient?.set_locationTimeout(timeout.inSeconds);
|
||||
}
|
||||
// 设定定位的最小更新距离
|
||||
if (distanceFilter != null) {
|
||||
await _iosClient?.set_distanceFilter(distanceFilter);
|
||||
}
|
||||
|
||||
// 设置回调
|
||||
_iosLocationDelegate ??= await AMapLocationManagerDelegate.anonymous__();
|
||||
_iosLocationDelegate!.amapLocationManager_didUpdateLocation_reGeocode =
|
||||
(_, location, regeocode) async {
|
||||
final latitude = await location!.coordinate.then((it) => it.latitude);
|
||||
final longitude = await location.coordinate.then((it) => it.longitude);
|
||||
if (!_locationController!.isClosed) {
|
||||
_locationController!.add(Location(
|
||||
address: await regeocode?.get_formattedAddress(),
|
||||
latLng: LatLng(await latitude ?? 0, await longitude ?? 0),
|
||||
altitude: await location.altitude,
|
||||
bearing: await location.course,
|
||||
country: await regeocode?.get_country(),
|
||||
province: await regeocode?.get_province(),
|
||||
city: await regeocode?.get_city(),
|
||||
cityCode: await regeocode?.get_citycode(),
|
||||
adCode: await regeocode?.get_adcode(),
|
||||
district: await regeocode?.get_district(),
|
||||
poiName: await regeocode?.get_POIName(),
|
||||
street: await regeocode?.get_street(),
|
||||
streetNumber: await regeocode?.get_number(),
|
||||
aoiName: await regeocode?.get_AOIName(),
|
||||
accuracy: await location.horizontalAccuracy,
|
||||
speed: await location.speed,
|
||||
));
|
||||
}
|
||||
};
|
||||
await _iosClient?.set_delegate(_iosLocationDelegate!);
|
||||
await _iosClient?.set_locatingWithReGeocode(true);
|
||||
await _iosClient?.startUpdatingLocation();
|
||||
|
||||
yield* _locationController!.stream;
|
||||
}
|
||||
}
|
||||
|
||||
/// 停止定位
|
||||
Future<void> stopLocation() {
|
||||
return platform(
|
||||
android: (pool) async {
|
||||
await _locationController?.close();
|
||||
_locationController = null;
|
||||
|
||||
await _androidClient?.stopLocation();
|
||||
},
|
||||
ios: (pool) async {
|
||||
await _locationController?.close();
|
||||
_locationController = null;
|
||||
|
||||
await _iosClient?.stopUpdatingLocation();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// 开启后台定位
|
||||
Future<void> enableBackgroundLocation(
|
||||
int id,
|
||||
BackgroundNotification bgNotification,
|
||||
) {
|
||||
return platform(
|
||||
android: (pool) async {
|
||||
final notification = await android_app_Notification.create(
|
||||
contentTitle: bgNotification.contentTitle,
|
||||
contentText: bgNotification.contentText,
|
||||
when: bgNotification.when,
|
||||
channelId: bgNotification.channelId,
|
||||
channelName: bgNotification.channelName,
|
||||
enableLights: bgNotification.enableLights,
|
||||
showBadge: bgNotification.showBadge,
|
||||
);
|
||||
await checkClient();
|
||||
await _androidClient?.enableBackgroundLocation(id, notification);
|
||||
pool..add(notification);
|
||||
},
|
||||
ios: (pool) async {
|
||||
await _iosClient?.set_allowsBackgroundLocationUpdates(true);
|
||||
await _iosClient?.set_pausesLocationUpdatesAutomatically(false);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// 关闭后台定位
|
||||
Future<void> disableBackgroundLocation(bool var1) {
|
||||
return platform(
|
||||
android: (pool) async {
|
||||
await checkClient();
|
||||
await _androidClient?.disableBackgroundLocation(var1);
|
||||
},
|
||||
ios: (pool) async {
|
||||
await _iosClient?.set_allowsBackgroundLocationUpdates(false);
|
||||
await _iosClient?.set_pausesLocationUpdatesAutomatically(true);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// 确保client不为空
|
||||
Future<void> checkClient() async {
|
||||
if (Platform.isAndroid) {
|
||||
// 获取上下文, 这里获取的是Application
|
||||
final context = await android_app_Application.get();
|
||||
|
||||
// 创建定位客户端
|
||||
_androidClient ??= await com_amap_api_location_AMapLocationClient
|
||||
.create__android_content_Context(context);
|
||||
} else if (Platform.isIOS) {
|
||||
_iosClient ??= await AMapLocationManager.create__();
|
||||
}
|
||||
}
|
||||
|
||||
void initAndroidListener() {
|
||||
if (Platform.isAndroid) {
|
||||
// 电子围栏回调
|
||||
MethodChannel(
|
||||
'com.amap.api.fence.GeoFenceClient::addGeoFenceX::Callback',
|
||||
kAmapLocationFluttifyMethodCodec,
|
||||
).setMethodCallHandler((call) async {
|
||||
if (call.method ==
|
||||
'Callback::com.amap.api.fence.GeoFenceClient::addGeoFenceX') {
|
||||
final args = await call.arguments as Map;
|
||||
final status = args['status'] as int;
|
||||
final customId = args['customId'] as String;
|
||||
final fenceId = args['fenceId'] as String;
|
||||
debugPrint(
|
||||
'收到围栏消息: status: $status, customId: $customId, fenceId:$fenceId');
|
||||
final fence = com_amap_api_fence_GeoFence()
|
||||
..refId = (args['fence'] as Ref).refId;
|
||||
_geoFenceEventController?.add(
|
||||
GeoFenceEvent(
|
||||
customId: customId,
|
||||
fenceId: fenceId,
|
||||
status: GeoFenceStatusX.fromAndroid(status),
|
||||
genFence: GeoFence.android(fence),
|
||||
),
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// 创建圆形电子围栏
|
||||
Stream<GeoFenceEvent> addCircleGeoFence({
|
||||
required LatLng center,
|
||||
required double radius,
|
||||
String customId = '',
|
||||
List<GeoFenceActiveAction> activeActions = const [
|
||||
GeoFenceActiveAction.In,
|
||||
GeoFenceActiveAction.Out,
|
||||
GeoFenceActiveAction.Stayed,
|
||||
],
|
||||
}) async* {
|
||||
_geoFenceEventController ??= StreamController<GeoFenceEvent>.broadcast();
|
||||
|
||||
if (Platform.isAndroid) {
|
||||
final context = await android_app_Application.get();
|
||||
_androidGeoFenceClient ??= await com_amap_api_fence_GeoFenceClient
|
||||
.create__android_content_Context(context);
|
||||
|
||||
final point = await com_amap_api_location_DPoint.create__double__double(
|
||||
center.latitude, center.longitude);
|
||||
|
||||
await _androidGeoFenceClient?.addCircleGeoFence(
|
||||
activeActions.getActiveAction(),
|
||||
point,
|
||||
radius,
|
||||
customId,
|
||||
);
|
||||
} else if (Platform.isIOS) {
|
||||
_iosGeoFenceClient ??= await AMapGeoFenceManager.create__();
|
||||
|
||||
_iosGeoFenceDelegate ??= await AMapGeoFenceManagerDelegate.anonymous__();
|
||||
_iosGeoFenceDelegate!
|
||||
.amapGeoFenceManager_didGeoFencesStatusChangedForRegion_customID_error =
|
||||
(_, region, customId, error) async {
|
||||
final status = await region!.get_fenceStatus();
|
||||
_geoFenceEventController?.add(
|
||||
GeoFenceEvent(
|
||||
customId: customId,
|
||||
fenceId: await region.get_identifier(),
|
||||
status: GeoFenceStatusX.fromIOS(status!),
|
||||
genFence: GeoFence.ios(region),
|
||||
),
|
||||
);
|
||||
};
|
||||
_iosGeoFenceClient!.set_delegate(_iosGeoFenceDelegate!);
|
||||
|
||||
await _iosGeoFenceClient
|
||||
?.set_activeActionX(activeActions.getActiveAction());
|
||||
|
||||
await _iosGeoFenceClient?.set_allowsBackgroundLocationUpdates(true);
|
||||
|
||||
final point = await CLLocationCoordinate2D.create(
|
||||
center.latitude,
|
||||
center.longitude,
|
||||
);
|
||||
|
||||
await _iosGeoFenceClient
|
||||
?.addCircleRegionForMonitoringWithCenter_radius_customID(
|
||||
point, radius, customId);
|
||||
} else {
|
||||
throw '未实现的平台';
|
||||
}
|
||||
|
||||
yield* _geoFenceEventController!.stream;
|
||||
}
|
||||
|
||||
/// 创POI电子围栏
|
||||
Stream<GeoFenceEvent> addPoiGeoFence({
|
||||
required String keyword,
|
||||
String poiType = '',
|
||||
String city = '',
|
||||
int aroundRadius = 10,
|
||||
String customId = '',
|
||||
List<GeoFenceActiveAction> activeActions = const [
|
||||
GeoFenceActiveAction.In,
|
||||
GeoFenceActiveAction.Out,
|
||||
GeoFenceActiveAction.Stayed,
|
||||
],
|
||||
}) async* {
|
||||
_geoFenceEventController ??= StreamController<GeoFenceEvent>.broadcast();
|
||||
|
||||
if (Platform.isAndroid) {
|
||||
final context = await android_app_Application.get();
|
||||
_androidGeoFenceClient ??= await com_amap_api_fence_GeoFenceClient
|
||||
.create__android_content_Context(context);
|
||||
|
||||
await _androidGeoFenceClient?.addPoiGeoFence(
|
||||
keyword: keyword,
|
||||
poiType: poiType,
|
||||
city: city,
|
||||
aroundRadius: aroundRadius,
|
||||
customId: customId,
|
||||
activeAction: activeActions.getActiveAction(),
|
||||
);
|
||||
} else if (Platform.isIOS) {
|
||||
_iosGeoFenceClient ??= await AMapGeoFenceManager.create__();
|
||||
_iosGeoFenceDelegate ??= await AMapGeoFenceManagerDelegate.anonymous__();
|
||||
|
||||
await _iosGeoFenceClient?.set_delegate(
|
||||
_iosGeoFenceDelegate!
|
||||
..amapGeoFenceManager_didGeoFencesStatusChangedForRegion_customID_error =
|
||||
(_, region, customId, error) async {
|
||||
final status = await region!.get_fenceStatus();
|
||||
_geoFenceEventController?.add(
|
||||
GeoFenceEvent(
|
||||
customId: customId,
|
||||
fenceId: await region.get_identifier(),
|
||||
status: GeoFenceStatusX.fromIOS(status!),
|
||||
genFence: GeoFence.ios(region),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
await _iosGeoFenceClient
|
||||
?.set_activeActionX(activeActions.getActiveAction());
|
||||
|
||||
await _iosGeoFenceClient?.set_allowsBackgroundLocationUpdates(true);
|
||||
|
||||
await _iosGeoFenceClient
|
||||
?.addKeywordPOIRegionForMonitoringWithKeyword_POIType_city_size_customID(
|
||||
keyword,
|
||||
poiType,
|
||||
city,
|
||||
aroundRadius,
|
||||
customId,
|
||||
);
|
||||
} else {
|
||||
throw '未实现的平台';
|
||||
}
|
||||
|
||||
yield* _geoFenceEventController!.stream;
|
||||
}
|
||||
|
||||
/// 创建多边形电子围栏
|
||||
Stream<GeoFenceEvent> addPolygonGeoFence({
|
||||
required List<LatLng> pointList,
|
||||
String customId = '',
|
||||
List<GeoFenceActiveAction> activeActions = const [
|
||||
GeoFenceActiveAction.In,
|
||||
GeoFenceActiveAction.Out,
|
||||
GeoFenceActiveAction.Stayed,
|
||||
],
|
||||
}) async* {
|
||||
_geoFenceEventController ??= StreamController<GeoFenceEvent>.broadcast();
|
||||
|
||||
final latitudeList = pointList.map((e) => e.latitude).toList();
|
||||
final longitudeList = pointList.map((e) => e.longitude).toList();
|
||||
|
||||
if (Platform.isAndroid) {
|
||||
final context = await android_app_Application.get();
|
||||
_androidGeoFenceClient ??= await com_amap_api_fence_GeoFenceClient
|
||||
.create__android_content_Context(context);
|
||||
|
||||
final _pointList = await com_amap_api_location_DPoint
|
||||
.create_batch__double__double(latitudeList, longitudeList);
|
||||
|
||||
await _androidGeoFenceClient?.addPolygonGeoFence(
|
||||
polygon: _pointList,
|
||||
customId: customId,
|
||||
activeAction: activeActions.getActiveAction(),
|
||||
);
|
||||
} else if (Platform.isIOS) {
|
||||
_iosGeoFenceClient ??= await AMapGeoFenceManager.create__();
|
||||
_iosGeoFenceDelegate ??= await AMapGeoFenceManagerDelegate.anonymous__();
|
||||
|
||||
await _iosGeoFenceClient?.set_delegate(
|
||||
_iosGeoFenceDelegate!
|
||||
..amapGeoFenceManager_didGeoFencesStatusChangedForRegion_customID_error =
|
||||
(_, region, customId, error) async {
|
||||
final status = await region!.get_fenceStatus();
|
||||
_geoFenceEventController?.add(
|
||||
GeoFenceEvent(
|
||||
customId: customId,
|
||||
fenceId: await region.get_identifier(),
|
||||
status: GeoFenceStatusX.fromIOS(status!),
|
||||
genFence: GeoFence.ios(region),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
await _iosGeoFenceClient
|
||||
?.set_activeActionX(activeActions.getActiveAction());
|
||||
await _iosGeoFenceClient?.set_allowsBackgroundLocationUpdates(true);
|
||||
|
||||
final _pointList = await CLLocationCoordinate2D.create_batch(
|
||||
latitudeList, longitudeList);
|
||||
|
||||
await _iosGeoFenceClient
|
||||
?.addPolygonRegionForMonitoringWithCoordinates_count_customID(
|
||||
_pointList, _pointList.length, customId);
|
||||
} else {
|
||||
throw '未实现的平台';
|
||||
}
|
||||
|
||||
yield* _geoFenceEventController!.stream;
|
||||
}
|
||||
|
||||
/// 创建行政区划电子围栏
|
||||
Stream<GeoFenceEvent> addDistrictGeoFence({
|
||||
required String keyword,
|
||||
String customId = '',
|
||||
List<GeoFenceActiveAction> activeActions = const [
|
||||
GeoFenceActiveAction.In,
|
||||
GeoFenceActiveAction.Out,
|
||||
GeoFenceActiveAction.Stayed,
|
||||
],
|
||||
}) async* {
|
||||
_geoFenceEventController ??= StreamController<GeoFenceEvent>.broadcast();
|
||||
|
||||
if (Platform.isAndroid) {
|
||||
final context = await android_app_Application.get();
|
||||
_androidGeoFenceClient ??= await com_amap_api_fence_GeoFenceClient
|
||||
.create__android_content_Context(context);
|
||||
|
||||
await _androidGeoFenceClient?.addDistrictGeoFence(
|
||||
keyword: keyword,
|
||||
customId: customId,
|
||||
activeAction: activeActions.getActiveAction(),
|
||||
);
|
||||
} else if (Platform.isIOS) {
|
||||
_iosGeoFenceClient ??= await AMapGeoFenceManager.create__();
|
||||
_iosGeoFenceDelegate ??= await AMapGeoFenceManagerDelegate.anonymous__();
|
||||
|
||||
await _iosGeoFenceClient?.set_delegate(
|
||||
_iosGeoFenceDelegate!
|
||||
..amapGeoFenceManager_didGeoFencesStatusChangedForRegion_customID_error =
|
||||
(_, region, customId, error) async {
|
||||
final status = await region!.get_fenceStatus();
|
||||
_geoFenceEventController?.add(
|
||||
GeoFenceEvent(
|
||||
customId: customId,
|
||||
fenceId: await region.get_identifier(),
|
||||
status: GeoFenceStatusX.fromIOS(status!),
|
||||
genFence: GeoFence.ios(region),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
await _iosGeoFenceClient
|
||||
?.set_activeActionX(activeActions.getActiveAction());
|
||||
await _iosGeoFenceClient?.set_allowsBackgroundLocationUpdates(true);
|
||||
await _iosGeoFenceClient
|
||||
?.addDistrictRegionForMonitoringWithDistrictName_customID(
|
||||
keyword, customId);
|
||||
} else {
|
||||
throw '未实现的平台';
|
||||
}
|
||||
|
||||
yield* _geoFenceEventController!.stream;
|
||||
}
|
||||
|
||||
/// 删除单个围栏
|
||||
Future<void> removeGeoFence(GeoFence geoFence) async {
|
||||
return platform(
|
||||
android: (pool) async {
|
||||
await _androidGeoFenceClient
|
||||
?.removeGeoFence__com_amap_api_fence_GeoFence(
|
||||
geoFence.androidModel!);
|
||||
},
|
||||
ios: (pool) async {
|
||||
await _iosGeoFenceClient?.removeTheGeoFenceRegion(geoFence.iosModel!);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// 删除所有围栏
|
||||
Future<void> removeAllGeoFence() async {
|
||||
return platform(
|
||||
android: (pool) async {
|
||||
await _androidGeoFenceClient?.removeGeoFence();
|
||||
},
|
||||
ios: (pool) async {
|
||||
await _iosGeoFenceClient?.removeAllGeoFenceRegions();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// 释放对象, 如果[AmapLocationDisposeMixin]不能满足需求时再使用这个方法
|
||||
Future<void> dispose() async {
|
||||
await _locationController?.close();
|
||||
_locationController = null;
|
||||
|
||||
await _geoFenceEventController?.close();
|
||||
_geoFenceEventController = null;
|
||||
|
||||
// 取消注册广播
|
||||
if (Platform.isAndroid) {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'com.amap.api.fence.GeoFenceClient::unregisterBroadcastReceiver');
|
||||
}
|
||||
|
||||
await _androidClient?.onDestroy();
|
||||
await _androidClient?.release__();
|
||||
await _iosClient?.release__();
|
||||
|
||||
final isCurrentPlugin = (Ref it) => it.tag__ == 'amap_location_fluttify';
|
||||
await gGlobalReleasePool.where(isCurrentPlugin).release_batch();
|
||||
gGlobalReleasePool.removeWhere(isCurrentPlugin);
|
||||
|
||||
_androidClient = null;
|
||||
_iosClient = null;
|
||||
}
|
||||
}
|
26
lib/src/facade/enums.dart
Normal file
26
lib/src/facade/enums.dart
Normal file
@ -0,0 +1,26 @@
|
||||
/// 定位模式
|
||||
enum LocationAccuracy {
|
||||
/// 高
|
||||
High,
|
||||
|
||||
/// 低
|
||||
Low,
|
||||
|
||||
/// 设备传感器 仅android
|
||||
DeviceSensor,
|
||||
}
|
||||
|
||||
/// 电子围栏激活动作
|
||||
enum GeoFenceActiveAction {
|
||||
In,
|
||||
Out,
|
||||
Stayed,
|
||||
}
|
||||
|
||||
/// 电子围栏状态
|
||||
enum GeoFenceStatus {
|
||||
Unknown,
|
||||
In,
|
||||
Out,
|
||||
Stayed,
|
||||
}
|
131
lib/src/facade/extensions.dart
Normal file
131
lib/src/facade/extensions.dart
Normal file
@ -0,0 +1,131 @@
|
||||
// ignore_for_file: non_constant_identifier_names
|
||||
import 'package:amap_location_fluttify/src/android/android.export.g.dart';
|
||||
import 'package:amap_location_fluttify/src/ios/ios.export.g.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
import 'enums.dart';
|
||||
|
||||
extension AMapGeoFenceManagerX on AMapGeoFenceManager {
|
||||
// 由于ios端的枚举实际上是由int构成的, 所以枚举值拿来`或`, 但是dart这边枚举就是枚举, 或了之后就只能是int了
|
||||
// 这里需要加一个传递int值的相同方法
|
||||
Future<void> set_activeActionX(int activeAction) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'AMapGeoFenceManager::set_activeAction',
|
||||
{'__this__': this, "activeAction": activeAction},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
extension GeoFenceStatusX on GeoFenceStatus {
|
||||
static GeoFenceStatus fromAndroid(int androidModel) {
|
||||
return GeoFenceStatus.values[androidModel];
|
||||
}
|
||||
|
||||
static GeoFenceStatus fromIOS(AMapGeoFenceRegionStatus iosModel) {
|
||||
switch (iosModel) {
|
||||
case AMapGeoFenceRegionStatus.AMapGeoFenceRegionStatusUnknown:
|
||||
return GeoFenceStatus.Unknown;
|
||||
case AMapGeoFenceRegionStatus.AMapGeoFenceRegionStatusInside:
|
||||
return GeoFenceStatus.In;
|
||||
case AMapGeoFenceRegionStatus.AMapGeoFenceRegionStatusOutside:
|
||||
return GeoFenceStatus.Out;
|
||||
case AMapGeoFenceRegionStatus.AMapGeoFenceRegionStatusStayed:
|
||||
return GeoFenceStatus.Stayed;
|
||||
default:
|
||||
return GeoFenceStatus.Unknown;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension com_amap_api_fence_GeoFenceClient_X
|
||||
on com_amap_api_fence_GeoFenceClient {
|
||||
Future<void> addCircleGeoFence(
|
||||
int activeAction,
|
||||
com_amap_api_location_DPoint center,
|
||||
double radius,
|
||||
String customId,
|
||||
) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'com.amap.api.fence.GeoFenceClient::addCircleGeoFenceX',
|
||||
{
|
||||
'__this__': this,
|
||||
'activeAction': activeAction,
|
||||
'center': center,
|
||||
'radius': radius,
|
||||
'customId': customId,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> addPoiGeoFence({
|
||||
required String keyword,
|
||||
String? poiType,
|
||||
String? city,
|
||||
int? aroundRadius,
|
||||
String customId = '',
|
||||
int? activeAction,
|
||||
}) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'com.amap.api.fence.GeoFenceClient::addPoiGeoFenceX',
|
||||
{
|
||||
'__this__': this,
|
||||
'activeAction': activeAction,
|
||||
'keyword': keyword,
|
||||
'poiType': poiType,
|
||||
'city': city,
|
||||
'size': aroundRadius,
|
||||
'customId': customId,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> addPolygonGeoFence({
|
||||
required List<com_amap_api_location_DPoint> polygon,
|
||||
String customId = '',
|
||||
int? activeAction,
|
||||
}) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'com.amap.api.fence.GeoFenceClient::addPolygonGeoFenceX',
|
||||
{
|
||||
'__this__': this,
|
||||
'polygon': polygon,
|
||||
'customId': customId,
|
||||
'activeAction': activeAction,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> addDistrictGeoFence({
|
||||
required String keyword,
|
||||
String customId = '',
|
||||
required int activeAction,
|
||||
}) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'com.amap.api.fence.GeoFenceClient::addDistrictGeoFenceX',
|
||||
{
|
||||
'__this__': this,
|
||||
'keyword': keyword,
|
||||
'customId': customId,
|
||||
'activeAction': activeAction,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
extension ListX on List<GeoFenceActiveAction> {
|
||||
int getActiveAction() {
|
||||
debugPrint('激活动作: $this');
|
||||
int activeAction = 0;
|
||||
if (contains(GeoFenceActiveAction.In)) {
|
||||
activeAction |= com_amap_api_fence_GeoFenceClient.GEOFENCE_IN;
|
||||
}
|
||||
if (contains(GeoFenceActiveAction.Out)) {
|
||||
activeAction |= com_amap_api_fence_GeoFenceClient.GEOFENCE_OUT;
|
||||
}
|
||||
if (contains(GeoFenceActiveAction.Stayed)) {
|
||||
activeAction |= com_amap_api_fence_GeoFenceClient.GEOFENCE_STAYED;
|
||||
}
|
||||
debugPrint('激活动作解析结果: $activeAction');
|
||||
return activeAction;
|
||||
}
|
||||
}
|
135
lib/src/facade/models.dart
Normal file
135
lib/src/facade/models.dart
Normal file
@ -0,0 +1,135 @@
|
||||
import 'package:amap_core_fluttify/amap_core_fluttify.dart';
|
||||
import 'package:amap_location_fluttify/amap_location_fluttify.dart';
|
||||
import 'package:amap_location_fluttify/src/android/android.export.g.dart';
|
||||
import 'package:amap_location_fluttify/src/ios/ios.export.g.dart';
|
||||
|
||||
/// 定位结果 model
|
||||
class Location {
|
||||
Location({
|
||||
this.address,
|
||||
this.latLng,
|
||||
this.altitude,
|
||||
this.bearing,
|
||||
this.country,
|
||||
this.province,
|
||||
this.city,
|
||||
this.cityCode,
|
||||
this.adCode,
|
||||
this.district,
|
||||
this.poiName,
|
||||
this.street,
|
||||
this.streetNumber,
|
||||
this.aoiName,
|
||||
this.accuracy,
|
||||
this.speed,
|
||||
});
|
||||
|
||||
/// 地址全称
|
||||
String? address;
|
||||
|
||||
/// 经纬度
|
||||
LatLng? latLng;
|
||||
|
||||
/// 海拔
|
||||
double? altitude;
|
||||
|
||||
/// 设备朝向/移动方向
|
||||
double? bearing;
|
||||
|
||||
/// 国家
|
||||
String? country;
|
||||
|
||||
/// 省份
|
||||
String? province;
|
||||
|
||||
/// 城市
|
||||
String? city;
|
||||
|
||||
/// 城市编号
|
||||
String? cityCode;
|
||||
|
||||
/// 邮编
|
||||
String? adCode;
|
||||
|
||||
/// 区域
|
||||
String? district;
|
||||
|
||||
/// poi名称
|
||||
String? poiName;
|
||||
|
||||
/// 街道
|
||||
String? street;
|
||||
|
||||
/// 街道号
|
||||
String? streetNumber;
|
||||
|
||||
/// aoi名称
|
||||
String? aoiName;
|
||||
|
||||
/// 精度
|
||||
double? accuracy;
|
||||
|
||||
/// 速度
|
||||
double? speed;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Location{\naddress: $address, \nlatLng: ${latLng?.latitude}, ${latLng?.longitude}, \naltitude: $altitude, \nbearing: $bearing, \ncountry: $country, \nprovince: $province, \ncity: $city, \ncityCode: $cityCode, \nadCode: $adCode, \ndistrict: $district, \npoiName: $poiName, \nstreet: $street, \nstreetNumber: $streetNumber, \naoiName: $aoiName, \naccuracy: $accuracy\n}';
|
||||
}
|
||||
}
|
||||
|
||||
/// 后台定位notification
|
||||
class BackgroundNotification {
|
||||
BackgroundNotification({
|
||||
required this.contentTitle,
|
||||
required this.contentText,
|
||||
this.when,
|
||||
required this.channelId,
|
||||
required this.channelName,
|
||||
this.enableLights = true,
|
||||
this.showBadge = true,
|
||||
});
|
||||
|
||||
String contentTitle;
|
||||
String contentText;
|
||||
int? when;
|
||||
String channelId;
|
||||
String channelName;
|
||||
bool enableLights;
|
||||
bool showBadge;
|
||||
}
|
||||
|
||||
class GeoFenceEvent {
|
||||
final String? customId;
|
||||
final String? fenceId;
|
||||
final GeoFenceStatus? status;
|
||||
final GeoFence? genFence;
|
||||
|
||||
GeoFenceEvent({
|
||||
this.customId,
|
||||
this.fenceId,
|
||||
this.status,
|
||||
this.genFence,
|
||||
});
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'GeoFenceEvent{customId: $customId, fenceId: $fenceId, status: $status, genFence: $genFence}';
|
||||
}
|
||||
}
|
||||
|
||||
class GeoFence {
|
||||
final com_amap_api_fence_GeoFence? androidModel;
|
||||
final AMapGeoFenceRegion? iosModel;
|
||||
|
||||
GeoFence.android(this.androidModel) : this.iosModel = null;
|
||||
|
||||
GeoFence.ios(this.iosModel) : this.androidModel = null;
|
||||
|
||||
Future<String?> get customId async {
|
||||
return platform(
|
||||
android: (pool) => androidModel!.getCustomId(),
|
||||
ios: (pool) => iosModel!.get_customID(),
|
||||
);
|
||||
}
|
||||
}
|
15
lib/src/facade/shared.g.dart
Normal file
15
lib/src/facade/shared.g.dart
Normal file
@ -0,0 +1,15 @@
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:foundation_fluttify/foundation_fluttify.dart';
|
||||
import 'package:amap_location_fluttify/src/ios/ios.export.g.dart';
|
||||
import 'package:amap_location_fluttify/src/android/android.export.g.dart';
|
||||
|
||||
const kAmapLocationFluttifyMessageCodec = FluttifyMessageCodec(tag: 'amap_location_fluttify'/*, androidCaster: AmapLocationFluttifyAndroidAs, iosCaster: AmapLocationFluttifyIOSAs*/);
|
||||
const kAmapLocationFluttifyMethodCodec = StandardMethodCodec(kAmapLocationFluttifyMessageCodec);
|
||||
const kAmapLocationFluttifyChannel = MethodChannel('me.yohom/amap_location_fluttify', kAmapLocationFluttifyMethodCodec);
|
||||
const kAmapLocationFluttifyProjectName = 'amap_location_fluttify';
|
||||
|
||||
Future<void> releaseAmapLocationFluttifyPool() async {
|
||||
final isCurrentPlugin = (Ref it) => it.tag__ == kAmapLocationFluttifyProjectName;
|
||||
await gGlobalReleasePool.where(isCurrentPlugin).release_batch();
|
||||
gGlobalReleasePool.removeWhere(isCurrentPlugin);
|
||||
}
|
35
lib/src/ios/AMapGeoFenceActiveAction.g.dart
Normal file
35
lib/src/ios/AMapGeoFenceActiveAction.g.dart
Normal file
@ -0,0 +1,35 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum AMapGeoFenceActiveAction {
|
||||
AMapGeoFenceActiveActionNone /* 0 */,
|
||||
AMapGeoFenceActiveActionInside /* 1<<0 */,
|
||||
AMapGeoFenceActiveActionOutside /* 1<<1 */,
|
||||
AMapGeoFenceActiveActionStayed /* 1<<2 */
|
||||
}
|
||||
|
||||
extension AMapGeoFenceActiveActionToX on AMapGeoFenceActiveAction {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case AMapGeoFenceActiveAction.AMapGeoFenceActiveActionNone: return 0;
|
||||
case AMapGeoFenceActiveAction.AMapGeoFenceActiveActionInside: return 1<<0;
|
||||
case AMapGeoFenceActiveAction.AMapGeoFenceActiveActionOutside: return 1<<1;
|
||||
case AMapGeoFenceActiveAction.AMapGeoFenceActiveActionStayed: return 1<<2;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapGeoFenceActiveActionFromX on int {
|
||||
AMapGeoFenceActiveAction toAMapGeoFenceActiveAction() {
|
||||
switch (this) {
|
||||
case 0: return AMapGeoFenceActiveAction.AMapGeoFenceActiveActionNone;
|
||||
case 1<<0: return AMapGeoFenceActiveAction.AMapGeoFenceActiveActionInside;
|
||||
case 1<<1: return AMapGeoFenceActiveAction.AMapGeoFenceActiveActionOutside;
|
||||
case 1<<2: return AMapGeoFenceActiveAction.AMapGeoFenceActiveActionStayed;
|
||||
default: return AMapGeoFenceActiveAction.values[this + 0];
|
||||
}
|
||||
}
|
||||
}
|
103
lib/src/ios/AMapGeoFenceCircleRegion.g.dart
Normal file
103
lib/src/ios/AMapGeoFenceCircleRegion.g.dart
Normal file
@ -0,0 +1,103 @@
|
||||
// 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 AMapGeoFenceCircleRegion extends AMapGeoFenceRegion with NSCopying {
|
||||
//region constants
|
||||
static const String name__ = 'AMapGeoFenceCircleRegion';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<AMapGeoFenceCircleRegion> create__({ bool init = true /* ios only */ }) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createAMapGeoFenceCircleRegion',
|
||||
{'init': init}
|
||||
);
|
||||
return AmapLocationFluttifyIOSAs<AMapGeoFenceCircleRegion>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<AMapGeoFenceCircleRegion>> create_batch__(int length, { bool init = true /* ios only */ }) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchAMapGeoFenceCircleRegion',
|
||||
{'length': length, 'init': init}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyIOSAs<AMapGeoFenceCircleRegion>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<AMapGeoFenceCircleRegion>()
|
||||
.toList() ?? <AMapGeoFenceCircleRegion>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
Future<CLLocationCoordinate2D?> get_center() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceCircleRegion::get_center", {'__this__': this});
|
||||
return AmapLocationFluttifyIOSAs<CLLocationCoordinate2D>(__result__);
|
||||
}
|
||||
|
||||
Future<double?> get_radius() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceCircleRegion::get_radius", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AMapGeoFenceCircleRegion{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapGeoFenceCircleRegion_Batch on List<AMapGeoFenceCircleRegion?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
Future<List<CLLocationCoordinate2D?>> get_center_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceCircleRegion::get_center_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => AmapLocationFluttifyIOSAs<CLLocationCoordinate2D>(__result__)).cast<CLLocationCoordinate2D?>().toList();
|
||||
}
|
||||
|
||||
Future<List<double?>> get_radius_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceCircleRegion::get_radius_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
}
|
93
lib/src/ios/AMapGeoFenceDistrictRegion.g.dart
Normal file
93
lib/src/ios/AMapGeoFenceDistrictRegion.g.dart
Normal file
@ -0,0 +1,93 @@
|
||||
// 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 AMapGeoFenceDistrictRegion extends AMapGeoFenceRegion with NSCopying {
|
||||
//region constants
|
||||
static const String name__ = 'AMapGeoFenceDistrictRegion';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<AMapGeoFenceDistrictRegion> create__({ bool init = true /* ios only */ }) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createAMapGeoFenceDistrictRegion',
|
||||
{'init': init}
|
||||
);
|
||||
return AmapLocationFluttifyIOSAs<AMapGeoFenceDistrictRegion>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<AMapGeoFenceDistrictRegion>> create_batch__(int length, { bool init = true /* ios only */ }) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchAMapGeoFenceDistrictRegion',
|
||||
{'length': length, 'init': init}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyIOSAs<AMapGeoFenceDistrictRegion>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<AMapGeoFenceDistrictRegion>()
|
||||
.toList() ?? <AMapGeoFenceDistrictRegion>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
Future<AMapLocationDistrictItem?> get_districtItem() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceDistrictRegion::get_districtItem", {'__this__': this});
|
||||
return AmapLocationFluttifyIOSAs<AMapLocationDistrictItem>(__result__);
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AMapGeoFenceDistrictRegion{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapGeoFenceDistrictRegion_Batch on List<AMapGeoFenceDistrictRegion?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
Future<List<AMapLocationDistrictItem?>> get_districtItem_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceDistrictRegion::get_districtItem_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => AmapLocationFluttifyIOSAs<AMapLocationDistrictItem>(__result__)).cast<AMapLocationDistrictItem?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
}
|
44
lib/src/ios/AMapGeoFenceErrorCode.g.dart
Normal file
44
lib/src/ios/AMapGeoFenceErrorCode.g.dart
Normal file
@ -0,0 +1,44 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum AMapGeoFenceErrorCode {
|
||||
AMapGeoFenceErrorUnknown /* 1 */,
|
||||
AMapGeoFenceErrorInvalidParameter /* 2 */,
|
||||
AMapGeoFenceErrorFailureConnection /* 3 */,
|
||||
AMapGeoFenceErrorFailureAuth /* 4 */,
|
||||
AMapGeoFenceErrorNoValidFence /* 5 */,
|
||||
AMapGeoFenceErroFailureLocating /* 6 */,
|
||||
AMapGeoFenceErroFailureFullAccuracyLocating /* 7 */
|
||||
}
|
||||
|
||||
extension AMapGeoFenceErrorCodeToX on AMapGeoFenceErrorCode {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case AMapGeoFenceErrorCode.AMapGeoFenceErrorUnknown: return 1;
|
||||
case AMapGeoFenceErrorCode.AMapGeoFenceErrorInvalidParameter: return 2;
|
||||
case AMapGeoFenceErrorCode.AMapGeoFenceErrorFailureConnection: return 3;
|
||||
case AMapGeoFenceErrorCode.AMapGeoFenceErrorFailureAuth: return 4;
|
||||
case AMapGeoFenceErrorCode.AMapGeoFenceErrorNoValidFence: return 5;
|
||||
case AMapGeoFenceErrorCode.AMapGeoFenceErroFailureLocating: return 6;
|
||||
case AMapGeoFenceErrorCode.AMapGeoFenceErroFailureFullAccuracyLocating: return 7;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapGeoFenceErrorCodeFromX on int {
|
||||
AMapGeoFenceErrorCode toAMapGeoFenceErrorCode() {
|
||||
switch (this) {
|
||||
case 1: return AMapGeoFenceErrorCode.AMapGeoFenceErrorUnknown;
|
||||
case 2: return AMapGeoFenceErrorCode.AMapGeoFenceErrorInvalidParameter;
|
||||
case 3: return AMapGeoFenceErrorCode.AMapGeoFenceErrorFailureConnection;
|
||||
case 4: return AMapGeoFenceErrorCode.AMapGeoFenceErrorFailureAuth;
|
||||
case 5: return AMapGeoFenceErrorCode.AMapGeoFenceErrorNoValidFence;
|
||||
case 6: return AMapGeoFenceErrorCode.AMapGeoFenceErroFailureLocating;
|
||||
case 7: return AMapGeoFenceErrorCode.AMapGeoFenceErroFailureFullAccuracyLocating;
|
||||
default: return AMapGeoFenceErrorCode.values[this + 1];
|
||||
}
|
||||
}
|
||||
}
|
611
lib/src/ios/AMapGeoFenceManager.g.dart
Normal file
611
lib/src/ios/AMapGeoFenceManager.g.dart
Normal file
@ -0,0 +1,611 @@
|
||||
// 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 AMapGeoFenceManager extends NSObject {
|
||||
//region constants
|
||||
static const String name__ = 'AMapGeoFenceManager';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<AMapGeoFenceManager> create__({ bool init = true /* ios only */ }) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createAMapGeoFenceManager',
|
||||
{'init': init}
|
||||
);
|
||||
return AmapLocationFluttifyIOSAs<AMapGeoFenceManager>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<AMapGeoFenceManager>> create_batch__(int length, { bool init = true /* ios only */ }) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchAMapGeoFenceManager',
|
||||
{'length': length, 'init': init}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyIOSAs<AMapGeoFenceManager>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<AMapGeoFenceManager>()
|
||||
.toList() ?? <AMapGeoFenceManager>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
Future<AMapGeoFenceActiveAction?> get_activeAction() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceManager::get_activeAction", {'__this__': this});
|
||||
return (__result__ as int).toAMapGeoFenceActiveAction();
|
||||
}
|
||||
|
||||
Future<bool?> get_pausesLocationUpdatesAutomatically() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceManager::get_pausesLocationUpdatesAutomatically", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<bool?> get_allowsBackgroundLocationUpdates() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceManager::get_allowsBackgroundLocationUpdates", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<bool?> get_detectRiskOfFakeLocation() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceManager::get_detectRiskOfFakeLocation", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_delegate(AMapGeoFenceManagerDelegate delegate) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::set_delegate', <String, dynamic>{'__this__': this, "delegate": delegate});
|
||||
}
|
||||
|
||||
Future<void> set_activeAction(AMapGeoFenceActiveAction activeAction) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::set_activeAction', <String, dynamic>{'__this__': this, "activeAction": activeAction.toValue()});
|
||||
}
|
||||
|
||||
Future<void> set_pausesLocationUpdatesAutomatically(bool pausesLocationUpdatesAutomatically) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::set_pausesLocationUpdatesAutomatically', <String, dynamic>{'__this__': this, "pausesLocationUpdatesAutomatically": pausesLocationUpdatesAutomatically});
|
||||
}
|
||||
|
||||
Future<void> set_allowsBackgroundLocationUpdates(bool allowsBackgroundLocationUpdates) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::set_allowsBackgroundLocationUpdates', <String, dynamic>{'__this__': this, "allowsBackgroundLocationUpdates": allowsBackgroundLocationUpdates});
|
||||
}
|
||||
|
||||
Future<void> set_detectRiskOfFakeLocation(bool detectRiskOfFakeLocation) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::set_detectRiskOfFakeLocation', <String, dynamic>{'__this__': this, "detectRiskOfFakeLocation": detectRiskOfFakeLocation});
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<void> addCircleRegionForMonitoringWithCenter_radius_customID(CLLocationCoordinate2D center, double radius, String customID) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::addCircleRegionForMonitoringWithCenter([\'radius\':$radius, \'customID\':$customID])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::addCircleRegionForMonitoringWithCenter_radius_customID', {"center": center, "radius": radius, "customID": customID, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> addPolygonRegionForMonitoringWithCoordinates_count_customID(List<CLLocationCoordinate2D> coordinates, int count, String customID) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::addPolygonRegionForMonitoringWithCoordinates([\'count\':$count, \'customID\':$customID])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::addPolygonRegionForMonitoringWithCoordinates_count_customID', {"coordinates": coordinates, "count": count, "customID": customID, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> addKeywordPOIRegionForMonitoringWithKeyword_POIType_city_size_customID(String keyword, String type, String city, int size, String customID) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::addKeywordPOIRegionForMonitoringWithKeyword([\'keyword\':$keyword, \'type\':$type, \'city\':$city, \'size\':$size, \'customID\':$customID])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::addKeywordPOIRegionForMonitoringWithKeyword_POIType_city_size_customID', {"keyword": keyword, "type": type, "city": city, "size": size, "customID": customID, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> addAroundPOIRegionForMonitoringWithLocationPoint_aroundRadius_keyword_POIType_size_customID(CLLocationCoordinate2D locationPoint, int aroundRadius, String keyword, String type, int size, String customID) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::addAroundPOIRegionForMonitoringWithLocationPoint([\'aroundRadius\':$aroundRadius, \'keyword\':$keyword, \'type\':$type, \'size\':$size, \'customID\':$customID])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::addAroundPOIRegionForMonitoringWithLocationPoint_aroundRadius_keyword_POIType_size_customID', {"locationPoint": locationPoint, "aroundRadius": aroundRadius, "keyword": keyword, "type": type, "size": size, "customID": customID, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> addDistrictRegionForMonitoringWithDistrictName_customID(String districtName, String customID) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::addDistrictRegionForMonitoringWithDistrictName([\'districtName\':$districtName, \'customID\':$customID])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::addDistrictRegionForMonitoringWithDistrictName_customID', {"districtName": districtName, "customID": customID, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<AMapGeoFenceRegionActiveStatus?> statusWithGeoFenceRegion(AMapGeoFenceRegion region) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::statusWithGeoFenceRegion([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::statusWithGeoFenceRegion', {"region": region, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return (__result__ as int).toAMapGeoFenceRegionActiveStatus();
|
||||
}
|
||||
|
||||
|
||||
Future<List<dynamic>?> geoFenceRegionsWithCustomID(String customID) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::geoFenceRegionsWithCustomID([\'customID\':$customID])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::geoFenceRegionsWithCustomID', {"customID": customID, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return (__result__ as List?)?.cast<dynamic>();
|
||||
}
|
||||
|
||||
|
||||
Future<List<dynamic>?> monitoringGeoFenceRegionsWithCustomID(String customID) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::monitoringGeoFenceRegionsWithCustomID([\'customID\':$customID])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::monitoringGeoFenceRegionsWithCustomID', {"customID": customID, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return (__result__ as List?)?.cast<dynamic>();
|
||||
}
|
||||
|
||||
|
||||
Future<List<dynamic>?> pausedGeoFenceRegionsWithCustomID(String customID) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::pausedGeoFenceRegionsWithCustomID([\'customID\':$customID])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::pausedGeoFenceRegionsWithCustomID', {"customID": customID, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return (__result__ as List?)?.cast<dynamic>();
|
||||
}
|
||||
|
||||
|
||||
Future<List<dynamic>?> pauseGeoFenceRegionsWithCustomID(String customID) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::pauseGeoFenceRegionsWithCustomID([\'customID\':$customID])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::pauseGeoFenceRegionsWithCustomID', {"customID": customID, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return (__result__ as List?)?.cast<dynamic>();
|
||||
}
|
||||
|
||||
|
||||
Future<bool?> pauseTheGeoFenceRegion(AMapGeoFenceRegion region) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::pauseTheGeoFenceRegion([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::pauseTheGeoFenceRegion', {"region": region, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<List<dynamic>?> startGeoFenceRegionsWithCustomID(String customID) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::startGeoFenceRegionsWithCustomID([\'customID\':$customID])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::startGeoFenceRegionsWithCustomID', {"customID": customID, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return (__result__ as List?)?.cast<dynamic>();
|
||||
}
|
||||
|
||||
|
||||
Future<bool?> startTheGeoFenceRegion(AMapGeoFenceRegion region) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::startTheGeoFenceRegion([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::startTheGeoFenceRegion', {"region": region, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> removeTheGeoFenceRegion(AMapGeoFenceRegion region) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::removeTheGeoFenceRegion([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::removeTheGeoFenceRegion', {"region": region, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> removeGeoFenceRegionsWithCustomID(String customID) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::removeGeoFenceRegionsWithCustomID([\'customID\':$customID])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::removeGeoFenceRegionsWithCustomID', {"customID": customID, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> removeAllGeoFenceRegions() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapGeoFenceManager@$refId::removeAllGeoFenceRegions([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::removeAllGeoFenceRegions', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AMapGeoFenceManager{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapGeoFenceManager_Batch on List<AMapGeoFenceManager?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
Future<List<AMapGeoFenceActiveAction?>> get_activeAction_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceManager::get_activeAction_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => (__result__ as int).toAMapGeoFenceActiveAction()).cast<AMapGeoFenceActiveAction?>().toList();
|
||||
}
|
||||
|
||||
Future<List<bool?>> get_pausesLocationUpdatesAutomatically_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceManager::get_pausesLocationUpdatesAutomatically_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
Future<List<bool?>> get_allowsBackgroundLocationUpdates_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceManager::get_allowsBackgroundLocationUpdates_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
Future<List<bool?>> get_detectRiskOfFakeLocation_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceManager::get_detectRiskOfFakeLocation_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_activeAction_batch(List<AMapGeoFenceActiveAction> activeAction) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::set_activeAction_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "activeAction": activeAction[__i__].toValue()}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_pausesLocationUpdatesAutomatically_batch(List<bool> pausesLocationUpdatesAutomatically) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::set_pausesLocationUpdatesAutomatically_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "pausesLocationUpdatesAutomatically": pausesLocationUpdatesAutomatically[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_allowsBackgroundLocationUpdates_batch(List<bool> allowsBackgroundLocationUpdates) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::set_allowsBackgroundLocationUpdates_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "allowsBackgroundLocationUpdates": allowsBackgroundLocationUpdates[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_detectRiskOfFakeLocation_batch(List<bool> detectRiskOfFakeLocation) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::set_detectRiskOfFakeLocation_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "detectRiskOfFakeLocation": detectRiskOfFakeLocation[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<List<void>> addCircleRegionForMonitoringWithCenter_radius_customID_batch(List<CLLocationCoordinate2D> center, List<double> radius, List<String> customID) async {
|
||||
assert(center.length == radius.length && radius.length == customID.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::addCircleRegionForMonitoringWithCenter_radius_customID_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"center": center[__i__], "radius": radius[__i__], "customID": customID[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> addPolygonRegionForMonitoringWithCoordinates_count_customID_batch(List<List<CLLocationCoordinate2D>> coordinates, List<int> count, List<String> customID) async {
|
||||
assert(coordinates.length == count.length && count.length == customID.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::addPolygonRegionForMonitoringWithCoordinates_count_customID_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"coordinates": coordinates[__i__], "count": count[__i__], "customID": customID[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> addKeywordPOIRegionForMonitoringWithKeyword_POIType_city_size_customID_batch(List<String> keyword, List<String> type, List<String> city, List<int> size, List<String> customID) async {
|
||||
assert(keyword.length == type.length && type.length == city.length && city.length == size.length && size.length == customID.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::addKeywordPOIRegionForMonitoringWithKeyword_POIType_city_size_customID_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"keyword": keyword[__i__], "type": type[__i__], "city": city[__i__], "size": size[__i__], "customID": customID[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> addAroundPOIRegionForMonitoringWithLocationPoint_aroundRadius_keyword_POIType_size_customID_batch(List<CLLocationCoordinate2D> locationPoint, List<int> aroundRadius, List<String> keyword, List<String> type, List<int> size, List<String> customID) async {
|
||||
assert(locationPoint.length == aroundRadius.length && aroundRadius.length == keyword.length && keyword.length == type.length && type.length == size.length && size.length == customID.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::addAroundPOIRegionForMonitoringWithLocationPoint_aroundRadius_keyword_POIType_size_customID_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"locationPoint": locationPoint[__i__], "aroundRadius": aroundRadius[__i__], "keyword": keyword[__i__], "type": type[__i__], "size": size[__i__], "customID": customID[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> addDistrictRegionForMonitoringWithDistrictName_customID_batch(List<String> districtName, List<String> customID) async {
|
||||
assert(districtName.length == customID.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::addDistrictRegionForMonitoringWithDistrictName_customID_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"districtName": districtName[__i__], "customID": customID[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<AMapGeoFenceRegionActiveStatus?>> statusWithGeoFenceRegion_batch(List<AMapGeoFenceRegion> region) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::statusWithGeoFenceRegion_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"region": region[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => (__result__ as int).toAMapGeoFenceRegionActiveStatus()).cast<AMapGeoFenceRegionActiveStatus?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<List<dynamic>?>> geoFenceRegionsWithCustomID_batch(List<String> customID) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::geoFenceRegionsWithCustomID_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"customID": customID[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => (__result__ as List?)?.cast<dynamic>()).cast<List<dynamic>?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<List<dynamic>?>> monitoringGeoFenceRegionsWithCustomID_batch(List<String> customID) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::monitoringGeoFenceRegionsWithCustomID_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"customID": customID[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => (__result__ as List?)?.cast<dynamic>()).cast<List<dynamic>?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<List<dynamic>?>> pausedGeoFenceRegionsWithCustomID_batch(List<String> customID) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::pausedGeoFenceRegionsWithCustomID_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"customID": customID[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => (__result__ as List?)?.cast<dynamic>()).cast<List<dynamic>?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<List<dynamic>?>> pauseGeoFenceRegionsWithCustomID_batch(List<String> customID) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::pauseGeoFenceRegionsWithCustomID_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"customID": customID[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => (__result__ as List?)?.cast<dynamic>()).cast<List<dynamic>?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<bool?>> pauseTheGeoFenceRegion_batch(List<AMapGeoFenceRegion> region) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::pauseTheGeoFenceRegion_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"region": region[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<List<dynamic>?>> startGeoFenceRegionsWithCustomID_batch(List<String> customID) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::startGeoFenceRegionsWithCustomID_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"customID": customID[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => (__result__ as List?)?.cast<dynamic>()).cast<List<dynamic>?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<bool?>> startTheGeoFenceRegion_batch(List<AMapGeoFenceRegion> region) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::startTheGeoFenceRegion_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"region": region[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> removeTheGeoFenceRegion_batch(List<AMapGeoFenceRegion> region) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::removeTheGeoFenceRegion_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"region": region[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> removeGeoFenceRegionsWithCustomID_batch(List<String> customID) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::removeGeoFenceRegionsWithCustomID_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"customID": customID[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> removeAllGeoFenceRegions_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManager::removeAllGeoFenceRegions_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
91
lib/src/ios/AMapGeoFenceManagerDelegate.g.dart
Normal file
91
lib/src/ios/AMapGeoFenceManagerDelegate.g.dart
Normal file
@ -0,0 +1,91 @@
|
||||
// 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 _AMapGeoFenceManagerDelegate_SUB extends NSObject with AMapGeoFenceManagerDelegate {}
|
||||
|
||||
mixin AMapGeoFenceManagerDelegate on NSObject {
|
||||
|
||||
|
||||
static AMapGeoFenceManagerDelegate subInstance() => _AMapGeoFenceManagerDelegate_SUB();
|
||||
|
||||
static Future<AMapGeoFenceManagerDelegate> anonymous__() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceManagerDelegate::createAnonymous__');
|
||||
|
||||
final __object__ = AmapLocationFluttifyIOSAs<AMapGeoFenceManagerDelegate>(__result__)!;
|
||||
|
||||
// handle callback
|
||||
MethodChannel('AMapGeoFenceManagerDelegate::Callback@${__object__.refId}', kAmapLocationFluttifyMethodCodec)
|
||||
.setMethodCallHandler((methodCall) async {
|
||||
try {
|
||||
final args = methodCall.arguments as Map;
|
||||
switch (methodCall.method) {
|
||||
case 'amapGeoFenceManager_doRequireLocationAuth':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapGeoFenceManager_doRequireLocationAuth?.call([\'manager\':${args['manager']}, \'locationManager\':${args['locationManager']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapGeoFenceManager_doRequireLocationAuth?.call(AmapLocationFluttifyIOSAs<AMapGeoFenceManager>(args['manager']), AmapLocationFluttifyIOSAs<CLLocationManager>(args['locationManager']));
|
||||
break;
|
||||
case 'amapGeoFenceManager_didAddRegionForMonitoringFinished_customID_error':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapGeoFenceManager_didAddRegionForMonitoringFinished_customID_error?.call([\'manager\':${args['manager']}, \'regions\':${args['regions']}, \'customID\':${args['customID']}, \'error\':${args['error']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapGeoFenceManager_didAddRegionForMonitoringFinished_customID_error?.call(AmapLocationFluttifyIOSAs<AMapGeoFenceManager>(args['manager']), (args['regions'] as List? ?? []).map((it) => AmapLocationFluttifyIOSAs<AMapGeoFenceRegion>(it)).where((e) => e != null).cast<AMapGeoFenceRegion>().toList(), args['customID'], AmapLocationFluttifyIOSAs<NSError>(args['error']));
|
||||
break;
|
||||
case 'amapGeoFenceManager_didGeoFencesStatusChangedForRegion_customID_error':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapGeoFenceManager_didGeoFencesStatusChangedForRegion_customID_error?.call([\'manager\':${args['manager']}, \'region\':${args['region']}, \'customID\':${args['customID']}, \'error\':${args['error']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapGeoFenceManager_didGeoFencesStatusChangedForRegion_customID_error?.call(AmapLocationFluttifyIOSAs<AMapGeoFenceManager>(args['manager']), AmapLocationFluttifyIOSAs<AMapGeoFenceRegion>(args['region']), args['customID'], AmapLocationFluttifyIOSAs<NSError>(args['error']));
|
||||
break;
|
||||
default:
|
||||
throw MissingPluginException('方法${methodCall.method}未实现');
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint(e.toString());
|
||||
rethrow;
|
||||
}
|
||||
});
|
||||
|
||||
return __object__;
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Future<void> Function(AMapGeoFenceManager? manager, CLLocationManager? locationManager, void Function(NSError? error) completion)? amapLocationManager_doRequireTemporaryFullAccuracyAuth_completion;
|
||||
|
||||
Future<void> Function(AMapGeoFenceManager? manager, CLLocationManager? locationManager)? amapGeoFenceManager_doRequireLocationAuth;
|
||||
|
||||
Future<void> Function(AMapGeoFenceManager? manager, List<AMapGeoFenceRegion>? regions, String? customID, NSError? error)? amapGeoFenceManager_didAddRegionForMonitoringFinished_customID_error;
|
||||
|
||||
Future<void> Function(AMapGeoFenceManager? manager, AMapGeoFenceRegion? region, String? customID, NSError? error)? amapGeoFenceManager_didGeoFencesStatusChangedForRegion_customID_error;
|
||||
|
||||
}
|
||||
|
93
lib/src/ios/AMapGeoFencePOIRegion.g.dart
Normal file
93
lib/src/ios/AMapGeoFencePOIRegion.g.dart
Normal file
@ -0,0 +1,93 @@
|
||||
// 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 AMapGeoFencePOIRegion extends AMapGeoFenceCircleRegion with NSCopying {
|
||||
//region constants
|
||||
static const String name__ = 'AMapGeoFencePOIRegion';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<AMapGeoFencePOIRegion> create__({ bool init = true /* ios only */ }) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createAMapGeoFencePOIRegion',
|
||||
{'init': init}
|
||||
);
|
||||
return AmapLocationFluttifyIOSAs<AMapGeoFencePOIRegion>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<AMapGeoFencePOIRegion>> create_batch__(int length, { bool init = true /* ios only */ }) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchAMapGeoFencePOIRegion',
|
||||
{'length': length, 'init': init}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyIOSAs<AMapGeoFencePOIRegion>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<AMapGeoFencePOIRegion>()
|
||||
.toList() ?? <AMapGeoFencePOIRegion>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
Future<AMapLocationPOIItem?> get_POIItem() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFencePOIRegion::get_POIItem", {'__this__': this});
|
||||
return AmapLocationFluttifyIOSAs<AMapLocationPOIItem>(__result__);
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AMapGeoFencePOIRegion{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapGeoFencePOIRegion_Batch on List<AMapGeoFencePOIRegion?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
Future<List<AMapLocationPOIItem?>> get_POIItem_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFencePOIRegion::get_POIItem_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => AmapLocationFluttifyIOSAs<AMapLocationPOIItem>(__result__)).cast<AMapLocationPOIItem?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
}
|
103
lib/src/ios/AMapGeoFencePolygonRegion.g.dart
Normal file
103
lib/src/ios/AMapGeoFencePolygonRegion.g.dart
Normal file
@ -0,0 +1,103 @@
|
||||
// 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 AMapGeoFencePolygonRegion extends AMapGeoFenceRegion with NSCopying {
|
||||
//region constants
|
||||
static const String name__ = 'AMapGeoFencePolygonRegion';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<AMapGeoFencePolygonRegion> create__({ bool init = true /* ios only */ }) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createAMapGeoFencePolygonRegion',
|
||||
{'init': init}
|
||||
);
|
||||
return AmapLocationFluttifyIOSAs<AMapGeoFencePolygonRegion>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<AMapGeoFencePolygonRegion>> create_batch__(int length, { bool init = true /* ios only */ }) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchAMapGeoFencePolygonRegion',
|
||||
{'length': length, 'init': init}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyIOSAs<AMapGeoFencePolygonRegion>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<AMapGeoFencePolygonRegion>()
|
||||
.toList() ?? <AMapGeoFencePolygonRegion>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
Future<List<CLLocationCoordinate2D>?> get_coordinates() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFencePolygonRegion::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("AMapGeoFencePolygonRegion::get_count", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AMapGeoFencePolygonRegion{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapGeoFencePolygonRegion_Batch on List<AMapGeoFencePolygonRegion?> {
|
||||
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("AMapGeoFencePolygonRegion::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("AMapGeoFencePolygonRegion::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
|
||||
|
||||
//endregion
|
||||
}
|
161
lib/src/ios/AMapGeoFenceRegion.g.dart
Normal file
161
lib/src/ios/AMapGeoFenceRegion.g.dart
Normal file
@ -0,0 +1,161 @@
|
||||
// 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 AMapGeoFenceRegion extends NSObject with NSCopying {
|
||||
//region constants
|
||||
static const String name__ = 'AMapGeoFenceRegion';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<AMapGeoFenceRegion> create__({ bool init = true /* ios only */ }) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createAMapGeoFenceRegion',
|
||||
{'init': init}
|
||||
);
|
||||
return AmapLocationFluttifyIOSAs<AMapGeoFenceRegion>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<AMapGeoFenceRegion>> create_batch__(int length, { bool init = true /* ios only */ }) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchAMapGeoFenceRegion',
|
||||
{'length': length, 'init': init}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyIOSAs<AMapGeoFenceRegion>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<AMapGeoFenceRegion>()
|
||||
.toList() ?? <AMapGeoFenceRegion>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
Future<String?> get_identifier() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceRegion::get_identifier", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_customID() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceRegion::get_customID", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<AMapGeoFenceRegionStatus?> get_fenceStatus() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceRegion::get_fenceStatus", {'__this__': this});
|
||||
return (__result__ as int).toAMapGeoFenceRegionStatus();
|
||||
}
|
||||
|
||||
Future<AMapGeoFenceRegionType?> get_regionType() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceRegion::get_regionType", {'__this__': this});
|
||||
return (__result__ as int).toAMapGeoFenceRegionType();
|
||||
}
|
||||
|
||||
Future<CLLocation?> get_currentLocation() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceRegion::get_currentLocation", {'__this__': this});
|
||||
return AmapLocationFluttifyIOSAs<CLLocation>(__result__);
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_fenceStatus(AMapGeoFenceRegionStatus fenceStatus) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceRegion::set_fenceStatus', <String, dynamic>{'__this__': this, "fenceStatus": fenceStatus.toValue()});
|
||||
}
|
||||
|
||||
Future<void> set_regionType(AMapGeoFenceRegionType regionType) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceRegion::set_regionType', <String, dynamic>{'__this__': this, "regionType": regionType.toValue()});
|
||||
}
|
||||
|
||||
Future<void> set_currentLocation(CLLocation currentLocation) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceRegion::set_currentLocation', <String, dynamic>{'__this__': this, "currentLocation": currentLocation});
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AMapGeoFenceRegion{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapGeoFenceRegion_Batch on List<AMapGeoFenceRegion?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
Future<List<String?>> get_identifier_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceRegion::get_identifier_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_customID_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceRegion::get_customID_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<AMapGeoFenceRegionStatus?>> get_fenceStatus_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceRegion::get_fenceStatus_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => (__result__ as int).toAMapGeoFenceRegionStatus()).cast<AMapGeoFenceRegionStatus?>().toList();
|
||||
}
|
||||
|
||||
Future<List<AMapGeoFenceRegionType?>> get_regionType_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceRegion::get_regionType_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => (__result__ as int).toAMapGeoFenceRegionType()).cast<AMapGeoFenceRegionType?>().toList();
|
||||
}
|
||||
|
||||
Future<List<CLLocation?>> get_currentLocation_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapGeoFenceRegion::get_currentLocation_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => AmapLocationFluttifyIOSAs<CLLocation>(__result__)).cast<CLLocation?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_fenceStatus_batch(List<AMapGeoFenceRegionStatus> fenceStatus) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceRegion::set_fenceStatus_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "fenceStatus": fenceStatus[__i__].toValue()}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_regionType_batch(List<AMapGeoFenceRegionType> regionType) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceRegion::set_regionType_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "regionType": regionType[__i__].toValue()}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_currentLocation_batch(List<CLLocation> currentLocation) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapGeoFenceRegion::set_currentLocation_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "currentLocation": currentLocation[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
}
|
32
lib/src/ios/AMapGeoFenceRegionActiveStatus.g.dart
Normal file
32
lib/src/ios/AMapGeoFenceRegionActiveStatus.g.dart
Normal file
@ -0,0 +1,32 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum AMapGeoFenceRegionActiveStatus {
|
||||
AMapGeoFenceRegionActiveUNMonitor /* 0 */,
|
||||
AMapGeoFenceRegionActiveMonitoring /* 1<<0 */,
|
||||
AMapGeoFenceRegionActivePaused /* 1<<1 */
|
||||
}
|
||||
|
||||
extension AMapGeoFenceRegionActiveStatusToX on AMapGeoFenceRegionActiveStatus {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case AMapGeoFenceRegionActiveStatus.AMapGeoFenceRegionActiveUNMonitor: return 0;
|
||||
case AMapGeoFenceRegionActiveStatus.AMapGeoFenceRegionActiveMonitoring: return 1<<0;
|
||||
case AMapGeoFenceRegionActiveStatus.AMapGeoFenceRegionActivePaused: return 1<<1;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapGeoFenceRegionActiveStatusFromX on int {
|
||||
AMapGeoFenceRegionActiveStatus toAMapGeoFenceRegionActiveStatus() {
|
||||
switch (this) {
|
||||
case 0: return AMapGeoFenceRegionActiveStatus.AMapGeoFenceRegionActiveUNMonitor;
|
||||
case 1<<0: return AMapGeoFenceRegionActiveStatus.AMapGeoFenceRegionActiveMonitoring;
|
||||
case 1<<1: return AMapGeoFenceRegionActiveStatus.AMapGeoFenceRegionActivePaused;
|
||||
default: return AMapGeoFenceRegionActiveStatus.values[this + 0];
|
||||
}
|
||||
}
|
||||
}
|
35
lib/src/ios/AMapGeoFenceRegionStatus.g.dart
Normal file
35
lib/src/ios/AMapGeoFenceRegionStatus.g.dart
Normal file
@ -0,0 +1,35 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum AMapGeoFenceRegionStatus {
|
||||
AMapGeoFenceRegionStatusUnknown /* 0 */,
|
||||
AMapGeoFenceRegionStatusInside /* 1 */,
|
||||
AMapGeoFenceRegionStatusOutside /* 2 */,
|
||||
AMapGeoFenceRegionStatusStayed /* 3 */
|
||||
}
|
||||
|
||||
extension AMapGeoFenceRegionStatusToX on AMapGeoFenceRegionStatus {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case AMapGeoFenceRegionStatus.AMapGeoFenceRegionStatusUnknown: return 0;
|
||||
case AMapGeoFenceRegionStatus.AMapGeoFenceRegionStatusInside: return 1;
|
||||
case AMapGeoFenceRegionStatus.AMapGeoFenceRegionStatusOutside: return 2;
|
||||
case AMapGeoFenceRegionStatus.AMapGeoFenceRegionStatusStayed: return 3;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapGeoFenceRegionStatusFromX on int {
|
||||
AMapGeoFenceRegionStatus toAMapGeoFenceRegionStatus() {
|
||||
switch (this) {
|
||||
case 0: return AMapGeoFenceRegionStatus.AMapGeoFenceRegionStatusUnknown;
|
||||
case 1: return AMapGeoFenceRegionStatus.AMapGeoFenceRegionStatusInside;
|
||||
case 2: return AMapGeoFenceRegionStatus.AMapGeoFenceRegionStatusOutside;
|
||||
case 3: return AMapGeoFenceRegionStatus.AMapGeoFenceRegionStatusStayed;
|
||||
default: return AMapGeoFenceRegionStatus.values[this + 0];
|
||||
}
|
||||
}
|
||||
}
|
35
lib/src/ios/AMapGeoFenceRegionType.g.dart
Normal file
35
lib/src/ios/AMapGeoFenceRegionType.g.dart
Normal file
@ -0,0 +1,35 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum AMapGeoFenceRegionType {
|
||||
AMapGeoFenceRegionTypeCircle /* 0 */,
|
||||
AMapGeoFenceRegionTypePolygon /* 1 */,
|
||||
AMapGeoFenceRegionTypePOI /* 2 */,
|
||||
AMapGeoFenceRegionTypeDistrict /* 3 */
|
||||
}
|
||||
|
||||
extension AMapGeoFenceRegionTypeToX on AMapGeoFenceRegionType {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case AMapGeoFenceRegionType.AMapGeoFenceRegionTypeCircle: return 0;
|
||||
case AMapGeoFenceRegionType.AMapGeoFenceRegionTypePolygon: return 1;
|
||||
case AMapGeoFenceRegionType.AMapGeoFenceRegionTypePOI: return 2;
|
||||
case AMapGeoFenceRegionType.AMapGeoFenceRegionTypeDistrict: return 3;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapGeoFenceRegionTypeFromX on int {
|
||||
AMapGeoFenceRegionType toAMapGeoFenceRegionType() {
|
||||
switch (this) {
|
||||
case 0: return AMapGeoFenceRegionType.AMapGeoFenceRegionTypeCircle;
|
||||
case 1: return AMapGeoFenceRegionType.AMapGeoFenceRegionTypePolygon;
|
||||
case 2: return AMapGeoFenceRegionType.AMapGeoFenceRegionTypePOI;
|
||||
case 3: return AMapGeoFenceRegionType.AMapGeoFenceRegionTypeDistrict;
|
||||
default: return AMapGeoFenceRegionType.values[this + 0];
|
||||
}
|
||||
}
|
||||
}
|
30
lib/src/ios/AMapLocationAccuracyMode.g.dart
Normal file
30
lib/src/ios/AMapLocationAccuracyMode.g.dart
Normal file
@ -0,0 +1,30 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum AMapLocationAccuracyMode {
|
||||
AMapLocationFullAndReduceAccuracy /* 0 */,
|
||||
AMapLocationFullAccuracy /* null */,
|
||||
AMapLocationReduceAccuracy /* null */
|
||||
}
|
||||
|
||||
extension AMapLocationAccuracyModeToX on AMapLocationAccuracyMode {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case AMapLocationAccuracyMode.AMapLocationFullAndReduceAccuracy: return 0;
|
||||
case AMapLocationAccuracyMode.AMapLocationFullAccuracy: return AMapLocationAccuracyMode.AMapLocationFullAccuracy.index + 0;
|
||||
case AMapLocationAccuracyMode.AMapLocationReduceAccuracy: return AMapLocationAccuracyMode.AMapLocationReduceAccuracy.index + 0;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapLocationAccuracyModeFromX on int {
|
||||
AMapLocationAccuracyMode toAMapLocationAccuracyMode() {
|
||||
switch (this) {
|
||||
case 0: return AMapLocationAccuracyMode.AMapLocationFullAndReduceAccuracy;
|
||||
default: return AMapLocationAccuracyMode.values[this + 0];
|
||||
}
|
||||
}
|
||||
}
|
129
lib/src/ios/AMapLocationCircleRegion.g.dart
Normal file
129
lib/src/ios/AMapLocationCircleRegion.g.dart
Normal file
@ -0,0 +1,129 @@
|
||||
// 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 AMapLocationCircleRegion extends AMapLocationRegion with NSCopying {
|
||||
//region constants
|
||||
static const String name__ = 'AMapLocationCircleRegion';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<AMapLocationCircleRegion> create__({ bool init = true /* ios only */ }) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createAMapLocationCircleRegion',
|
||||
{'init': init}
|
||||
);
|
||||
return AmapLocationFluttifyIOSAs<AMapLocationCircleRegion>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<AMapLocationCircleRegion>> create_batch__(int length, { bool init = true /* ios only */ }) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchAMapLocationCircleRegion',
|
||||
{'length': length, 'init': init}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyIOSAs<AMapLocationCircleRegion>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<AMapLocationCircleRegion>()
|
||||
.toList() ?? <AMapLocationCircleRegion>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
Future<CLLocationCoordinate2D?> get_center() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationCircleRegion::get_center", {'__this__': this});
|
||||
return AmapLocationFluttifyIOSAs<CLLocationCoordinate2D>(__result__);
|
||||
}
|
||||
|
||||
Future<double?> get_radius() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationCircleRegion::get_radius", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<AMapLocationCircleRegion?> initWithCenter_radius_identifier(CLLocationCoordinate2D center, double radius, String identifier) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationCircleRegion@$refId::initWithCenter([\'radius\':$radius, \'identifier\':$identifier])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationCircleRegion::initWithCenter_radius_identifier', {"center": center, "radius": radius, "identifier": identifier, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return AmapLocationFluttifyIOSAs<AMapLocationCircleRegion>(__result__);
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AMapLocationCircleRegion{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapLocationCircleRegion_Batch on List<AMapLocationCircleRegion?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
Future<List<CLLocationCoordinate2D?>> get_center_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationCircleRegion::get_center_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => AmapLocationFluttifyIOSAs<CLLocationCoordinate2D>(__result__)).cast<CLLocationCoordinate2D?>().toList();
|
||||
}
|
||||
|
||||
Future<List<double?>> get_radius_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationCircleRegion::get_radius_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<List<AMapLocationCircleRegion?>> initWithCenter_radius_identifier_batch(List<CLLocationCoordinate2D> center, List<double> radius, List<String> identifier) async {
|
||||
assert(center.length == radius.length && radius.length == identifier.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationCircleRegion::initWithCenter_radius_identifier_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"center": center[__i__], "radius": radius[__i__], "identifier": identifier[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => AmapLocationFluttifyIOSAs<AMapLocationCircleRegion>(__result__)).cast<AMapLocationCircleRegion?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
38
lib/src/ios/AMapLocationCoordinateType.g.dart
Normal file
38
lib/src/ios/AMapLocationCoordinateType.g.dart
Normal file
@ -0,0 +1,38 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum AMapLocationCoordinateType {
|
||||
AMapLocationCoordinateTypeBaidu /* 0 */,
|
||||
AMapLocationCoordinateTypeMapBar /* null */,
|
||||
AMapLocationCoordinateTypeMapABC /* null */,
|
||||
AMapLocationCoordinateTypeSoSoMap /* null */,
|
||||
AMapLocationCoordinateTypeAliYun /* null */,
|
||||
AMapLocationCoordinateTypeGoogle /* null */,
|
||||
AMapLocationCoordinateTypeGPS /* null */
|
||||
}
|
||||
|
||||
extension AMapLocationCoordinateTypeToX on AMapLocationCoordinateType {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case AMapLocationCoordinateType.AMapLocationCoordinateTypeBaidu: return 0;
|
||||
case AMapLocationCoordinateType.AMapLocationCoordinateTypeMapBar: return AMapLocationCoordinateType.AMapLocationCoordinateTypeMapBar.index + 0;
|
||||
case AMapLocationCoordinateType.AMapLocationCoordinateTypeMapABC: return AMapLocationCoordinateType.AMapLocationCoordinateTypeMapABC.index + 0;
|
||||
case AMapLocationCoordinateType.AMapLocationCoordinateTypeSoSoMap: return AMapLocationCoordinateType.AMapLocationCoordinateTypeSoSoMap.index + 0;
|
||||
case AMapLocationCoordinateType.AMapLocationCoordinateTypeAliYun: return AMapLocationCoordinateType.AMapLocationCoordinateTypeAliYun.index + 0;
|
||||
case AMapLocationCoordinateType.AMapLocationCoordinateTypeGoogle: return AMapLocationCoordinateType.AMapLocationCoordinateTypeGoogle.index + 0;
|
||||
case AMapLocationCoordinateType.AMapLocationCoordinateTypeGPS: return AMapLocationCoordinateType.AMapLocationCoordinateTypeGPS.index + 0;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapLocationCoordinateTypeFromX on int {
|
||||
AMapLocationCoordinateType toAMapLocationCoordinateType() {
|
||||
switch (this) {
|
||||
case 0: return AMapLocationCoordinateType.AMapLocationCoordinateTypeBaidu;
|
||||
default: return AMapLocationCoordinateType.values[this + 0];
|
||||
}
|
||||
}
|
||||
}
|
141
lib/src/ios/AMapLocationDistrictItem.g.dart
Normal file
141
lib/src/ios/AMapLocationDistrictItem.g.dart
Normal file
@ -0,0 +1,141 @@
|
||||
// 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 AMapLocationDistrictItem extends NSObject with NSCoding, NSCopying {
|
||||
//region constants
|
||||
static const String name__ = 'AMapLocationDistrictItem';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<AMapLocationDistrictItem> create__({ bool init = true /* ios only */ }) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createAMapLocationDistrictItem',
|
||||
{'init': init}
|
||||
);
|
||||
return AmapLocationFluttifyIOSAs<AMapLocationDistrictItem>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<AMapLocationDistrictItem>> create_batch__(int length, { bool init = true /* ios only */ }) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchAMapLocationDistrictItem',
|
||||
{'length': length, 'init': init}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyIOSAs<AMapLocationDistrictItem>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<AMapLocationDistrictItem>()
|
||||
.toList() ?? <AMapLocationDistrictItem>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
Future<String?> get_cityCode() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationDistrictItem::get_cityCode", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_districtCode() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationDistrictItem::get_districtCode", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_district() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationDistrictItem::get_district", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_cityCode(String cityCode) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationDistrictItem::set_cityCode', <String, dynamic>{'__this__': this, "cityCode": cityCode});
|
||||
}
|
||||
|
||||
Future<void> set_districtCode(String districtCode) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationDistrictItem::set_districtCode', <String, dynamic>{'__this__': this, "districtCode": districtCode});
|
||||
}
|
||||
|
||||
Future<void> set_district(String district) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationDistrictItem::set_district', <String, dynamic>{'__this__': this, "district": district});
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AMapLocationDistrictItem{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapLocationDistrictItem_Batch on List<AMapLocationDistrictItem?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
Future<List<String?>> get_cityCode_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationDistrictItem::get_cityCode_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_districtCode_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationDistrictItem::get_districtCode_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_district_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationDistrictItem::get_district_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_cityCode_batch(List<String> cityCode) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationDistrictItem::set_cityCode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "cityCode": cityCode[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_districtCode_batch(List<String> districtCode) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationDistrictItem::set_districtCode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "districtCode": districtCode[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_district_batch(List<String> district) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationDistrictItem::set_district_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "district": district[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
}
|
59
lib/src/ios/AMapLocationErrorCode.g.dart
Normal file
59
lib/src/ios/AMapLocationErrorCode.g.dart
Normal file
@ -0,0 +1,59 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum AMapLocationErrorCode {
|
||||
AMapLocationErrorUnknown /* 1 */,
|
||||
AMapLocationErrorLocateFailed /* 2 */,
|
||||
AMapLocationErrorReGeocodeFailed /* 3 */,
|
||||
AMapLocationErrorTimeOut /* 4 */,
|
||||
AMapLocationErrorCanceled /* 5 */,
|
||||
AMapLocationErrorCannotFindHost /* 6 */,
|
||||
AMapLocationErrorBadURL /* 7 */,
|
||||
AMapLocationErrorNotConnectedToInternet /* 8 */,
|
||||
AMapLocationErrorCannotConnectToHost /* 9 */,
|
||||
AMapLocationErrorRegionMonitoringFailure /* 10 */,
|
||||
AMapLocationErrorRiskOfFakeLocation /* 11 */,
|
||||
AMapLocationErrorNoFullAccuracyAuth /* 12 */
|
||||
}
|
||||
|
||||
extension AMapLocationErrorCodeToX on AMapLocationErrorCode {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case AMapLocationErrorCode.AMapLocationErrorUnknown: return 1;
|
||||
case AMapLocationErrorCode.AMapLocationErrorLocateFailed: return 2;
|
||||
case AMapLocationErrorCode.AMapLocationErrorReGeocodeFailed: return 3;
|
||||
case AMapLocationErrorCode.AMapLocationErrorTimeOut: return 4;
|
||||
case AMapLocationErrorCode.AMapLocationErrorCanceled: return 5;
|
||||
case AMapLocationErrorCode.AMapLocationErrorCannotFindHost: return 6;
|
||||
case AMapLocationErrorCode.AMapLocationErrorBadURL: return 7;
|
||||
case AMapLocationErrorCode.AMapLocationErrorNotConnectedToInternet: return 8;
|
||||
case AMapLocationErrorCode.AMapLocationErrorCannotConnectToHost: return 9;
|
||||
case AMapLocationErrorCode.AMapLocationErrorRegionMonitoringFailure: return 10;
|
||||
case AMapLocationErrorCode.AMapLocationErrorRiskOfFakeLocation: return 11;
|
||||
case AMapLocationErrorCode.AMapLocationErrorNoFullAccuracyAuth: return 12;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapLocationErrorCodeFromX on int {
|
||||
AMapLocationErrorCode toAMapLocationErrorCode() {
|
||||
switch (this) {
|
||||
case 1: return AMapLocationErrorCode.AMapLocationErrorUnknown;
|
||||
case 2: return AMapLocationErrorCode.AMapLocationErrorLocateFailed;
|
||||
case 3: return AMapLocationErrorCode.AMapLocationErrorReGeocodeFailed;
|
||||
case 4: return AMapLocationErrorCode.AMapLocationErrorTimeOut;
|
||||
case 5: return AMapLocationErrorCode.AMapLocationErrorCanceled;
|
||||
case 6: return AMapLocationErrorCode.AMapLocationErrorCannotFindHost;
|
||||
case 7: return AMapLocationErrorCode.AMapLocationErrorBadURL;
|
||||
case 8: return AMapLocationErrorCode.AMapLocationErrorNotConnectedToInternet;
|
||||
case 9: return AMapLocationErrorCode.AMapLocationErrorCannotConnectToHost;
|
||||
case 10: return AMapLocationErrorCode.AMapLocationErrorRegionMonitoringFailure;
|
||||
case 11: return AMapLocationErrorCode.AMapLocationErrorRiskOfFakeLocation;
|
||||
case 12: return AMapLocationErrorCode.AMapLocationErrorNoFullAccuracyAuth;
|
||||
default: return AMapLocationErrorCode.values[this + 1];
|
||||
}
|
||||
}
|
||||
}
|
630
lib/src/ios/AMapLocationManager.g.dart
Normal file
630
lib/src/ios/AMapLocationManager.g.dart
Normal file
@ -0,0 +1,630 @@
|
||||
// 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 AMapLocationManager extends NSObject {
|
||||
//region constants
|
||||
static const String name__ = 'AMapLocationManager';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<AMapLocationManager> create__({ bool init = true /* ios only */ }) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createAMapLocationManager',
|
||||
{'init': init}
|
||||
);
|
||||
return AmapLocationFluttifyIOSAs<AMapLocationManager>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<AMapLocationManager>> create_batch__(int length, { bool init = true /* ios only */ }) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchAMapLocationManager',
|
||||
{'length': length, 'init': init}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyIOSAs<AMapLocationManager>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<AMapLocationManager>()
|
||||
.toList() ?? <AMapLocationManager>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
Future<double?> get_distanceFilter() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_distanceFilter", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<double?> get_desiredAccuracy() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_desiredAccuracy", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<bool?> get_pausesLocationUpdatesAutomatically() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_pausesLocationUpdatesAutomatically", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<bool?> get_allowsBackgroundLocationUpdates() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_allowsBackgroundLocationUpdates", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<int?> get_locationTimeout() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_locationTimeout", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<int?> get_reGeocodeTimeout() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_reGeocodeTimeout", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<bool?> get_locatingWithReGeocode() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_locatingWithReGeocode", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<AMapLocationReGeocodeLanguage?> get_reGeocodeLanguage() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_reGeocodeLanguage", {'__this__': this});
|
||||
return (__result__ as int).toAMapLocationReGeocodeLanguage();
|
||||
}
|
||||
|
||||
Future<bool?> get_detectRiskOfFakeLocation() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_detectRiskOfFakeLocation", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<AMapLocationAccuracyMode?> get_locationAccuracyMode() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_locationAccuracyMode", {'__this__': this});
|
||||
return (__result__ as int).toAMapLocationAccuracyMode();
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_delegate(AMapLocationManagerDelegate delegate) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_delegate', <String, dynamic>{'__this__': this, "delegate": delegate});
|
||||
}
|
||||
|
||||
Future<void> set_distanceFilter(double distanceFilter) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_distanceFilter', <String, dynamic>{'__this__': this, "distanceFilter": distanceFilter});
|
||||
}
|
||||
|
||||
Future<void> set_desiredAccuracy(double desiredAccuracy) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_desiredAccuracy', <String, dynamic>{'__this__': this, "desiredAccuracy": desiredAccuracy});
|
||||
}
|
||||
|
||||
Future<void> set_pausesLocationUpdatesAutomatically(bool pausesLocationUpdatesAutomatically) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_pausesLocationUpdatesAutomatically', <String, dynamic>{'__this__': this, "pausesLocationUpdatesAutomatically": pausesLocationUpdatesAutomatically});
|
||||
}
|
||||
|
||||
Future<void> set_allowsBackgroundLocationUpdates(bool allowsBackgroundLocationUpdates) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_allowsBackgroundLocationUpdates', <String, dynamic>{'__this__': this, "allowsBackgroundLocationUpdates": allowsBackgroundLocationUpdates});
|
||||
}
|
||||
|
||||
Future<void> set_locationTimeout(int locationTimeout) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_locationTimeout', <String, dynamic>{'__this__': this, "locationTimeout": locationTimeout});
|
||||
}
|
||||
|
||||
Future<void> set_reGeocodeTimeout(int reGeocodeTimeout) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_reGeocodeTimeout', <String, dynamic>{'__this__': this, "reGeocodeTimeout": reGeocodeTimeout});
|
||||
}
|
||||
|
||||
Future<void> set_locatingWithReGeocode(bool locatingWithReGeocode) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_locatingWithReGeocode', <String, dynamic>{'__this__': this, "locatingWithReGeocode": locatingWithReGeocode});
|
||||
}
|
||||
|
||||
Future<void> set_reGeocodeLanguage(AMapLocationReGeocodeLanguage reGeocodeLanguage) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_reGeocodeLanguage', <String, dynamic>{'__this__': this, "reGeocodeLanguage": reGeocodeLanguage.toValue()});
|
||||
}
|
||||
|
||||
Future<void> set_detectRiskOfFakeLocation(bool detectRiskOfFakeLocation) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_detectRiskOfFakeLocation', <String, dynamic>{'__this__': this, "detectRiskOfFakeLocation": detectRiskOfFakeLocation});
|
||||
}
|
||||
|
||||
Future<void> set_locationAccuracyMode(AMapLocationAccuracyMode locationAccuracyMode) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_locationAccuracyMode', <String, dynamic>{'__this__': this, "locationAccuracyMode": locationAccuracyMode.toValue()});
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
static Future<bool?> headingAvailable() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationManager::headingAvailable([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::headingAvailable', );
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> startUpdatingHeading() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationManager@$refId::startUpdatingHeading([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::startUpdatingHeading', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> stopUpdatingHeading() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationManager@$refId::stopUpdatingHeading([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::stopUpdatingHeading', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> dismissHeadingCalibrationDisplay() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationManager@$refId::dismissHeadingCalibrationDisplay([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::dismissHeadingCalibrationDisplay', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<bool?> requestLocationWithReGeocode_completionBlock(bool withReGeocode, void Function(CLLocation? location, AMapLocationReGeocode? regeocode, NSError? error) completionBlock) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationManager@$refId::requestLocationWithReGeocode([\'withReGeocode\':$withReGeocode])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::requestLocationWithReGeocode_completionBlock', {"withReGeocode": withReGeocode, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
MethodChannel('AMapLocatingCompletionBlock::Callback@$refId', kAmapLocationFluttifyMethodCodec)
|
||||
.setMethodCallHandler((methodCall) async {
|
||||
try {
|
||||
final args = methodCall.arguments as Map;
|
||||
switch (methodCall.method) {
|
||||
case 'AMapLocatingCompletionBlock__':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: completionBlock([\'location\':${args['location']}, \'regeocode\':${args['regeocode']}, \'error\':${args['error']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
completionBlock(AmapLocationFluttifyIOSAs<CLLocation>(args['location']), AmapLocationFluttifyIOSAs<AMapLocationReGeocode>(args['regeocode']), AmapLocationFluttifyIOSAs<NSError>(args['error']));
|
||||
break;
|
||||
default:
|
||||
throw MissingPluginException('方法${methodCall.method}未实现');
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint(e.toString());
|
||||
rethrow;
|
||||
}
|
||||
});
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> startUpdatingLocation() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationManager@$refId::startUpdatingLocation([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::startUpdatingLocation', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
Future<void> stopUpdatingLocation() async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationManager@$refId::stopUpdatingLocation([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::stopUpdatingLocation', {"__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
@deprecated
|
||||
Future<void> startMonitoringForRegion(AMapLocationRegion region) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationManager@$refId::startMonitoringForRegion([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::startMonitoringForRegion', {"region": region, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
@deprecated
|
||||
Future<void> stopMonitoringForRegion(AMapLocationRegion region) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationManager@$refId::stopMonitoringForRegion([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::stopMonitoringForRegion', {"region": region, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
@deprecated
|
||||
Future<void> requestStateForRegion(AMapLocationRegion region) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationManager@$refId::requestStateForRegion([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::requestStateForRegion', {"region": region, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
static Future<void> updatePrivacyShow_privacyInfo(AMapPrivacyShowStatus showStatus, AMapPrivacyInfoStatus containStatus) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationManager::updatePrivacyShow([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::updatePrivacyShow_privacyInfo', {"showStatus": showStatus.toValue(), "containStatus": containStatus.toValue()});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
|
||||
static Future<void> updatePrivacyAgree(AMapPrivacyAgreeStatus agreeStatus) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationManager::updatePrivacyAgree([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::updatePrivacyAgree', {"agreeStatus": agreeStatus.toValue()});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AMapLocationManager{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapLocationManager_Batch on List<AMapLocationManager?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
Future<List<double?>> get_distanceFilter_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_distanceFilter_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
|
||||
}
|
||||
|
||||
Future<List<double?>> get_desiredAccuracy_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_desiredAccuracy_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
|
||||
}
|
||||
|
||||
Future<List<bool?>> get_pausesLocationUpdatesAutomatically_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_pausesLocationUpdatesAutomatically_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
Future<List<bool?>> get_allowsBackgroundLocationUpdates_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_allowsBackgroundLocationUpdates_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
Future<List<int?>> get_locationTimeout_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_locationTimeout_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<int?>().toList();
|
||||
}
|
||||
|
||||
Future<List<int?>> get_reGeocodeTimeout_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_reGeocodeTimeout_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<int?>().toList();
|
||||
}
|
||||
|
||||
Future<List<bool?>> get_locatingWithReGeocode_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_locatingWithReGeocode_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
Future<List<AMapLocationReGeocodeLanguage?>> get_reGeocodeLanguage_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_reGeocodeLanguage_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => (__result__ as int).toAMapLocationReGeocodeLanguage()).cast<AMapLocationReGeocodeLanguage?>().toList();
|
||||
}
|
||||
|
||||
Future<List<bool?>> get_detectRiskOfFakeLocation_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_detectRiskOfFakeLocation_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
Future<List<AMapLocationAccuracyMode?>> get_locationAccuracyMode_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationManager::get_locationAccuracyMode_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => (__result__ as int).toAMapLocationAccuracyMode()).cast<AMapLocationAccuracyMode?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_distanceFilter_batch(List<double> distanceFilter) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_distanceFilter_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "distanceFilter": distanceFilter[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_desiredAccuracy_batch(List<double> desiredAccuracy) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_desiredAccuracy_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "desiredAccuracy": desiredAccuracy[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_pausesLocationUpdatesAutomatically_batch(List<bool> pausesLocationUpdatesAutomatically) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_pausesLocationUpdatesAutomatically_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "pausesLocationUpdatesAutomatically": pausesLocationUpdatesAutomatically[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_allowsBackgroundLocationUpdates_batch(List<bool> allowsBackgroundLocationUpdates) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_allowsBackgroundLocationUpdates_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "allowsBackgroundLocationUpdates": allowsBackgroundLocationUpdates[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_locationTimeout_batch(List<int> locationTimeout) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_locationTimeout_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "locationTimeout": locationTimeout[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_reGeocodeTimeout_batch(List<int> reGeocodeTimeout) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_reGeocodeTimeout_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "reGeocodeTimeout": reGeocodeTimeout[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_locatingWithReGeocode_batch(List<bool> locatingWithReGeocode) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_locatingWithReGeocode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "locatingWithReGeocode": locatingWithReGeocode[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_reGeocodeLanguage_batch(List<AMapLocationReGeocodeLanguage> reGeocodeLanguage) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_reGeocodeLanguage_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "reGeocodeLanguage": reGeocodeLanguage[__i__].toValue()}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_detectRiskOfFakeLocation_batch(List<bool> detectRiskOfFakeLocation) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_detectRiskOfFakeLocation_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "detectRiskOfFakeLocation": detectRiskOfFakeLocation[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_locationAccuracyMode_batch(List<AMapLocationAccuracyMode> locationAccuracyMode) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::set_locationAccuracyMode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "locationAccuracyMode": locationAccuracyMode[__i__].toValue()}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
static Future<List<bool?>> headingAvailable_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::headingAvailable_batch', );
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> startUpdatingHeading_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::startUpdatingHeading_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> stopUpdatingHeading_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::stopUpdatingHeading_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> dismissHeadingCalibrationDisplay_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::dismissHeadingCalibrationDisplay_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> startUpdatingLocation_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::startUpdatingLocation_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<void>> stopUpdatingLocation_batch() async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::stopUpdatingLocation_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
@deprecated
|
||||
Future<List<void>> startMonitoringForRegion_batch(List<AMapLocationRegion> region) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::startMonitoringForRegion_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"region": region[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
@deprecated
|
||||
Future<List<void>> stopMonitoringForRegion_batch(List<AMapLocationRegion> region) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::stopMonitoringForRegion_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"region": region[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
@deprecated
|
||||
Future<List<void>> requestStateForRegion_batch(List<AMapLocationRegion> region) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::requestStateForRegion_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"region": region[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
static Future<List<void>> updatePrivacyShow_privacyInfo_batch(List<AMapPrivacyShowStatus> showStatus, List<AMapPrivacyInfoStatus> containStatus) async {
|
||||
assert(showStatus.length == containStatus.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::updatePrivacyShow_privacyInfo_batch', [for (int __i__ = 0; __i__ < showStatus.length; __i__++) {"showStatus": showStatus[__i__].toValue(), "containStatus": containStatus[__i__].toValue()}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
|
||||
static Future<List<void>> updatePrivacyAgree_batch(List<AMapPrivacyAgreeStatus> agreeStatus) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManager::updatePrivacyAgree_batch', [for (int __i__ = 0; __i__ < agreeStatus.length; __i__++) {"agreeStatus": agreeStatus[__i__].toValue()}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
201
lib/src/ios/AMapLocationManagerDelegate.g.dart
Normal file
201
lib/src/ios/AMapLocationManagerDelegate.g.dart
Normal file
@ -0,0 +1,201 @@
|
||||
// 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 _AMapLocationManagerDelegate_SUB extends NSObject with AMapLocationManagerDelegate {}
|
||||
|
||||
mixin AMapLocationManagerDelegate on NSObject {
|
||||
|
||||
|
||||
static AMapLocationManagerDelegate subInstance() => _AMapLocationManagerDelegate_SUB();
|
||||
|
||||
static Future<AMapLocationManagerDelegate> anonymous__() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationManagerDelegate::createAnonymous__');
|
||||
|
||||
final __object__ = AmapLocationFluttifyIOSAs<AMapLocationManagerDelegate>(__result__)!;
|
||||
|
||||
// handle callback
|
||||
MethodChannel('AMapLocationManagerDelegate::Callback@${__object__.refId}', kAmapLocationFluttifyMethodCodec)
|
||||
.setMethodCallHandler((methodCall) async {
|
||||
try {
|
||||
final args = methodCall.arguments as Map;
|
||||
switch (methodCall.method) {
|
||||
case 'amapLocationManager_doRequireLocationAuth':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapLocationManager_doRequireLocationAuth?.call([\'manager\':${args['manager']}, \'locationManager\':${args['locationManager']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapLocationManager_doRequireLocationAuth?.call(AmapLocationFluttifyIOSAs<AMapLocationManager>(args['manager']), AmapLocationFluttifyIOSAs<CLLocationManager>(args['locationManager']));
|
||||
break;
|
||||
case 'amapLocationManager_didFailWithError':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapLocationManager_didFailWithError?.call([\'manager\':${args['manager']}, \'error\':${args['error']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapLocationManager_didFailWithError?.call(AmapLocationFluttifyIOSAs<AMapLocationManager>(args['manager']), AmapLocationFluttifyIOSAs<NSError>(args['error']));
|
||||
break;
|
||||
case 'amapLocationManager_didUpdateLocation':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapLocationManager_didUpdateLocation?.call([\'manager\':${args['manager']}, \'location\':${args['location']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapLocationManager_didUpdateLocation?.call(AmapLocationFluttifyIOSAs<AMapLocationManager>(args['manager']), AmapLocationFluttifyIOSAs<CLLocation>(args['location']));
|
||||
break;
|
||||
case 'amapLocationManager_didUpdateLocation_reGeocode':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapLocationManager_didUpdateLocation_reGeocode?.call([\'manager\':${args['manager']}, \'location\':${args['location']}, \'reGeocode\':${args['reGeocode']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapLocationManager_didUpdateLocation_reGeocode?.call(AmapLocationFluttifyIOSAs<AMapLocationManager>(args['manager']), AmapLocationFluttifyIOSAs<CLLocation>(args['location']), AmapLocationFluttifyIOSAs<AMapLocationReGeocode>(args['reGeocode']));
|
||||
break;
|
||||
case 'amapLocationManager_didChangeAuthorizationStatus':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapLocationManager_didChangeAuthorizationStatus?.call([\'manager\':${args['manager']}, \'status\':${args['status']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapLocationManager_didChangeAuthorizationStatus?.call(AmapLocationFluttifyIOSAs<AMapLocationManager>(args['manager']), (args['status'] as int).toCLAuthorizationStatus());
|
||||
break;
|
||||
case 'amapLocationManager_locationManagerDidChangeAuthorization':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapLocationManager_locationManagerDidChangeAuthorization?.call([\'manager\':${args['manager']}, \'locationManager\':${args['locationManager']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapLocationManager_locationManagerDidChangeAuthorization?.call(AmapLocationFluttifyIOSAs<AMapLocationManager>(args['manager']), AmapLocationFluttifyIOSAs<CLLocationManager>(args['locationManager']));
|
||||
break;
|
||||
case 'amapLocationManagerShouldDisplayHeadingCalibration':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapLocationManagerShouldDisplayHeadingCalibration?.call([\'manager\':${args['manager']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapLocationManagerShouldDisplayHeadingCalibration?.call(AmapLocationFluttifyIOSAs<AMapLocationManager>(args['manager']));
|
||||
break;
|
||||
case 'amapLocationManager_didUpdateHeading':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapLocationManager_didUpdateHeading?.call([\'manager\':${args['manager']}, \'newHeading\':${args['newHeading']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapLocationManager_didUpdateHeading?.call(AmapLocationFluttifyIOSAs<AMapLocationManager>(args['manager']), AmapLocationFluttifyIOSAs<CLHeading>(args['newHeading']));
|
||||
break;
|
||||
case 'amapLocationManager_didStartMonitoringForRegion':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapLocationManager_didStartMonitoringForRegion?.call([\'manager\':${args['manager']}, \'region\':${args['region']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapLocationManager_didStartMonitoringForRegion?.call(AmapLocationFluttifyIOSAs<AMapLocationManager>(args['manager']), AmapLocationFluttifyIOSAs<AMapLocationRegion>(args['region']));
|
||||
break;
|
||||
case 'amapLocationManager_didEnterRegion':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapLocationManager_didEnterRegion?.call([\'manager\':${args['manager']}, \'region\':${args['region']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapLocationManager_didEnterRegion?.call(AmapLocationFluttifyIOSAs<AMapLocationManager>(args['manager']), AmapLocationFluttifyIOSAs<AMapLocationRegion>(args['region']));
|
||||
break;
|
||||
case 'amapLocationManager_didExitRegion':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapLocationManager_didExitRegion?.call([\'manager\':${args['manager']}, \'region\':${args['region']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapLocationManager_didExitRegion?.call(AmapLocationFluttifyIOSAs<AMapLocationManager>(args['manager']), AmapLocationFluttifyIOSAs<AMapLocationRegion>(args['region']));
|
||||
break;
|
||||
case 'amapLocationManager_didDetermineState_forRegion':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapLocationManager_didDetermineState_forRegion?.call([\'manager\':${args['manager']}, \'state\':${args['state']}, \'region\':${args['region']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapLocationManager_didDetermineState_forRegion?.call(AmapLocationFluttifyIOSAs<AMapLocationManager>(args['manager']), (args['state'] as int).toAMapLocationRegionState(), AmapLocationFluttifyIOSAs<AMapLocationRegion>(args['region']));
|
||||
break;
|
||||
case 'amapLocationManager_monitoringDidFailForRegion_withError':
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart-callback: __object__.amapLocationManager_monitoringDidFailForRegion_withError?.call([\'manager\':${args['manager']}, \'region\':${args['region']}, \'error\':${args['error']}])');
|
||||
}
|
||||
|
||||
// handle the native call
|
||||
__object__.amapLocationManager_monitoringDidFailForRegion_withError?.call(AmapLocationFluttifyIOSAs<AMapLocationManager>(args['manager']), AmapLocationFluttifyIOSAs<AMapLocationRegion>(args['region']), AmapLocationFluttifyIOSAs<NSError>(args['error']));
|
||||
break;
|
||||
default:
|
||||
throw MissingPluginException('方法${methodCall.method}未实现');
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint(e.toString());
|
||||
rethrow;
|
||||
}
|
||||
});
|
||||
|
||||
return __object__;
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Future<void> Function(AMapLocationManager? manager, CLLocationManager? locationManager, void Function(NSError? error) completion)? amapLocationManager_doRequireTemporaryFullAccuracyAuth_completion;
|
||||
|
||||
Future<void> Function(AMapLocationManager? manager, CLLocationManager? locationManager)? amapLocationManager_doRequireLocationAuth;
|
||||
|
||||
Future<void> Function(AMapLocationManager? manager, NSError? error)? amapLocationManager_didFailWithError;
|
||||
|
||||
Future<void> Function(AMapLocationManager? manager, CLLocation? location)? amapLocationManager_didUpdateLocation;
|
||||
|
||||
Future<void> Function(AMapLocationManager? manager, CLLocation? location, AMapLocationReGeocode? reGeocode)? amapLocationManager_didUpdateLocation_reGeocode;
|
||||
|
||||
Future<void> Function(AMapLocationManager? manager, CLAuthorizationStatus? status)? amapLocationManager_didChangeAuthorizationStatus;
|
||||
|
||||
Future<void> Function(AMapLocationManager? manager, CLLocationManager? locationManager)? amapLocationManager_locationManagerDidChangeAuthorization;
|
||||
|
||||
Future<bool?> Function(AMapLocationManager? manager)? amapLocationManagerShouldDisplayHeadingCalibration;
|
||||
|
||||
Future<void> Function(AMapLocationManager? manager, CLHeading? newHeading)? amapLocationManager_didUpdateHeading;
|
||||
|
||||
Future<void> Function(AMapLocationManager? manager, AMapLocationRegion? region)? amapLocationManager_didStartMonitoringForRegion;
|
||||
|
||||
Future<void> Function(AMapLocationManager? manager, AMapLocationRegion? region)? amapLocationManager_didEnterRegion;
|
||||
|
||||
Future<void> Function(AMapLocationManager? manager, AMapLocationRegion? region)? amapLocationManager_didExitRegion;
|
||||
|
||||
Future<void> Function(AMapLocationManager? manager, AMapLocationRegionState? state, AMapLocationRegion? region)? amapLocationManager_didDetermineState_forRegion;
|
||||
|
||||
Future<void> Function(AMapLocationManager? manager, AMapLocationRegion? region, NSError? error)? amapLocationManager_monitoringDidFailForRegion_withError;
|
||||
|
||||
}
|
||||
|
281
lib/src/ios/AMapLocationPOIItem.g.dart
Normal file
281
lib/src/ios/AMapLocationPOIItem.g.dart
Normal file
@ -0,0 +1,281 @@
|
||||
// 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 AMapLocationPOIItem extends NSObject with NSCoding, NSCopying {
|
||||
//region constants
|
||||
static const String name__ = 'AMapLocationPOIItem';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<AMapLocationPOIItem> create__({ bool init = true /* ios only */ }) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createAMapLocationPOIItem',
|
||||
{'init': init}
|
||||
);
|
||||
return AmapLocationFluttifyIOSAs<AMapLocationPOIItem>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<AMapLocationPOIItem>> create_batch__(int length, { bool init = true /* ios only */ }) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchAMapLocationPOIItem',
|
||||
{'length': length, 'init': init}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyIOSAs<AMapLocationPOIItem>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<AMapLocationPOIItem>()
|
||||
.toList() ?? <AMapLocationPOIItem>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
Future<String?> get_pId() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_pId", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_name() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_name", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_type() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_type", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_typeCode() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_typeCode", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_address() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_address", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<AMapLocationPoint?> get_location() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_location", {'__this__': this});
|
||||
return AmapLocationFluttifyIOSAs<AMapLocationPoint>(__result__);
|
||||
}
|
||||
|
||||
Future<String?> get_tel() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_tel", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_province() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_province", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_city() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_city", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_district() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_district", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_pId(String pId) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_pId', <String, dynamic>{'__this__': this, "pId": pId});
|
||||
}
|
||||
|
||||
Future<void> set_name(String name) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_name', <String, dynamic>{'__this__': this, "name": name});
|
||||
}
|
||||
|
||||
Future<void> set_type(String type) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_type', <String, dynamic>{'__this__': this, "type": type});
|
||||
}
|
||||
|
||||
Future<void> set_typeCode(String typeCode) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_typeCode', <String, dynamic>{'__this__': this, "typeCode": typeCode});
|
||||
}
|
||||
|
||||
Future<void> set_address(String address) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_address', <String, dynamic>{'__this__': this, "address": address});
|
||||
}
|
||||
|
||||
Future<void> set_location(AMapLocationPoint location) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_location', <String, dynamic>{'__this__': this, "location": location});
|
||||
}
|
||||
|
||||
Future<void> set_tel(String tel) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_tel', <String, dynamic>{'__this__': this, "tel": tel});
|
||||
}
|
||||
|
||||
Future<void> set_province(String province) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_province', <String, dynamic>{'__this__': this, "province": province});
|
||||
}
|
||||
|
||||
Future<void> set_city(String city) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_city', <String, dynamic>{'__this__': this, "city": city});
|
||||
}
|
||||
|
||||
Future<void> set_district(String district) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_district', <String, dynamic>{'__this__': this, "district": district});
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AMapLocationPOIItem{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapLocationPOIItem_Batch on List<AMapLocationPOIItem?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
Future<List<String?>> get_pId_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_pId_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_name_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_name_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_type_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_type_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_typeCode_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_typeCode_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_address_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_address_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<AMapLocationPoint?>> get_location_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_location_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => AmapLocationFluttifyIOSAs<AMapLocationPoint>(__result__)).cast<AMapLocationPoint?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_tel_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_tel_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_province_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_province_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_city_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_city_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_district_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPOIItem::get_district_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_pId_batch(List<String> pId) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_pId_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "pId": pId[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_name_batch(List<String> name) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_name_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "name": name[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_type_batch(List<String> type) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_type_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "type": type[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_typeCode_batch(List<String> typeCode) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_typeCode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "typeCode": typeCode[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_address_batch(List<String> address) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_address_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "address": address[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_location_batch(List<AMapLocationPoint> location) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_location_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "location": location[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_tel_batch(List<String> tel) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_tel_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "tel": tel[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_province_batch(List<String> province) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_province_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "province": province[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_city_batch(List<String> city) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_city_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "city": city[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_district_batch(List<String> district) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPOIItem::set_district_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "district": district[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
}
|
147
lib/src/ios/AMapLocationPoint.g.dart
Normal file
147
lib/src/ios/AMapLocationPoint.g.dart
Normal file
@ -0,0 +1,147 @@
|
||||
// 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 AMapLocationPoint extends NSObject with NSCoding, NSCopying {
|
||||
//region constants
|
||||
static const String name__ = 'AMapLocationPoint';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<AMapLocationPoint> create__({ bool init = true /* ios only */ }) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createAMapLocationPoint',
|
||||
{'init': init}
|
||||
);
|
||||
return AmapLocationFluttifyIOSAs<AMapLocationPoint>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<AMapLocationPoint>> create_batch__(int length, { bool init = true /* ios only */ }) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchAMapLocationPoint',
|
||||
{'length': length, 'init': init}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyIOSAs<AMapLocationPoint>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<AMapLocationPoint>()
|
||||
.toList() ?? <AMapLocationPoint>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
Future<double?> get_latitude() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPoint::get_latitude", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<double?> get_longitude() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPoint::get_longitude", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_latitude(double latitude) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPoint::set_latitude', <String, dynamic>{'__this__': this, "latitude": latitude});
|
||||
}
|
||||
|
||||
Future<void> set_longitude(double longitude) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPoint::set_longitude', <String, dynamic>{'__this__': this, "longitude": longitude});
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
static Future<AMapLocationPoint?> locationWithLatitude_longitude(double lat, double lon) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationPoint::locationWithLatitude([\'lat\':$lat, \'lon\':$lon])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPoint::locationWithLatitude_longitude', {"lat": lat, "lon": lon});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return AmapLocationFluttifyIOSAs<AMapLocationPoint>(__result__);
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AMapLocationPoint{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapLocationPoint_Batch on List<AMapLocationPoint?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
Future<List<double?>> get_latitude_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPoint::get_latitude_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
|
||||
}
|
||||
|
||||
Future<List<double?>> get_longitude_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationPoint::get_longitude_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_latitude_batch(List<double> latitude) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPoint::set_latitude_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "latitude": latitude[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_longitude_batch(List<double> longitude) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPoint::set_longitude_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "longitude": longitude[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
static Future<List<AMapLocationPoint?>> locationWithLatitude_longitude_batch(List<double> lat, List<double> lon) async {
|
||||
assert(lat.length == lon.length);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationPoint::locationWithLatitude_longitude_batch', [for (int __i__ = 0; __i__ < lat.length; __i__++) {"lat": lat[__i__], "lon": lon[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => AmapLocationFluttifyIOSAs<AMapLocationPoint>(__result__)).cast<AMapLocationPoint?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
129
lib/src/ios/AMapLocationPolygonRegion.g.dart
Normal file
129
lib/src/ios/AMapLocationPolygonRegion.g.dart
Normal file
@ -0,0 +1,129 @@
|
||||
// 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
|
||||
}
|
361
lib/src/ios/AMapLocationReGeocode.g.dart
Normal file
361
lib/src/ios/AMapLocationReGeocode.g.dart
Normal file
@ -0,0 +1,361 @@
|
||||
// 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 AMapLocationReGeocode extends NSObject with NSCoding, NSCopying {
|
||||
//region constants
|
||||
static const String name__ = 'AMapLocationReGeocode';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<AMapLocationReGeocode> create__({ bool init = true /* ios only */ }) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createAMapLocationReGeocode',
|
||||
{'init': init}
|
||||
);
|
||||
return AmapLocationFluttifyIOSAs<AMapLocationReGeocode>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<AMapLocationReGeocode>> create_batch__(int length, { bool init = true /* ios only */ }) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchAMapLocationReGeocode',
|
||||
{'length': length, 'init': init}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyIOSAs<AMapLocationReGeocode>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<AMapLocationReGeocode>()
|
||||
.toList() ?? <AMapLocationReGeocode>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
Future<String?> get_formattedAddress() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_formattedAddress", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_country() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_country", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_province() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_province", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_city() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_city", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_district() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_district", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_township() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_township", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_neighborhood() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_neighborhood", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_building() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_building", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_citycode() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_citycode", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_adcode() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_adcode", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_street() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_street", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_number() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_number", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_POIName() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_POIName", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<String?> get_AOIName() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_AOIName", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_formattedAddress(String formattedAddress) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_formattedAddress', <String, dynamic>{'__this__': this, "formattedAddress": formattedAddress});
|
||||
}
|
||||
|
||||
Future<void> set_country(String country) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_country', <String, dynamic>{'__this__': this, "country": country});
|
||||
}
|
||||
|
||||
Future<void> set_province(String province) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_province', <String, dynamic>{'__this__': this, "province": province});
|
||||
}
|
||||
|
||||
Future<void> set_city(String city) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_city', <String, dynamic>{'__this__': this, "city": city});
|
||||
}
|
||||
|
||||
Future<void> set_district(String district) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_district', <String, dynamic>{'__this__': this, "district": district});
|
||||
}
|
||||
|
||||
Future<void> set_township(String township) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_township', <String, dynamic>{'__this__': this, "township": township});
|
||||
}
|
||||
|
||||
Future<void> set_neighborhood(String neighborhood) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_neighborhood', <String, dynamic>{'__this__': this, "neighborhood": neighborhood});
|
||||
}
|
||||
|
||||
Future<void> set_building(String building) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_building', <String, dynamic>{'__this__': this, "building": building});
|
||||
}
|
||||
|
||||
Future<void> set_citycode(String citycode) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_citycode', <String, dynamic>{'__this__': this, "citycode": citycode});
|
||||
}
|
||||
|
||||
Future<void> set_adcode(String adcode) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_adcode', <String, dynamic>{'__this__': this, "adcode": adcode});
|
||||
}
|
||||
|
||||
Future<void> set_street(String street) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_street', <String, dynamic>{'__this__': this, "street": street});
|
||||
}
|
||||
|
||||
Future<void> set_number(String number) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_number', <String, dynamic>{'__this__': this, "number": number});
|
||||
}
|
||||
|
||||
Future<void> set_POIName(String POIName) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_POIName', <String, dynamic>{'__this__': this, "POIName": POIName});
|
||||
}
|
||||
|
||||
Future<void> set_AOIName(String AOIName) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_AOIName', <String, dynamic>{'__this__': this, "AOIName": AOIName});
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AMapLocationReGeocode{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapLocationReGeocode_Batch on List<AMapLocationReGeocode?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
Future<List<String?>> get_formattedAddress_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_formattedAddress_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_country_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_country_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_province_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_province_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_city_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_city_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_district_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_district_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_township_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_township_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_neighborhood_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_neighborhood_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_building_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_building_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_citycode_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_citycode_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_adcode_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_adcode_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_street_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_street_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_number_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_number_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_POIName_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_POIName_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<String?>> get_AOIName_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationReGeocode::get_AOIName_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_formattedAddress_batch(List<String> formattedAddress) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_formattedAddress_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "formattedAddress": formattedAddress[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_country_batch(List<String> country) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_country_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "country": country[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_province_batch(List<String> province) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_province_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "province": province[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_city_batch(List<String> city) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_city_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "city": city[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_district_batch(List<String> district) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_district_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "district": district[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_township_batch(List<String> township) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_township_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "township": township[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_neighborhood_batch(List<String> neighborhood) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_neighborhood_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "neighborhood": neighborhood[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_building_batch(List<String> building) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_building_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "building": building[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_citycode_batch(List<String> citycode) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_citycode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "citycode": citycode[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_adcode_batch(List<String> adcode) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_adcode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "adcode": adcode[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_street_batch(List<String> street) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_street_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "street": street[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_number_batch(List<String> number) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_number_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "number": number[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_POIName_batch(List<String> POIName) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_POIName_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "POIName": POIName[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_AOIName_batch(List<String> AOIName) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationReGeocode::set_AOIName_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "AOIName": AOIName[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
//endregion
|
||||
}
|
32
lib/src/ios/AMapLocationReGeocodeLanguage.g.dart
Normal file
32
lib/src/ios/AMapLocationReGeocodeLanguage.g.dart
Normal file
@ -0,0 +1,32 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum AMapLocationReGeocodeLanguage {
|
||||
AMapLocationReGeocodeLanguageDefault /* 0 */,
|
||||
AMapLocationReGeocodeLanguageChinse /* 1 */,
|
||||
AMapLocationReGeocodeLanguageEnglish /* 2 */
|
||||
}
|
||||
|
||||
extension AMapLocationReGeocodeLanguageToX on AMapLocationReGeocodeLanguage {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case AMapLocationReGeocodeLanguage.AMapLocationReGeocodeLanguageDefault: return 0;
|
||||
case AMapLocationReGeocodeLanguage.AMapLocationReGeocodeLanguageChinse: return 1;
|
||||
case AMapLocationReGeocodeLanguage.AMapLocationReGeocodeLanguageEnglish: return 2;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapLocationReGeocodeLanguageFromX on int {
|
||||
AMapLocationReGeocodeLanguage toAMapLocationReGeocodeLanguage() {
|
||||
switch (this) {
|
||||
case 0: return AMapLocationReGeocodeLanguage.AMapLocationReGeocodeLanguageDefault;
|
||||
case 1: return AMapLocationReGeocodeLanguage.AMapLocationReGeocodeLanguageChinse;
|
||||
case 2: return AMapLocationReGeocodeLanguage.AMapLocationReGeocodeLanguageEnglish;
|
||||
default: return AMapLocationReGeocodeLanguage.values[this + 0];
|
||||
}
|
||||
}
|
||||
}
|
185
lib/src/ios/AMapLocationRegion.g.dart
Normal file
185
lib/src/ios/AMapLocationRegion.g.dart
Normal file
@ -0,0 +1,185 @@
|
||||
// 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 AMapLocationRegion extends NSObject with NSCopying {
|
||||
//region constants
|
||||
static const String name__ = 'AMapLocationRegion';
|
||||
|
||||
@override
|
||||
final String tag__ = 'amap_location_fluttify';
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
//region creators
|
||||
static Future<AMapLocationRegion> create__({ bool init = true /* ios only */ }) async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod(
|
||||
'ObjectFactory::createAMapLocationRegion',
|
||||
{'init': init}
|
||||
);
|
||||
return AmapLocationFluttifyIOSAs<AMapLocationRegion>(__result__)!;
|
||||
}
|
||||
|
||||
static Future<List<AMapLocationRegion>> create_batch__(int length, { bool init = true /* ios only */ }) async {
|
||||
assert(true);
|
||||
final __result_batch__ = await kAmapLocationFluttifyChannel.invokeListMethod(
|
||||
'ObjectFactory::create_batchAMapLocationRegion',
|
||||
{'length': length, 'init': init}
|
||||
);
|
||||
return __result_batch__
|
||||
?.map((it) => AmapLocationFluttifyIOSAs<AMapLocationRegion>(it))
|
||||
.where((element) => element !=null)
|
||||
.cast<AMapLocationRegion>()
|
||||
.toList() ?? <AMapLocationRegion>[];
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region getters
|
||||
Future<String?> get_identifier() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationRegion::get_identifier", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<bool?> get_notifyOnEntry() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationRegion::get_notifyOnEntry", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
Future<bool?> get_notifyOnExit() async {
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationRegion::get_notifyOnExit", {'__this__': this});
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_notifyOnEntry(bool notifyOnEntry) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationRegion::set_notifyOnEntry', <String, dynamic>{'__this__': this, "notifyOnEntry": notifyOnEntry});
|
||||
}
|
||||
|
||||
Future<void> set_notifyOnExit(bool notifyOnExit) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationRegion::set_notifyOnExit', <String, dynamic>{'__this__': this, "notifyOnExit": notifyOnExit});
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<AMapLocationRegion?> initWithIdentifier(String identifier) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationRegion@$refId::initWithIdentifier([\'identifier\':$identifier])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationRegion::initWithIdentifier', {"identifier": identifier, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return AmapLocationFluttifyIOSAs<AMapLocationRegion>(__result__);
|
||||
}
|
||||
|
||||
|
||||
Future<bool?> containsCoordinate(CLLocationCoordinate2D coordinate) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationRegion@$refId::containsCoordinate([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationRegion::containsCoordinate', {"coordinate": coordinate, "__this__": this});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AMapLocationRegion{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapLocationRegion_Batch on List<AMapLocationRegion?> {
|
||||
String? get refId {
|
||||
if (isEmpty) return null;
|
||||
return first?.refId;
|
||||
}
|
||||
|
||||
//region getters
|
||||
Future<List<String?>> get_identifier_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationRegion::get_identifier_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<String?>().toList();
|
||||
}
|
||||
|
||||
Future<List<bool?>> get_notifyOnEntry_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationRegion::get_notifyOnEntry_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
Future<List<bool?>> get_notifyOnExit_batch() async {
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod("AMapLocationRegion::get_notifyOnExit_batch", [for (final __item__ in this) {'__this__': __item__}]);
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region setters
|
||||
Future<void> set_notifyOnEntry_batch(List<bool> notifyOnEntry) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationRegion::set_notifyOnEntry_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "notifyOnEntry": notifyOnEntry[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Future<void> set_notifyOnExit_batch(List<bool> notifyOnExit) async {
|
||||
await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationRegion::set_notifyOnExit_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "notifyOnExit": notifyOnExit[__i__]}]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region methods
|
||||
|
||||
Future<List<AMapLocationRegion?>> initWithIdentifier_batch(List<String> identifier) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationRegion::initWithIdentifier_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"identifier": identifier[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => AmapLocationFluttifyIOSAs<AMapLocationRegion>(__result__)).cast<AMapLocationRegion?>().toList();
|
||||
}
|
||||
|
||||
|
||||
Future<List<bool?>> containsCoordinate_batch(List<CLLocationCoordinate2D> coordinate) async {
|
||||
assert(true);
|
||||
|
||||
// invoke native method
|
||||
final resultBatch = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationRegion::containsCoordinate_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"coordinate": coordinate[__i__], "__this__": this[__i__]}]);
|
||||
|
||||
|
||||
return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
32
lib/src/ios/AMapLocationRegionState.g.dart
Normal file
32
lib/src/ios/AMapLocationRegionState.g.dart
Normal file
@ -0,0 +1,32 @@
|
||||
// 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.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
enum AMapLocationRegionState {
|
||||
AMapLocationRegionStateUnknow /* 0 */,
|
||||
AMapLocationRegionStateInside /* 1 */,
|
||||
AMapLocationRegionStateOutside /* 2 */
|
||||
}
|
||||
|
||||
extension AMapLocationRegionStateToX on AMapLocationRegionState {
|
||||
int toValue() {
|
||||
switch (this) {
|
||||
case AMapLocationRegionState.AMapLocationRegionStateUnknow: return 0;
|
||||
case AMapLocationRegionState.AMapLocationRegionStateInside: return 1;
|
||||
case AMapLocationRegionState.AMapLocationRegionStateOutside: return 2;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AMapLocationRegionStateFromX on int {
|
||||
AMapLocationRegionState toAMapLocationRegionState() {
|
||||
switch (this) {
|
||||
case 0: return AMapLocationRegionState.AMapLocationRegionStateUnknow;
|
||||
case 1: return AMapLocationRegionState.AMapLocationRegionStateInside;
|
||||
case 2: return AMapLocationRegionState.AMapLocationRegionStateOutside;
|
||||
default: return AMapLocationRegionState.values[this + 0];
|
||||
}
|
||||
}
|
||||
}
|
17
lib/src/ios/constants.g.dart
Normal file
17
lib/src/ios/constants.g.dart
Normal file
@ -0,0 +1,17 @@
|
||||
// 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 'package:flutter/services.dart';
|
||||
import '../facade/shared.g.dart';
|
||||
|
||||
import 'package:amap_location_fluttify/src/ios/ios.export.g.dart';
|
||||
import 'package:amap_location_fluttify/src/android/android.export.g.dart';
|
||||
|
||||
Future<String?> get AMapGeoFenceErrorDomain async {
|
||||
return kAmapLocationFluttifyChannel.invokeMethod('getAMapGeoFenceErrorDomain');
|
||||
}
|
||||
|
||||
Future<String?> get AMapLocationErrorDomain async {
|
||||
return kAmapLocationFluttifyChannel.invokeMethod('getAMapLocationErrorDomain');
|
||||
}
|
47
lib/src/ios/functions.g.dart
Normal file
47
lib/src/ios/functions.g.dart
Normal file
@ -0,0 +1,47 @@
|
||||
// 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:amap_location_fluttify/src/android/android.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';
|
||||
|
||||
Future<CLLocationCoordinate2D?> AMapLocationCoordinateConvert(CLLocationCoordinate2D coordinate, AMapLocationCoordinateType type) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationCoordinateConvert::AMapLocationCoordinateConvert([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationCoordinateConvert::AMapLocationCoordinateConvert', {"coordinate": coordinate, "type": type.toValue()});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return AmapLocationFluttifyIOSAs<CLLocationCoordinate2D>(__result__);
|
||||
}
|
||||
|
||||
Future<bool?> AMapLocationDataAvailableForCoordinate(CLLocationCoordinate2D coordinate) async {
|
||||
// print log
|
||||
if (fluttifyLogEnabled) {
|
||||
debugPrint('fluttify-dart: AMapLocationDataAvailableForCoordinate::AMapLocationDataAvailableForCoordinate([])');
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('AMapLocationDataAvailableForCoordinate::AMapLocationDataAvailableForCoordinate', {"coordinate": coordinate});
|
||||
|
||||
|
||||
// handle native call
|
||||
|
||||
|
||||
return __result__;
|
||||
}
|
30
lib/src/ios/ios.export.g.dart
Normal file
30
lib/src/ios/ios.export.g.dart
Normal file
@ -0,0 +1,30 @@
|
||||
export 'AMapLocationPoint.g.dart';
|
||||
export 'AMapGeoFencePolygonRegion.g.dart';
|
||||
export 'AMapLocationManagerDelegate.g.dart';
|
||||
export 'AMapLocationRegion.g.dart';
|
||||
export 'AMapGeoFenceRegionStatus.g.dart';
|
||||
export 'AMapGeoFenceActiveAction.g.dart';
|
||||
export 'AMapLocationRegionState.g.dart';
|
||||
export 'AMapGeoFencePOIRegion.g.dart';
|
||||
export 'AMapGeoFenceCircleRegion.g.dart';
|
||||
export 'type_op.g.dart';
|
||||
export 'AMapLocationErrorCode.g.dart';
|
||||
export 'constants.g.dart';
|
||||
export 'AMapGeoFenceRegion.g.dart';
|
||||
export 'AMapGeoFenceManagerDelegate.g.dart';
|
||||
export 'AMapLocationPolygonRegion.g.dart';
|
||||
export 'AMapLocationReGeocodeLanguage.g.dart';
|
||||
export 'AMapGeoFenceRegionType.g.dart';
|
||||
export 'functions.g.dart';
|
||||
export 'AMapLocationCoordinateType.g.dart';
|
||||
export 'AMapGeoFenceErrorCode.g.dart';
|
||||
export 'AMapLocationDistrictItem.g.dart';
|
||||
export 'AMapGeoFenceDistrictRegion.g.dart';
|
||||
export 'AMapLocationAccuracyMode.g.dart';
|
||||
export 'AMapLocationManager.g.dart';
|
||||
export 'AMapLocationPOIItem.g.dart';
|
||||
export 'AMapGeoFenceRegionActiveStatus.g.dart';
|
||||
export 'AMapGeoFenceManager.g.dart';
|
||||
export 'AMapLocationCircleRegion.g.dart';
|
||||
export 'AMapLocationReGeocode.g.dart';
|
||||
export '../facade/shared.g.dart';
|
232
lib/src/ios/type_op.g.dart
Normal file
232
lib/src/ios/type_op.g.dart
Normal file
@ -0,0 +1,232 @@
|
||||
// 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:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:amap_location_fluttify/src/ios/ios.export.g.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';
|
||||
|
||||
|
||||
// ignore_for_file: non_constant_identifier_names, camel_case_types, missing_return, unused_import
|
||||
// type check
|
||||
@optionalTypeArgs
|
||||
Future<bool> AmapLocationFluttifyIOSIs<T>(dynamic __this__) async {
|
||||
final typeName = T.toString();
|
||||
if (RegExp(r'^(List<)?(String|int|double)(>)?|(Map<String,(String|int|double)>)$').hasMatch(typeName)) {
|
||||
return __this__ is T;
|
||||
}
|
||||
else if (T == AMapGeoFenceManager) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapGeoFenceManager', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapGeoFenceManagerDelegate) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapGeoFenceManagerDelegate', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapLocationRegion) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapLocationRegion', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapLocationCircleRegion) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapLocationCircleRegion', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapLocationPolygonRegion) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapLocationPolygonRegion', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapGeoFenceRegion) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapGeoFenceRegion', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapGeoFenceCircleRegion) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapGeoFenceCircleRegion', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapGeoFencePolygonRegion) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapGeoFencePolygonRegion', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapGeoFencePOIRegion) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapGeoFencePOIRegion', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapGeoFenceDistrictRegion) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapGeoFenceDistrictRegion', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapLocationManager) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapLocationManager', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapLocationManagerDelegate) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapLocationManagerDelegate', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapLocationReGeocode) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapLocationReGeocode', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapLocationPoint) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapLocationPoint', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapLocationPOIItem) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapLocationPOIItem', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == AMapLocationDistrictItem) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfAMapLocationDistrictItem', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == CLLocation) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfCLLocation', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == CLHeading) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfCLHeading', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == CGRect) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfCGRect', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == CGPoint) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfCGPoint', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == CGSize) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfCGSize', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == UIEdgeInsets) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfUIEdgeInsets', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == CLLocationCoordinate2D) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfCLLocationCoordinate2D', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == CLLocationManager) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfCLLocationManager', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == NSError) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfNSError', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == NSCoding) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfNSCoding', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == NSCopying) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfNSCopying', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == NSMutableCopying) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfNSMutableCopying', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == UIView) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfUIView', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == UIViewController) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfUIViewController', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == UIControl) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfUIControl', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == UIImage) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfUIImage', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == UIImageView) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfUIImageView', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == UIColor) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfUIColor', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == NSData) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfNSData', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == NSDate) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfNSDate', {'__this__': __this__});
|
||||
return result;
|
||||
} else if (T == NSOperation) {
|
||||
final result = await kAmapLocationFluttifyChannel.invokeMethod('RefClass::isKindOfNSOperation', {'__this__': __this__});
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// type cast
|
||||
// 给一个可选的泛型, 如果没有指定泛型就返回dynamic
|
||||
@optionalTypeArgs
|
||||
T? AmapLocationFluttifyIOSAs<T>(dynamic __this__) {
|
||||
final typeName = T.toString();
|
||||
|
||||
if (__this__ == null) {
|
||||
return null;
|
||||
} else if (RegExp(r'^(List<)?(String|int|double)(>)?|(Map<String,(String|int|double)>)$').hasMatch(typeName)) {
|
||||
return __this__ as T;
|
||||
}
|
||||
else if (T == AMapGeoFenceManager) {
|
||||
return (AMapGeoFenceManager()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapGeoFenceManagerDelegate) {
|
||||
return (AMapGeoFenceManagerDelegate.subInstance()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapLocationRegion) {
|
||||
return (AMapLocationRegion()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapLocationCircleRegion) {
|
||||
return (AMapLocationCircleRegion()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapLocationPolygonRegion) {
|
||||
return (AMapLocationPolygonRegion()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapGeoFenceRegion) {
|
||||
return (AMapGeoFenceRegion()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapGeoFenceCircleRegion) {
|
||||
return (AMapGeoFenceCircleRegion()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapGeoFencePolygonRegion) {
|
||||
return (AMapGeoFencePolygonRegion()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapGeoFencePOIRegion) {
|
||||
return (AMapGeoFencePOIRegion()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapGeoFenceDistrictRegion) {
|
||||
return (AMapGeoFenceDistrictRegion()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapLocationManager) {
|
||||
return (AMapLocationManager()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapLocationManagerDelegate) {
|
||||
return (AMapLocationManagerDelegate.subInstance()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapLocationReGeocode) {
|
||||
return (AMapLocationReGeocode()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapLocationPoint) {
|
||||
return (AMapLocationPoint()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapLocationPOIItem) {
|
||||
return (AMapLocationPOIItem()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == AMapLocationDistrictItem) {
|
||||
return (AMapLocationDistrictItem()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == CLLocation) {
|
||||
return (CLLocation()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == CLHeading) {
|
||||
return (CLHeading()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == CGRect) {
|
||||
return (CGRect()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == CGPoint) {
|
||||
return (CGPoint()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == CGSize) {
|
||||
return (CGSize()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == UIEdgeInsets) {
|
||||
return (UIEdgeInsets()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == CLLocationCoordinate2D) {
|
||||
return (CLLocationCoordinate2D()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == CLLocationManager) {
|
||||
return (CLLocationManager()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == NSError) {
|
||||
return (NSError()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == NSCoding) {
|
||||
return (NSCoding.subInstance()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == NSCopying) {
|
||||
return (NSCopying.subInstance()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == NSMutableCopying) {
|
||||
return (NSMutableCopying.subInstance()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == UIView) {
|
||||
return (UIView()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == UIViewController) {
|
||||
return (UIViewController()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == UIControl) {
|
||||
return (UIControl()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == UIImage) {
|
||||
return (UIImage()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == UIImageView) {
|
||||
return (UIImageView()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == UIColor) {
|
||||
return (UIColor()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == NSData) {
|
||||
return (NSData()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == NSDate) {
|
||||
return (NSDate()..refId = (__this__ as Ref).refId) as T;
|
||||
} else if (T == NSOperation) {
|
||||
return (NSOperation()..refId = (__this__ as Ref).refId) as T;
|
||||
}
|
||||
|
||||
else {
|
||||
return __this__;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user