fromJson method
Implementation
@override
BoxConstraints? fromJson(Map<String, dynamic>? json) {
if (json == null) return null;
return BoxConstraints(
maxHeight: ((json['maxHeight'] ?? double.infinity) as num).toDouble(),
maxWidth: ((json['maxWidth'] ?? double.infinity) as num).toDouble(),
minHeight: ((json['minHeight'] ?? 0) as num).toDouble(),
minWidth: ((json['minWidth'] ?? 0) as num).toDouble(),
);
}