-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NASA] titlebar updates to work better on android
- Loading branch information
1 parent
8ed74e7
commit 4f875e0
Showing
13 changed files
with
121 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,35 @@ | ||
// Dart | ||
import "dart:io" show Platform; | ||
|
||
// Flutter | ||
import "package:flutter/material.dart"; | ||
import "package:flutter/services.dart"; | ||
|
||
/// Utility function to darken the title bar. | ||
void darkTitlebar() { | ||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark.copyWith( | ||
statusBarColor: Colors.black, statusBarBrightness: Brightness.light,),); | ||
void setTitlebar(String theme) { | ||
Brightness dark = Brightness.dark; | ||
Brightness light = Brightness.light; | ||
|
||
if (Platform.isIOS) { | ||
dark = Brightness.light; | ||
light = Brightness.dark; | ||
} | ||
|
||
if (theme == "light") { | ||
SystemChrome.setSystemUIOverlayStyle( | ||
SystemUiOverlayStyle.dark.copyWith( | ||
systemNavigationBarColor: Colors.black, | ||
statusBarColor: Colors.transparent, | ||
statusBarBrightness: dark, | ||
), | ||
); | ||
} else { | ||
SystemChrome.setSystemUIOverlayStyle( | ||
SystemUiOverlayStyle.light.copyWith( | ||
systemNavigationBarColor: Colors.black, | ||
statusBarColor: Colors.transparent, | ||
statusBarBrightness: light, | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.