use `useEffect` instead of just plainly changing systemChrome

This commit is contained in:
krawieck 2020-09-10 15:16:45 +02:00
parent 704c7de2e6
commit 4ca8e96e97
1 changed files with 7 additions and 3 deletions

View File

@ -46,10 +46,14 @@ class CommunityPage extends HookWidget {
@override
Widget build(BuildContext context) {
useEffect(() {
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: Colors.white,
statusBarIconBrightness: Brightness.dark));
return SystemChrome.restoreSystemUIOverlays;
});
final theme = Theme.of(context);
var fullCommunitySnap = useFuture(_fullCommunityFuture);