AppFlowy/frontend/appflowy_flutter/lib/util/navigator_context_exntesion.dart
Lucas 813c8e6b86
feat: support workspace ops on mobile (#6449)
* feat: support workspace ops on mobile

* chore: move the member bloc to workspace menu item widget

* feat: support creating workspace on mobile

* chore: add popToHome extension

* fix: flutter analyze

* feat: support renaming a workspace

* feat: support deleting a workspace

* feat: support leaving a workspace

* feat: workspace icon ui revamp

* feat: support updating workspace icon on mobile

* feat: show a confirm dialog before deleting a workspace

* fix: workspace name overflow

* feat: support leaving a workspace

* chore: update translations

* feat: show a toast after renaming workspace

* feat: update translations

* feat: add workspace operation integration tests on mobile

* test: add create workspace test on mobile
2024-10-02 20:13:19 +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;
});
}
}