createDatabase method

SqlJsDatabase createDatabase([
  1. Uint8List? data
])

Constructs a new SqlJsDatabase, optionally from the data blob.

Implementation

SqlJsDatabase createDatabase([Uint8List? data]) {
  final dbObj = _createInternally(data);
  assert(() {
    // set the window.db variable to make debugging easier
    globalContext['db'] = dbObj;
    return true;
  }());

  return SqlJsDatabase._(dbObj);
}