toJson method

  1. @override
String? toJson(
  1. BoxFit? object
)
override

Implementation

@override
String? toJson(BoxFit? object) {
  if (object == null) return null;

  switch (object) {
    case BoxFit.contain:
      return 'contain';

    case BoxFit.cover:
      return 'cover';

    case BoxFit.fill:
      return 'fill';

    case BoxFit.fitHeight:
      return 'fitHeight';

    case BoxFit.fitWidth:
      return 'fitWidth';

    case BoxFit.none:
      return 'none';

    case BoxFit.scaleDown:
      return 'scaleDown';
  }
}