AppFlowy/frontend/appflowy_flutter/lib/util/navigator_context_extension.dart
Lucas a46550c250
feat: support managing a space on mobile (#6764)
* feat: support duplicating and deleting a space on mobile

* feat: support editing a space on mobile

* feat: support renaming space

* feat: add more space icons

* fix: unable to rename space

* fix: code review

* chore: remove ingore import flag for testing

* test: add create space test

* chore: enable cloud test

* test: fix space test

* test: add rename/duplicate/delete tests
2024-11-13 11:10:15 +08:00

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;
});
}
}