AuthAdapter constructor

const AuthAdapter({
  1. List<AuthActionQuery> authActions = const [],
})

Adapters to change the behavior of authentication on different platforms.

By passing an object inheriting from this in AuthAdapterScope, you can change the authentication for the entire app.

The actual authentication commands are performed using the Authentication class, but all internal implementation is done via this AuthAdapter.

プラットフォームごとの認証の振る舞いを変えるためのアダプター。

これを継承したオブジェクトをAuthAdapterScopeで渡すことによりアプリ全体の認証を変更することができます。

実際に認証コマンドを利用する際はAuthenticationのクラスを用いて行ないますが、内部実装はすべてこのAuthAdapter経由で行われます。

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return AuthAdapterScope(
      adapter: const RuntimeAuthAdapter(),
      child: MaterialApp(
        home: const AuthPage(),
      ),
    );
  }
}

Implementation

const AuthAdapter({this.authActions = const []});