update method
Updates a value for a given route and ID.
- route: The route where the value should be updated.
- id: The ID associated with the value.
- value: The new value to be set.
Returns:
trueif the value was updated successfully, orfalseif the route or ID was not found.
Implementation
bool update(String route, TId id, dynamic value) {
if (_data.containsKey(route) && _data[route]!.containsKey(id)) {
value['id'] = id.toString();
_data[route]![id] = value;
return true;
}
return false;
}