toJson method

  1. @override
Map<String, dynamic>? toJson(
  1. BoxConstraints? object
)
override

Implementation

@override
Map<String, dynamic>? toJson(BoxConstraints? object) {
  if (object == null) return null;

  return <String, dynamic>{
    'maxHeight':
        object.maxHeight == double.infinity ? null : object.maxHeight,
    'maxWidth': object.maxWidth == double.infinity ? null : object.maxWidth,
    'minHeight': object.minHeight,
    'minWidth': object.minWidth,
  };
}