fromJsonOrNull static method
Implementation
static DataRefModel? fromJsonOrNull(
Map<String, dynamic>? otherData,
) {
try {
final id = otherData?['id']?.toString().trim().nullIfEmpty;
final collection = letList(otherData?['collection'])
?.map(
(p0) => p0?.toString().trim().nullIfEmpty,
)
.nonNulls
.nullIfEmpty
?.toList();
return DataRefModel(
id: id,
collection: collection,
);
} catch (e) {
return null;
}
}