mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-25 14:29:41 +00:00
Refactor color management and UI components for consistency
- Updated color references in various widgets to use the new `opaquePrimary` color for better visual consistency. - Refactored `ColorsManager` to improve color definitions and removed redundant color declarations. - Enhanced UI elements across multiple dialogs and widgets to ensure a cohesive design language. This change promotes maintainability and aligns with the updated color scheme.
This commit is contained in:
@ -66,7 +66,7 @@ class _DialogDropdownState extends State<DialogDropdown> {
|
||||
child: Material(
|
||||
elevation: 4.0,
|
||||
child: Container(
|
||||
color: ColorsManager.whiteColors,
|
||||
color: ColorsManager.white,
|
||||
constraints: const BoxConstraints(
|
||||
maxHeight: 200.0, // Set max height for dropdown
|
||||
),
|
||||
@ -87,12 +87,10 @@ class _DialogDropdownState extends State<DialogDropdown> {
|
||||
child: ListTile(
|
||||
title: Text(
|
||||
item,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium
|
||||
?.copyWith(
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
style:
|
||||
Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
widget.onSelected(item);
|
||||
|
@ -14,7 +14,7 @@ class EditChip extends StatelessWidget {
|
||||
this.label = 'Edit',
|
||||
required this.onTap,
|
||||
this.labelColor = ColorsManager.spaceColor,
|
||||
this.backgroundColor = ColorsManager.whiteColors,
|
||||
this.backgroundColor = ColorsManager.white,
|
||||
this.borderColor = ColorsManager.spaceColor,
|
||||
this.borderRadius = 16.0,
|
||||
}) : super(key: key);
|
||||
@ -24,10 +24,9 @@ class EditChip extends StatelessWidget {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Chip(
|
||||
label: Text(
|
||||
label,
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(color: labelColor)
|
||||
),
|
||||
label: Text(label,
|
||||
style:
|
||||
Theme.of(context).textTheme.bodySmall!.copyWith(color: labelColor)),
|
||||
backgroundColor: backgroundColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(borderRadius),
|
||||
|
@ -17,8 +17,7 @@ class TagDialogTextfieldDropdown extends StatefulWidget {
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_DialogTextfieldDropdownState createState() =>
|
||||
_DialogTextfieldDropdownState();
|
||||
_DialogTextfieldDropdownState createState() => _DialogTextfieldDropdownState();
|
||||
}
|
||||
|
||||
class _DialogTextfieldDropdownState extends State<TagDialogTextfieldDropdown> {
|
||||
@ -97,7 +96,7 @@ class _DialogTextfieldDropdownState extends State<TagDialogTextfieldDropdown> {
|
||||
child: Material(
|
||||
elevation: 4.0,
|
||||
child: Container(
|
||||
color: ColorsManager.whiteColors,
|
||||
color: ColorsManager.white,
|
||||
constraints: const BoxConstraints(maxHeight: 200.0),
|
||||
child: StatefulBuilder(
|
||||
builder: (context, setStateDropdown) {
|
||||
@ -122,8 +121,7 @@ class _DialogTextfieldDropdownState extends State<TagDialogTextfieldDropdown> {
|
||||
.textTheme
|
||||
.bodyMedium
|
||||
?.copyWith(
|
||||
color: ColorsManager
|
||||
.textPrimaryColor)),
|
||||
color: ColorsManager.textPrimaryColor)),
|
||||
onTap: () {
|
||||
_controller.text = tag.tag ?? '';
|
||||
widget.onSelected(tag);
|
||||
|
@ -34,7 +34,7 @@ class _CustomSearchBarState extends State<CustomSearchBar> {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: ColorsManager.whiteColors,
|
||||
color: ColorsManager.white,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.2),
|
||||
|
Reference in New Issue
Block a user