childScaffold<TBuildContext extends AFBuildContext<AFFlexibleStateView, AFRouteParam> > method
Widget
childScaffold<TBuildContext extends AFBuildContext<AFFlexibleStateView, AFRouteParam> >({
- Key? key,
- required AFStateProgrammingInterface<
AFComponentState, AFBuildContext< spi,AFFlexibleStateView, AFRouteParam> , AFFunctionalTheme> - AFConnectedUIBase<
AFComponentState, AFFunctionalTheme, AFFlexibleStateView, AFRouteParam, AFStateProgrammingInterface< ? contextSource,AFComponentState, AFBuildContext< >AFFlexibleStateView, AFRouteParam> , AFFunctionalTheme> - PreferredSizeWidget? appBar,
- Widget? drawer,
- required Widget body,
- Widget? floatingActionButton,
- Color? backgroundColor,
- FloatingActionButtonLocation? floatingActionButtonLocation,
- FloatingActionButtonAnimator? floatingActionButtonAnimator,
- Widget? endDrawer,
- Widget? bottomSheet,
- bool? resizeToAvoidBottomPadding,
- bool? resizeToAvoidBottomInset,
- bool primary = true,
- DragStartBehavior drawerDragStartBehavior = DragStartBehavior.start,
- bool extendBody = false,
- bool extendBodyBehindAppBar = false,
- Color? drawerScrimColor,
- double? drawerEdgeDragWidth,
- bool drawerEnableOpenDragGesture = true,
- bool endDrawerEnableOpenDragGesture = true,
A method used to create a standard scaffold, please use this instead of creating you scaffold manually with return Scaffold(...
This method does a few nice things for you:
- It automatically attaches the AFib prototype drawer in prototype mode.
You will most likely want to create one or more app-specific version of this method in your own app's conceptual theme, which might fill in many of the parameters (e.g. appBar) with standard values, rather than duplicating them on every screen.
Implementation
Widget childScaffold<TBuildContext extends AFBuildContext>({
Key? key,
required AFStateProgrammingInterface spi,
AFConnectedUIBase? contextSource,
PreferredSizeWidget? appBar,
Widget? drawer,
required Widget body,
Widget? bottomNavigationBar,
Widget? floatingActionButton,
Color? backgroundColor,
FloatingActionButtonLocation? floatingActionButtonLocation,
FloatingActionButtonAnimator? floatingActionButtonAnimator,
List<Widget>? persistentFooterButtons,
Widget? endDrawer,
Widget? bottomSheet,
bool? resizeToAvoidBottomPadding,
bool? resizeToAvoidBottomInset,
bool primary = true,
DragStartBehavior drawerDragStartBehavior = DragStartBehavior.start,
bool extendBody = false,
bool extendBodyBehindAppBar = false,
Color? drawerScrimColor,
double? drawerEdgeDragWidth,
bool drawerEnableOpenDragGesture = true,
bool endDrawerEnableOpenDragGesture = true
}) {
return Scaffold(
key: key,
drawer: childDebugDrawerBegin(drawer),
body: body,
appBar: appBar,
bottomNavigationBar: bottomNavigationBar,
floatingActionButton: floatingActionButton,
floatingActionButtonLocation: floatingActionButtonLocation,
floatingActionButtonAnimator: floatingActionButtonAnimator,
backgroundColor: backgroundColor,
persistentFooterButtons: persistentFooterButtons,
bottomSheet: bottomSheet,
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
primary: primary,
drawerDragStartBehavior: drawerDragStartBehavior,
extendBody: extendBody,
extendBodyBehindAppBar: extendBodyBehindAppBar,
drawerScrimColor: drawerScrimColor,
drawerEdgeDragWidth: drawerEdgeDragWidth,
drawerEnableOpenDragGesture: drawerEnableOpenDragGesture,
endDrawer: childDebugDrawerEnd(endDrawer),
);
}