insert method

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

Implementation

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