Refactor theme colors and styles across the application
- Introduced AppColors class to centralize color definitions for better maintainability and consistency. - Updated various screens (Settings, Vault Access, Note Card, etc.) to use AppColors for styling instead of hardcoded colors. - Enhanced UI elements with improved color contrast and accessibility. - Replaced gradient backgrounds with defined color schemes for a cohesive look. - Refactored button styles and text colors to align with the new theme structure.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:notas/theme/app_colors.dart';
|
||||
|
||||
class SearchAppBar extends StatefulWidget {
|
||||
const SearchAppBar({
|
||||
@@ -53,20 +54,19 @@ class _SearchAppBarState extends State<SearchAppBar> {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Colors.white.withValues(alpha: 0.12),
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
color: AppColors.transparent,
|
||||
border: Border(bottom: BorderSide(color: AppColors.border, width: 0.5)),
|
||||
),
|
||||
padding: const EdgeInsets.only(left: 8, right: 20, top: 7, bottom: 7),
|
||||
child: Row(
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: widget.onLeadingPressed ?? widget.onMenuPressed,
|
||||
icon: Icon(widget.leadingIcon, color: Colors.white70, size: 20),
|
||||
icon: Icon(
|
||||
widget.leadingIcon,
|
||||
color: AppColors.textSecondary,
|
||||
size: 20,
|
||||
),
|
||||
tooltip: widget.leadingTooltip,
|
||||
splashRadius: 18,
|
||||
constraints: const BoxConstraints(minWidth: 40, minHeight: 40),
|
||||
@@ -84,18 +84,23 @@ class _SearchAppBarState extends State<SearchAppBar> {
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
onChanged: widget.onSearchChanged,
|
||||
style: const TextStyle(color: Colors.white, fontSize: 13),
|
||||
cursorColor: Colors.white70,
|
||||
style: const TextStyle(
|
||||
color: AppColors.textPrimary,
|
||||
fontSize: 13,
|
||||
),
|
||||
cursorColor: AppColors.textSecondary,
|
||||
decoration: InputDecoration(
|
||||
hintText: widget.searchHint,
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white.withValues(alpha: 0.5),
|
||||
color: AppColors.textSecondary.withValues(
|
||||
alpha: 0.5,
|
||||
),
|
||||
),
|
||||
suffixIcon: _searchController.text.isNotEmpty
|
||||
? IconButton(
|
||||
icon: const Icon(
|
||||
Icons.clear,
|
||||
color: Colors.white70,
|
||||
color: AppColors.textSecondary,
|
||||
size: 18,
|
||||
),
|
||||
onPressed: () {
|
||||
@@ -111,33 +116,33 @@ class _SearchAppBarState extends State<SearchAppBar> {
|
||||
padding: EdgeInsets.only(right: 8),
|
||||
child: Icon(
|
||||
Icons.search,
|
||||
color: Colors.white70,
|
||||
color: AppColors.textSecondary,
|
||||
size: 18,
|
||||
),
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(
|
||||
color: Colors.white.withValues(alpha: 0.2),
|
||||
color: AppColors.borderStrong,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(
|
||||
color: Colors.white.withValues(alpha: 0.2),
|
||||
color: AppColors.borderStrong,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(
|
||||
color: Colors.white.withValues(alpha: 0.4),
|
||||
color: AppColors.searchFocusBorder,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: Colors.white.withValues(alpha: 0.05),
|
||||
fillColor: AppColors.fill,
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
vertical: 8,
|
||||
@@ -152,7 +157,7 @@ class _SearchAppBarState extends State<SearchAppBar> {
|
||||
child: Text(
|
||||
widget.titleText ?? '',
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
color: AppColors.textPrimary,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user