backButton method

Widget backButton(
  1. BuildContext context
)

Implementation

Widget backButton(BuildContext context) {
  return Semantics(
    label: 'Back button',
    excludeSemantics: true,
    child: IconButton(icon: Icon(
      showBack ? Icons.arrow_back : Icons.close,
      size: 24,
      color: Colors.black,
      key: const Key('CommonHeaderCloseIcon'),
    ),
    onPressed: () {
      if (onBackButtonPressed != null) {
        onBackButtonPressed!();
      }
      Navigator.pop(context);
    })
  );
}