insertOrUpdate method

  1. @override
Future<TEntity?> insertOrUpdate(
  1. TEntity item, {
  2. bool? useIsolate,
})

Implementation

@override
Future<TEntity?> insertOrUpdate(
  TEntity item, {
  final bool? useIsolate,
}) async {
  final result = await insertOrUpdateList([item], useIsolate: useIsolate);
  if (result?.isNotEmpty == true) {
    return result?.first;
  }
  return null;
}