simple static method

PreferredSizeWidget simple({
  1. required String title,
  2. List<Widget>? actions,
  3. bool centerTitle = true,
  4. bool showBack = true,
})

Implementation

static PreferredSizeWidget simple({
  required String title,
  List<Widget>? actions,
  bool centerTitle = true,
  bool showBack = true,
}) {
  return AppBar(
    title: Text(title),
    centerTitle: centerTitle,
    elevation: 0,
    leading: showBack ? const BackButton() : null,
    actions: actions,
  );
}