1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
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
}