fromJson method

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

Implementation

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

  switch (json) {
    case 'always':
      return ShowValueIndicator.always;

    case 'never':
      return ShowValueIndicator.never;

    case 'onlyForContinuous':
      return ShowValueIndicator.onlyForContinuous;

    case 'onlyForDiscrete':
      return ShowValueIndicator.onlyForDiscrete;
  }

  throw 'Unsuported_Json_Value';
}