mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-10-30 01:17:55 +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;
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|