backButton method

Widget backButton(
  1. BuildContext context
)

Back button. 返回按钮

Implementation

Widget backButton(BuildContext context) {
  return Padding(
    padding: const EdgeInsets.symmetric(vertical: 4),
    child: IconButton(
      onPressed: () {
        Navigator.maybeOf(context)?.maybePop();
      },
      tooltip: MaterialLocalizations.of(context).closeButtonTooltip,
      icon: Icon(
        Icons.close,
        semanticLabel: MaterialLocalizations.of(context).closeButtonTooltip,
      ),
    ),
  );
}