initData method

  1. @override
dynamic initData(
  1. dynamic newData
)
override

Implementation

@override
initData(dynamic newData) {
  if (newData is! Map<String, dynamic>) {
    throw InvalidMessageException(
        'tried to update the model $rid with ${newData.runtimeType}',
        newData);
  }
  _data.clear();
  _data.addAll(newData.map((key, value) =>
      MapEntry(key, _client.parseValue(value, addIndirect: true))));
}