getAll method

Future<List<AMapGeoFenceModel>> getAll({
  1. String? customID,
})

获取所有围栏信息 在ios customID !=null 获取指定围栏信息

Implementation

Future<List<AMapGeoFenceModel>> getAll({String? customID}) async {
  if (!_supportPlatform || !_isInitialize) return [];
  final List<dynamic>? list = await _channel.invokeMethod('getAll', customID);
  if (list != null) {
    return list
        .map((dynamic e) =>
            AMapGeoFenceModel.fromMap(e as Map<dynamic, dynamic>))
        .toList();
  }
  return [];
}