added support for simultan downloads in files and talk, support for background downloads, enhanced loading in files with retry
This commit is contained in:
@@ -49,6 +49,17 @@ class AppRoutes {
|
||||
static final RouteObserver<PageRoute<dynamic>> chatRouteObserver =
|
||||
RouteObserver<PageRoute<dynamic>>();
|
||||
|
||||
/// Root navigator key, set on [MaterialApp]. Lets globally-mounted UI (e.g.
|
||||
/// the downloads tray, which lives above the navigator in `MaterialApp.builder`
|
||||
/// and is therefore never covered by a pushed route) open full-page routes.
|
||||
static final GlobalKey<NavigatorState> rootNavigatorKey =
|
||||
GlobalKey<NavigatorState>();
|
||||
|
||||
/// A context that is a descendant of the root navigator (its overlay), safe to
|
||||
/// pass to `pushScreen`/`showModalBottomSheet` from outside the route tree.
|
||||
static BuildContext? get overlayContext =>
|
||||
rootNavigatorKey.currentState?.overlay?.context;
|
||||
|
||||
static void openFolder(BuildContext context, List<String> path) {
|
||||
pushScreen(context, withNavBar: false, screen: Files(path: path));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user