fromJsonStringOrNull static method

Property? fromJsonStringOrNull(
  1. String? source
)

Implementation

static Property? fromJsonStringOrNull(
  String? source,
) {
  try {
    if (source!.isNotEmpty) {
      final decoded = jsonDecode(source);
      return Property.fromJson(decoded);
    } else {
      return const Property.c2();
    }
  } catch (_) {
    return null;
  }
}