getCloudDBZoneConfigs method

Future<List<AGConnectCloudDBZoneConfig>> getCloudDBZoneConfigs()

You can call this method to obtain all CloudDBZoneConfig lists on the device.

Implementation

Future<List<AGConnectCloudDBZoneConfig>> getCloudDBZoneConfigs() async {
  try {
    final List<dynamic>? result =
        await _methodChannel.invokeMethod<List<dynamic>?>(
      _MethodConstants.GET_CLOUD_DB_ZONE_CONFIGS,
      <String, dynamic>{},
    );
    return (result ?? <dynamic>[]).map((dynamic i) {
      return AGConnectCloudDBZoneConfig._fromMap(
        Map<String, dynamic>.from((i as Map<dynamic, dynamic>)),
      );
    }).toList();
  } catch (e) {
    throw AGConnectCloudDBException._from(e);
  }
}