guru_sdk/guru_ui/example/lib/route/routes.dart

47 lines
1.5 KiB
Dart

/// Created by @KernelTea on 2021/4/13
///
part of "router.dart";
class Routes {
static const canMuxDlg = "can_mux_dlg";
static const String scheme = "https";
static const String authority = "example";
static const root = RoutePath("");
static const home = RoutePath("home");
static const selection = RoutePath("selection");
static const button = RoutePath("button");
static const dialog = RoutePath("dialog");
static const settings = RoutePath("settings");
static const tabbar = RoutePath("tabbar");
static const webview = RoutePath("webview");
static const privacySettings = RoutePath("privacySettings", parentPath: webview);
static const toast = RoutePath("toast");
static const awards = RoutePath("awards");
static const store = RoutePath("store");
static const visual = RoutePath("visual");
static RouteSettings buildAnonymous(
{bool canShowBanner = false, Map<String, dynamic>? arguments}) {
final Map<String, dynamic> args = {"canShowBanner": canShowBanner};
if (arguments != null && arguments.isNotEmpty) {
args.addAll(arguments);
}
return RouteSettings(name: IdUtils.uuidV4(), arguments: args);
}
// anonymous path
// static String get anonymous => RouteUtils.anonymous;
static int routeId = 0;
static final List<RouteMatcher> matchers = [
RouteMatcher(checker: (uri) {
return uri.path == "" || uri.path == "/home" || uri.path == "/";
}, dispatcher: (uri) async {
return;
}),
];
}