fromJson method

  1. @override
VerticalDirection? fromJson(
  1. String? json
)
override

Implementation

@override
VerticalDirection? fromJson(String? json) {
  if (json == null) return null;

  switch (json) {
    case 'down':
      return VerticalDirection.down;

    case 'up':
      return VerticalDirection.up;
  }

  throw 'Unsuported_Json_Value';
}