popToRoot method

  1. @override
Future<void> popToRoot()
override

pop 到根页面

Implementation

@override
Future<void> popToRoot() async {
  return Navigator.popUntil(
    rootContext,
    (route) => route.isFirst,
  );
}