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