AppBar.expanded constructor
AppBar.expanded({})
Implementation
factory AppBar.expanded({
String? title,
Color? textColor,
List<Widget>? actions,
bool automaticallyImplyLeading = true,
Widget? leading,
Color? backgroundColor,
SystemUiOverlayStyle? systemOverlayStyle,
}) {
return AppBar(
height: 96,
title: null,
textColor: textColor,
actions: actions,
automaticallyImplyLeading: automaticallyImplyLeading,
leading: leading,
backgroundColor: backgroundColor,
systemOverlayStyle: systemOverlayStyle,
flexibleSpace: material.SafeArea(
child: material.Builder(builder: (context) {
final theme = material.Theme.of(context);
final Color titleColor =
theme.appBarTheme.foregroundColor ?? theme.colorScheme.onSurface;
return Container(
alignment: material.Alignment.bottomLeft,
padding: material.EdgeInsets.only(
left: 16,
),
child: Text(
"Title",
style: (theme.textTheme.headlineMedium ?? const TextStyle())
.copyWith(
color: titleColor,
),
),
);
}),
),
);
}