init static method

Future<StorageApi> init({
  1. Database? sembast,
  2. FlutterSecureStorage? secureStorage,
})

Creates a new instance of StorageApi.

If sembast and secureStorage are not provided, they will be initialized with default settings.

Implementation

static Future<StorageApi> init(
    {Database? sembast, FlutterSecureStorage? secureStorage}) async {
  return StorageApi(
      sembast ?? await databaseFactoryWeb.openDatabase("wallet"),
      secureStorage ?? const FlutterSecureStorage());
}