getJSONArray method

Future<Object> getJSONArray(
  1. String key,
  2. Object fallbackValue
)

Implementation

Future<Object> getJSONArray(String key, Object fallbackValue) async {
  try {
    final args = [key, jsonEncode(fallbackValue)];
    var jSONString = await _channel.invokeMethod('getJSONArray', args);
    if (jSONString != null) {
      return jsonDecode(jSONString as String);
    } else {
      return fallbackValue;
    }
  } on Exception catch (e) {
    Logger.i("$e Error while getting config's");
    return fallbackValue;
  }
}