updateData method

  1. @override
List<ResEvent> updateData(
  1. dynamic newData
)
override

Implementation

@override
List<ResEvent> updateData(dynamic newData) {
  if (newData is! Map<String, dynamic>) {
    throw InvalidMessageException(
        'tried to update the model $rid with ${newData.runtimeType}',
        newData);
  }

  final updates = _updateData(newData, reset: true);
  if (updates != null) {
    return [ModelChangedEvent(rid, updates.item1, updates.item2)];
  }
  return [];
}