Valuable.fromJson constructor

Valuable.fromJson(
  1. JsonMap params, {
  2. String titleKey = 'name',
  3. String valueKey = 'id',
})

Create valuable from json map

Implementation

factory Valuable.fromJson(JsonMap params, {String titleKey = 'name', String valueKey = 'id'}) {
  return Valuable.glass(params[titleKey].toString(), params[valueKey].toString());
}