loadJson method

  1. @override
void loadJson(
  1. Map<String, dynamic> decodedJson
)
override

Reconfigures this knob based on the provided deserialized JSON.

Implementation

@override
void loadJson(Map<String, dynamic> decodedJson) {
  final val = decodedJson['value'];
  if (val == null) {
    value = null;
  } else if (val is String) {
    if (val.isEmpty) {
      value = null;
    } else {
      value = int.parse(val);
    }
  } else {
    value = val as int;
  }
}