open method

  1. @override
Future<bool> open({
  1. bool throwError = false,
})
override

Opens the Database

Implementation

@override
Future<bool> open({bool throwError = false}) async {
  final open = await _dbInt!.open();
  if (!open) {
    _dbError.set(_dbInt!.ex);
    // Once recorded, don't keep as it may mislead future calls.
    if (throwError && _dbInt!.ex != null) {
      final Exception err = _dbInt!.ex!;
      _dbInt!.ex = null;
      throw err;
    } else {
      _dbInt!.ex = null;
    }
  }
  return open;
}