Comments (8)
@jfdeveloper92 I had same issue and it was solved when i used
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(statusBarColor: Colors.transparent));
from flutter_statusbarcolor.
@amitkhairnar44 are you using the white status bar? I did this and my icons are also white for some reason. I am using
FlutterStatusbarcolor.setNavigationBarColor(Colors.white);
FlutterStatusbarcolor.setNavigationBarWhiteForeground(false);
FlutterStatusbarcolor.setStatusBarColor(Colors.white);
FlutterStatusbarcolor.setStatusBarWhiteForeground(false);
from flutter_statusbarcolor.
@jfdeveloper92 I'm not using white status bar. If your AppBar's color is white then no need to set white background in status bar. Just set it transparent using
FlutterStatusbarcolor.setStatusBarWhiteForeground(false);
from flutter_statusbarcolor.
Or see this example code
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_statusbarcolor/flutter_statusbarcolor.dart';
main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => new _MyAppState();
}
class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
Key key = new UniqueKey();
@override
Widget build(BuildContext context) {
return MaterialApp(
key: key,
title: 'Example',
home: new HomePage(),
);
}
@override
didChangeAppLifecycleState(AppLifecycleState state) {
if (state == AppLifecycleState.resumed) {
_changeStatusBarColor();
}
super.didChangeAppLifecycleState(state);
}
@override
dispose() {
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
_changeStatusBarColor();
}
_changeStatusBarColor() async {
await FlutterStatusbarcolor.setStatusBarWhiteForeground(false);
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Colors.transparent));
}
}
from flutter_statusbarcolor.
@amitkhairnar44 Thanks. Do you know of a way to set the screen fullscreen while keeping these settings? Im currently using the below code to make the screen full screen while on landscape. However with this code it is ignoring the status bar color.
if (MediaQuery
.of(context)
.orientation == Orientation.landscape) {
SystemChrome.setEnabledSystemUIOverlays([]);
} else {
SystemChrome.setEnabledSystemUIOverlays(
[SystemUiOverlay.bottom, SystemUiOverlay.top]);
}
from flutter_statusbarcolor.
@jfdeveloper92 In portrait or landscape?
from flutter_statusbarcolor.
@amitkhairnar44 well im wanting the app to go full screen in landscape then go back to normal on in portrait. Its a video app so im wanting the video to go full screen when you go landscape.
from flutter_statusbarcolor.
also while keeping the statusbar color
from flutter_statusbarcolor.
Related Issues (20)
- Plugin not working with background-fetch plugin
- iOS 13 build failing HOT 11
- status bar foreground disappears when turning back from the desktop. HOT 2
- iOS navigation bar color is always black ? HOT 1
- iOS build error : Property 'windowScene' not found on object of type 'UIWindow *' HOT 6
- iOS build error : Property 'windowScene' not found on object of type 'UIWindow *' HOT 3
- Build failed for iOS simulator on Mac HOT 1
- Color shows on top of app on iOS 13 in landscape mode on phones HOT 5
- Not working in iOS 13+ Dark mode HOT 3
- Bottom navigation Foreground Issue Android
- useWhiteForeground() should use "HSP Color Model" for better results
- iOS build error: warning: implicit conversion from 'long long' to 'NSInteger' (aka 'int') HOT 2
- Doesn't work on Android HOT 4
- color status bar disappears, when moving pages (Navigator) HOT 1
- iOS `UIViewControllerBasedStatusBarAppearance = YES`
- FlutterStatusbarcolor.setStatusBarWhiteForeground(true); not working in ios 13 dark mode
- Add Flutter Module to a Native App
- META: flutter_statusbarcolor vs AnnotatedRegion
- Inability to use full screen screens
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_statusbarcolor.