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,7 +77,15 @@ 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) {
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
SystemChrome.setSystemUIOverlayStyle(
|
||||||
|
Theme.of(context).brightness == Brightness.light
|
||||||
|
? SystemUiOverlayStyle.light
|
||||||
|
: SystemUiOverlayStyle.dark,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
return Matrix(
|
||||||
context: context,
|
context: context,
|
||||||
apl: _apl,
|
apl: _apl,
|
||||||
testClient: testClient,
|
testClient: testClient,
|
||||||
|
@ -101,7 +110,8 @@ class FluffyChatApp extends StatelessWidget {
|
||||||
: FadeRoute(page: builder(context)),
|
: FadeRoute(page: builder(context)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue