mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-01-23 10:34:25 +01:00
fix: Systemuioverlaystyle
This commit is contained in:
parent
8292ee77d1
commit
c0d446b41e
@ -10,6 +10,7 @@ import 'package:fluffychat/utils/sentry_controller.dart';
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_app_lock/flutter_app_lock.dart';
|
import 'package:flutter_app_lock/flutter_app_lock.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
import 'package:universal_html/html.dart' as html;
|
import 'package:universal_html/html.dart' as html;
|
||||||
@ -76,32 +77,41 @@ class FluffyChatApp extends StatelessWidget {
|
|||||||
? Locale(html.window.navigator.language.split('-').first)
|
? Locale(html.window.navigator.language.split('-').first)
|
||||||
: null,
|
: null,
|
||||||
home: Builder(
|
home: Builder(
|
||||||
builder: (context) => Matrix(
|
builder: (context) {
|
||||||
context: context,
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
apl: _apl,
|
SystemChrome.setSystemUIOverlayStyle(
|
||||||
testClient: testClient,
|
Theme.of(context).brightness == Brightness.light
|
||||||
child: Builder(
|
? SystemUiOverlayStyle.light
|
||||||
builder: (context) => AdaptivePageLayout(
|
: SystemUiOverlayStyle.dark,
|
||||||
key: _apl,
|
);
|
||||||
safeAreaOnColumnView: false,
|
});
|
||||||
onGenerateRoute: testWidget == null
|
return Matrix(
|
||||||
? FluffyRoutes(context).onGenerateRoute
|
context: context,
|
||||||
: (_) => ViewData(mainView: (_) => testWidget),
|
apl: _apl,
|
||||||
dividerColor: Theme.of(context).dividerColor,
|
testClient: testClient,
|
||||||
columnWidth: FluffyThemes.columnWidth,
|
child: Builder(
|
||||||
dividerWidth: 1.0,
|
builder: (context) => AdaptivePageLayout(
|
||||||
routeBuilder: (builder, settings) =>
|
key: _apl,
|
||||||
Matrix.of(context).loginState == LoginState.logged &&
|
safeAreaOnColumnView: false,
|
||||||
!{
|
onGenerateRoute: testWidget == null
|
||||||
'/',
|
? FluffyRoutes(context).onGenerateRoute
|
||||||
'/search',
|
: (_) => ViewData(mainView: (_) => testWidget),
|
||||||
'/contacts',
|
dividerColor: Theme.of(context).dividerColor,
|
||||||
}.contains(settings.name)
|
columnWidth: FluffyThemes.columnWidth,
|
||||||
? MaterialPageRoute(builder: builder)
|
dividerWidth: 1.0,
|
||||||
: FadeRoute(page: builder(context)),
|
routeBuilder: (builder, settings) =>
|
||||||
|
Matrix.of(context).loginState == LoginState.logged &&
|
||||||
|
!{
|
||||||
|
'/',
|
||||||
|
'/search',
|
||||||
|
'/contacts',
|
||||||
|
}.contains(settings.name)
|
||||||
|
? MaterialPageRoute(builder: builder)
|
||||||
|
: FadeRoute(page: builder(context)),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
),
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user