fromJson static method

DataContainer? fromJson(
  1. dynamic json
)

Implementation

static DataContainer? fromJson(dynamic json) {
  if (json == null || json is! Map<dynamic, dynamic>) return null;
  final id = json['id'] as String?;
  if (id == null) return null;
  return DataContainer(id: id);
}