mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-25 01:50:56 +00:00
13 lines
252 B
Dart
13 lines
252 B
Dart
![]() |
import 'package:flutter/material.dart';
|
||
|
|
||
|
extension NavigatorContext on BuildContext {
|
||
|
void popToHome() {
|
||
|
Navigator.of(this).popUntil((route) {
|
||
|
if (route.settings.name == '/') {
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
});
|
||
|
}
|
||
|
}
|