AppBar constructor

const AppBar({
  1. Key? key,
  2. List<Widget> trailing = const [],
  3. List<Widget> leading = const [],
  4. Widget? title,
  5. Widget? header,
  6. Widget? subtitle,
  7. Widget? child,
  8. bool trailingExpanded = false,
  9. AlignmentGeometry alignment = Alignment.center,
  10. EdgeInsetsGeometry? padding,
  11. Color? backgroundColor,
  12. double? leadingGap,
  13. double? trailingGap,
  14. double? height,
  15. double? surfaceBlur,
  16. double? surfaceOpacity,
  17. 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',
      );