buildCustom method
Widget
buildCustom({
- ChildWidgetBuilder? childBuilder,
- required BuildContext context,
- required JsonWidgetData data,
- Key? key,
override
Custom builder that subclasses must override and implement to return the actual Widget to be placed on the tree.
Implementation
@override
Widget buildCustom({
ChildWidgetBuilder? childBuilder,
required BuildContext context,
required JsonWidgetData data,
Key? key,
}) {
final theBody = body ?? getChild(data);
return Scaffold(
appBar: appBar?.build(
childBuilder: childBuilder,
context: context,
) as PreferredSizeWidget?,
backgroundColor: backgroundColor,
body: theBody.build(childBuilder: childBuilder, context: context),
bottomNavigationBar: bottomNavigationBar?.build(
childBuilder: childBuilder,
context: context,
),
bottomSheet: bottomSheet?.build(
childBuilder: childBuilder,
context: context,
),
drawer: drawer?.build(
childBuilder: childBuilder,
context: context,
),
drawerDragStartBehavior: drawerDragStartBehavior,
drawerEdgeDragWidth: drawerEdgeDragWidth,
drawerEnableOpenDragGesture: drawerEnableOpenDragGesture,
drawerScrimColor: drawerScrimColor,
endDrawer: endDrawer?.build(
childBuilder: childBuilder,
context: context,
),
endDrawerEnableOpenDragGesture: endDrawerEnableOpenDragGesture,
extendBody: extendBody,
extendBodyBehindAppBar: extendBodyBehindAppBar,
floatingActionButton: floatingActionButton?.build(
childBuilder: childBuilder,
context: context,
),
floatingActionButtonAnimator: floatingActionButtonAnimator,
floatingActionButtonLocation: floatingActionButtonLocation,
key: key,
onDrawerChanged: onDrawerChanged,
onEndDrawerChanged: onEndDrawerChanged,
persistentFooterAlignment: persistentFooterAlignment,
persistentFooterButtons: persistentFooterButtons == null
? null
: [
for (var data in persistentFooterButtons!)
data.build(
childBuilder: childBuilder,
context: context,
),
],
primary: primary,
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
restorationId: restorationId,
);
}