PackageDimensions.fromJson constructor
PackageDimensions.fromJson(
- Object? json
Implementation
factory PackageDimensions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return PackageDimensions(
height: (map['height'] as num).toDouble(),
length: (map['length'] as num).toDouble(),
weight: (map['weight'] as num).toDouble(),
width: (map['width'] as num).toDouble(),
);
}