RuntimeAuthAdapter constructor

const RuntimeAuthAdapter({
  1. AuthDatabase? database,
  2. String? initialUserId,
  3. List<AuthInitialValue>? initialValue,
  4. List<AuthActionQuery> authActions = const [],
})

Authentication adapter using a database that runs only in the app's memory.

All data will be reset when the application is re-launched.

It is usually used for temporary databases under development or for testing.

Normally, a common database sharedDatabase is used for the entire app, but if you want to reset the database each time, for example for testing, pass an individual database to database.

Individual data can be preconfigured and used as data mocks for authentication.

アプリのメモリ上でのみ動作するデータベースを利用した認証アダプター。

アプリを立ち上げ直すとデータはすべてリセットされます。

通常は開発途中の仮のデータベースやテスト用のデータベースに利用します。

通常はアプリ内全体での共通のデータベースsharedDatabaseが利用されますが、テスト用などで毎回データベースをリセットする場合はdatabaseに個別のデータベースを渡してください。

個別のデータを予め設定しておくことで認証用のデータモックとして利用することができます。

Implementation

const RuntimeAuthAdapter({
  AuthDatabase? database,
  String? initialUserId,
  List<AuthInitialValue>? initialValue,
  super.authActions = const [],
})  : _database = database,
      _initialUserId = initialUserId,
      _initialValue = initialValue;