toJson static method

Map<String, dynamic>? toJson(
  1. String? value
)

Implementation

static Map<String, dynamic>? toJson(String? value) {
  try {
    if (isNotEmpty(value) && value!.contains('{')) {
      return jsonDecode(value);
    }
    return null;
  } catch (e, stack) {
    debugPrint('$e $stack');
    return null;
  }
}