appBar static method

AppBar appBar(
  1. BuildContext context,
  2. String title,
  3. TextStyle appBarTitleTextStyle,
  4. Icon appBarIcon,
  5. Color appBarColor, [
  6. Function? handleBackPress,
])

Creates a customised Appbar

Implementation

static AppBar appBar(
    final BuildContext context,
    final String title,
    final TextStyle appBarTitleTextStyle,
    final Icon appBarIcon,
    final Color appBarColor,
    [final Function? handleBackPress]) => AppBar(
  backgroundColor: appBarColor,
  titleTextStyle: appBarTitleTextStyle,
  leading: IconButton(
    icon: appBarIcon,
    onPressed: () => handleBackPress == null
        ? _goBackToPaymentScreen(context)
        : handleBackPress(),
  ),
  title: Text(title, style: appBarTitleTextStyle),
);