handleBackPressed method

Future<bool> handleBackPressed()

Implementation

Future<bool> handleBackPressed() async {
  final Widget? currentWidget = getCurrentWidget();
  if (currentWidget is! Screen) {
    return false;
  }

  return await currentWidget.events[ScreenEvent.backPressed]?.run(null) ??
      false;
}