getConstraints function Null safety

Map<String, dynamic> getConstraints(
  1. String key,
  2. Map<String, dynamic> v,
  3. dynamic value
)

Implementation

Map<String, dynamic> getConstraints(String key, Map<String, dynamic> v, value) {
  v.addAll({
    key: BoxConstraints(
        maxHeight: value['maxH'] ?? double.infinity,
        maxWidth: value['maxW'] ?? double.infinity,
        minHeight: value['minH'] ?? 0,
        minWidth: value['minW'] ?? 0),
  });
  return v;
}