FunctionsAdapterScope constructor

const FunctionsAdapterScope({
  1. Key? key,
  2. required Widget child,
  3. required FunctionsAdapter adapter,
})

FunctionsAdapter for the entire app by placing it on top of MaterialApp, etc.

Pass FunctionsAdapter to adapter.

Also, by using FunctionsAdapterScope.of in a descendant widget, you can retrieve the FunctionsAdapter set in the FunctionsAdapterScope.

MaterialAppなどの上に配置して、アプリ全体にFunctionsAdapterを設定します。

adapterFunctionsAdapterを渡してください。

またFunctionsAdapterScope.ofを子孫のウィジェット内で利用することによりFunctionsAdapterScopeで設定されたFunctionsAdapterを取得することができます。

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

  @override
  Widget build(BuildContext context) {
    return FunctionsAdapterScope(
      adapter: const RuntimeFunctionsAdapter(),
      child: MaterialApp(
        home: const StoragePage(),
      ),
    );
  }
}

Implementation

const FunctionsAdapterScope({
  super.key,
  required this.child,
  required this.adapter,
});