deleteAll method

Future<Exception?> deleteAll(
  1. String table
)

Implementation

Future<Exception?> deleteAll(String table) async
{
  Exception? exception;
  try
  {
    if (!_initialized) return null;
    var box = await Hive.openBox(table);
    await box.clear();
  }
  on Exception catch(e)
  {
    Log().error('Error Clearing Table [$table]');
    Log().exception(e, caller: 'Future<Exception?> deleteAll(String $table) async');
    exception = e;
  }
  return exception;
}