update method

Future<T?> update(
  1. Map<String, dynamic> data, {
  2. String? id,
  3. bool notifiable = true,
})
inherited

Implementation

Future<T?> update(
  Map<String, dynamic> data, {
  String? id,
  bool notifiable = true,
}) async {
  if (data.isEmpty) return _userNotifier.value;
  try {
    final ok = await _backup.update(data);
    if (!ok) return null;
    return _userNotifier.value;
  } catch (error) {
    if (!_disposed && notifiable) _errorNotifier.value = error.toString();
    return null;
  }
}