openDatabase method

Future<SQLiteDatabase> openDatabase (String path, { String password, int flags: OPEN_READWRITE })

Open the database according to the specified parameters.



static Future<SQLiteDatabase> openDatabase(final String path,
    {String password, int flags = OPEN_READWRITE}) async {
  try {
    final Map<String, dynamic> request = <String, dynamic>{
      'path': path,
      'password': password,
      'flags': flags
    final int id = await _channel.invokeMethod('openDatabase', request);
    return _SQLiteDatabase(id);
  } on PlatformException catch (error) {
    throw error; // TODO: improve error handling