use `useEffect` instead of just plainly changing systemChrome
This commit is contained in:
parent
704c7de2e6
commit
4ca8e96e97
|
@ -46,9 +46,13 @@ class CommunityPage extends HookWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
useEffect(() {
|
||||||
statusBarColor: Colors.white,
|
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||||
statusBarIconBrightness: Brightness.dark));
|
statusBarColor: Colors.white,
|
||||||
|
statusBarIconBrightness: Brightness.dark));
|
||||||
|
|
||||||
|
return SystemChrome.restoreSystemUIOverlays;
|
||||||
|
});
|
||||||
|
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
var fullCommunitySnap = useFuture(_fullCommunityFuture);
|
var fullCommunitySnap = useFuture(_fullCommunityFuture);
|
||||||
|
|
Loading…
Reference in New Issue