ToggleModel.fromJson constructor

ToggleModel.fromJson(
  1. Map<String, dynamic> json,
  2. String type,
  3. bool isBeforeHeader
)

Implementation

ToggleModel.fromJson(Map<String, dynamic> json, String type, bool isBeforeHeader)
    :name = json['name'],
      description = json['description'],
      time =  MutableLiveData(initValue:json['time']),
      values = json['values'].cast<String>(),
      chosenValue = MutableLiveData(initValue:json['chosen_value']),  super(json['id'], type, isBeforeHeader) ;