toJson method

  1. @override
String? toJson(
  1. StackFit? value
)
override

Implementation

@override
String? toJson(StackFit? value) {
  if (value == null) return null;

  switch (value) {
    case StackFit.expand:
      return 'expand';
      break;

    case StackFit.loose:
      return 'loose';
      break;

    case StackFit.passthrough:
      return 'passthrough';
      break;
  }

  throw 'Json_Unsuported_Value';
}