CustomAppBar constructor Null safety

const CustomAppBar(
  1. {Key? key,
  2. required String title,
  3. bool? centerTitle,
  4. double elevation = 4,
  5. List<Widget> actions = const [],
  6. VoidCallback? onBackButtonPressed,
  7. bool isHomeScreen = false,
  8. TextStyle titleStyle = const TextStyle(fontSize: 20, fontWeight: FontWeight.bold)}
)

Implementation

const CustomAppBar({
  Key? key,
  required this.title,
  this.centerTitle,
  this.elevation = 4,
  this.actions = const [],
  this.onBackButtonPressed,
  this.isHomeScreen = false,
  this.titleStyle = const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
}) : super(key: key);