fix: Initial url on web

This commit is contained in:
Christian Pauly 2021-05-24 10:24:49 +02:00
commit ca161ce47a
2 changed files with 20 additions and 2 deletions

View file

@ -102,12 +102,24 @@ class _FluffyChatAppState extends State<FluffyChatApp> {
locale: kIsWeb
? Locale(html.window.navigator.language.split('-').first)
: null,
routes: AppRoutes(columnMode).routes,
routes: AppRoutes(columnMode, initialUrl: _initialUrl).routes,
builder: (context, child) {
LoadingDialog.defaultTitle = L10n.of(context).loadingPleaseWait;
LoadingDialog.defaultBackLabel = L10n.of(context).close;
LoadingDialog.defaultOnError =
(Object e) => e.toLocalizedString(context);
WidgetsBinding.instance.addPostFrameCallback((_) {
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
systemNavigationBarColor: Theme.of(context).backgroundColor,
systemNavigationBarIconBrightness:
Theme.of(context).brightness == Brightness.light
? Brightness.dark
: Brightness.light,
),
);
});
return Matrix(
key: _matrix,
context: context,