AppBar constructor
const
AppBar({
- Key? key,
- List<
Widget> trailing = const [], - List<
Widget> leading = const [], - Widget? title,
- Widget? header,
- Widget? subtitle,
- Widget? child,
- bool trailingExpanded = false,
- AlignmentGeometry alignment = Alignment.center,
- EdgeInsetsGeometry? padding,
- Color? backgroundColor,
- double? leadingGap,
- double? trailingGap,
- double? height,
- double? surfaceBlur,
- double? surfaceOpacity,
- bool useSafeArea = true,
Implementation
const AppBar({
super.key,
this.trailing = const [],
this.leading = const [],
this.title,
this.header,
this.subtitle,
this.child,
this.trailingExpanded = false,
this.alignment = Alignment.center,
this.padding,
this.backgroundColor,
this.leadingGap,
this.trailingGap,
this.height,
this.surfaceBlur,
this.surfaceOpacity,
this.useSafeArea = true,
}) : assert(
child == null || title == null,
'Cannot provide both child and title',
);