updateById method

Future<void> updateById(
  1. int id,
  2. T value
)

Update By Id Box<T>

Implementation

Future<void> updateById(int id, T value) async {
  final map = _adapter.toMap(value);
  map['id'] = id;
  map['autoId'] = id;
  await _indexedDB.updateById(
    id,
    TDBRecored(
      id: id,
      adapterTypeId: _adapter.adapterTypeId,
      parentId: _adapter.parentId(value),
      data: _adapter.compress(_adapter.toJson(map)),
    ),
  );
}