FunctionsAdapterScope constructor
const
FunctionsAdapterScope({
- Key? key,
- required Widget child,
- 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を設定します。
adapter
にFunctionsAdapterを渡してください。
また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,
});