getJson static method

Future getJson(
  1. String key, {
  2. UStorageBucket bucket = UStorageBucket.support,
})

Implementation

static Future<dynamic> getJson(String key, {UStorageBucket bucket = UStorageBucket.support}) async {
  final String? text = await getString(key, bucket: bucket);
  if (text == null) return null;
  try {
    return jsonDecode(text);
  } on FormatException {
    return null;
  }
}