mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-04-22 03:26:11 +02:00
fix: match system navigation bar color with app theme
Set systemNavigationBarColor to surfaceContainer (matching the in-app NavigationBar) via AppBarTheme.systemOverlayStyle. Handles light, dark, AMOLED and dynamic color schemes automatically. Closes zarzet/SpotiFLAC-Mobile#284
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:spotiflac_android/models/theme_settings.dart';
|
||||
|
||||
class AppTheme {
|
||||
@@ -85,6 +86,20 @@ class AppTheme {
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
systemOverlayStyle: SystemUiOverlayStyle(
|
||||
// Status bar
|
||||
statusBarColor: Colors.transparent,
|
||||
statusBarIconBrightness: scheme.brightness == Brightness.dark
|
||||
? Brightness.light
|
||||
: Brightness.dark,
|
||||
// System navigation bar — match the in-app NavigationBar color
|
||||
systemNavigationBarColor: isAmoled
|
||||
? Colors.black
|
||||
: scheme.surfaceContainer,
|
||||
systemNavigationBarIconBrightness: scheme.brightness == Brightness.dark
|
||||
? Brightness.light
|
||||
: Brightness.dark,
|
||||
),
|
||||
);
|
||||
|
||||
static CardThemeData _cardTheme(ColorScheme scheme) => CardThemeData(
|
||||
|
||||
Reference in New Issue
Block a user