neonAppBar function
AppBar
neonAppBar({
- required dynamic context,
- required String heading,
- IconData icon = Icons.arrow_back,
- Color iconColor = Colors.black87,
- void onTap()?,
- Color backgroundColor = Colors.transparent,
- Color appBarShadowColor = Colors.transparent,
- double elevation = 0,
- Color headingColor = Colors.white,
- FontWeight headingFontWeight = FontWeight.bold,
Implementation
AppBar neonAppBar({
required context,
required String heading,
IconData icon = Icons.arrow_back,
Color iconColor = Colors.black87,
void Function()? onTap,
Color backgroundColor = Colors.transparent,
Color appBarShadowColor = Colors.transparent,
double elevation = 0,
Color headingColor = Colors.white,
FontWeight headingFontWeight = FontWeight.bold,
}) {
return AppBar(
leading: IconButton(
icon: Icon(
icon,
color: iconColor,
),
onPressed: onTap ?? () => Navigator.of(context).pop(),
),
elevation: elevation,
shadowColor: appBarShadowColor,
title: Text(
heading,
style: TextStyle(
color: headingColor,
fontSize: 20,
fontWeight: headingFontWeight,
),
),
centerTitle: true,
backgroundColor: backgroundColor,
);
}