buildCustom method
AppBar
buildCustom({
- ChildWidgetBuilder? childBuilder,
- required BuildContext context,
- required JsonWidgetData data,
- Key? key,
Custom builder that subclasses must override and implement to return the actual Widget to be placed on the tree.
Implementation
@override
AppBar buildCustom({
ChildWidgetBuilder? childBuilder,
required BuildContext context,
required JsonWidgetData data,
Key? key,
}) {
final model = createModel(
childBuilder: childBuilder,
data: data,
);
return AppBar(
actions: model.actions == null
? null
: [
for (var d in model.actions!)
d.build(
childBuilder: childBuilder,
context: context,
),
],
actionsIconTheme: model.actionsIconTheme,
automaticallyImplyLeading: model.automaticallyImplyLeading,
backgroundColor: model.backgroundColor,
bottom: model.bottom?.build(
childBuilder: childBuilder,
context: context,
) as PreferredSizeWidget?,
bottomOpacity: model.bottomOpacity,
centerTitle: model.centerTitle,
clipBehavior: model.clipBehavior,
elevation: model.elevation,
excludeHeaderSemantics: model.excludeHeaderSemantics,
flexibleSpace: model.flexibleSpace?.build(
childBuilder: childBuilder,
context: context,
),
forceMaterialTransparency: model.forceMaterialTransparency,
foregroundColor: model.foregroundColor,
iconTheme: model.iconTheme,
key: key,
leading: model.leading?.build(
childBuilder: childBuilder,
context: context,
),
leadingWidth: model.leadingWidth,
notificationPredicate: model.notificationPredicate,
primary: model.primary,
scrolledUnderElevation: model.scrolledUnderElevation,
shadowColor: model.shadowColor,
shape: model.shape,
surfaceTintColor: model.surfaceTintColor,
systemOverlayStyle: model.systemOverlayStyle,
title: model.title?.build(
childBuilder: childBuilder,
context: context,
),
titleSpacing: model.titleSpacing,
titleTextStyle: model.titleTextStyle,
toolbarHeight: model.toolbarHeight,
toolbarOpacity: model.toolbarOpacity,
toolbarTextStyle: model.toolbarTextStyle,
);
}