mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 16:25:17 +00:00
Improve dark theme
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Navigation bar widget
|
||||
@ -18,8 +19,8 @@ enum BarCallbackActions {
|
||||
ACTION_LOGOUT
|
||||
}
|
||||
|
||||
const _PrimaryColor = Colors.blue;
|
||||
const _SecondaryColor = Colors.white;
|
||||
Color _primaryColor() => darkTheme() ? Colors.black : Colors.blue;
|
||||
Color _secondaryColor() => darkTheme() ? darkAccentColor : Colors.white;
|
||||
|
||||
/// Menu item information
|
||||
class _MenuItem {
|
||||
@ -93,7 +94,7 @@ class ComunicAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
color: Colors.blue,
|
||||
color: darkTheme() ? Colors.black : Colors.blue,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: List.generate(
|
||||
@ -134,7 +135,7 @@ class _MenuItemWidget extends StatelessWidget {
|
||||
|
||||
return Expanded(
|
||||
child: Material(
|
||||
color: isSelected ? _SecondaryColor : _PrimaryColor,
|
||||
color: isSelected ? _secondaryColor() : _primaryColor(),
|
||||
child: !item.isMenu
|
||||
? InkWell(
|
||||
child: _buildIconContainer(),
|
||||
@ -151,7 +152,7 @@ class _MenuItemWidget extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
IconTheme(
|
||||
data: IconThemeData(
|
||||
color: isSelected ? _PrimaryColor : _SecondaryColor),
|
||||
color: isSelected ? _primaryColor() : _secondaryColor()),
|
||||
child: item.icon,
|
||||
)
|
||||
],
|
||||
|
Reference in New Issue
Block a user