GrxHeader constructor
GrxHeader({
- Key? key,
- required String title,
- Color backgroundColor = Colors.transparent,
- List<
Widget> actions = const [], - bool showBackButton = false,
- bool showCloseButton = false,
- bool centerTitle = false,
- double height = _kHeight,
- double animationProgress = 0,
- VoidCallback? onBackPressed,
- VoidCallback? onClosePressed,
- Color? foregroundColor,
- SystemUiOverlayStyle? systemOverlayStyle,
Implementation
GrxHeader({
super.key,
required this.title,
this.backgroundColor = Colors.transparent,
this.actions = const [],
this.showBackButton = false,
this.showCloseButton = false,
this.centerTitle = false,
this.height = _kHeight,
this.animationProgress = 0,
this.onBackPressed,
this.onClosePressed,
final Color? foregroundColor,
final SystemUiOverlayStyle? systemOverlayStyle,
}) : systemOverlayStyle =
systemOverlayStyle ??
(backgroundColor.computeLuminance() > .5
? GrxSystemOverlayStyle.dark
: GrxSystemOverlayStyle.light),
foregroundColor = foregroundColor ?? GrxColors.primary.shade800;