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:
Faris Armoush
2025-07-24 10:27:17 +03:00
parent 04d1c37308
commit 99924c1e62
164 changed files with 911 additions and 997 deletions

View File

@ -56,7 +56,7 @@ class SearchResetButtons extends StatelessWidget {
decoration: containerDecoration,
child: Center(
child: DefaultButton(
backgroundColor: ColorsManager.whiteColors,
backgroundColor: ColorsManager.white,
borderRadius: 9,
onPressed: onReset,
child: Text(

View File

@ -35,7 +35,7 @@ class CurtainToggle extends StatelessWidget {
children: [
ClipOval(
child: Container(
color: ColorsManager.whiteColors,
color: ColorsManager.white,
child: SvgPicture.asset(
Assets.curtainIcon,
width: 60,

View File

@ -127,13 +127,11 @@ class _DynamicTableState extends State<DynamicTable> {
controller: _horizontalScrollController,
thumbVisibility: true,
trackVisibility: true,
notificationPredicate: (notif) =>
notif.metrics.axis == Axis.horizontal,
notificationPredicate: (notif) => notif.metrics.axis == Axis.horizontal,
child: SingleChildScrollView(
controller: _horizontalScrollController,
scrollDirection: Axis.horizontal,
physics:
widget.isEmpty ? const NeverScrollableScrollPhysics() : null,
physics: widget.isEmpty ? const NeverScrollableScrollPhysics() : null,
child: SizedBox(
width: _totalTableWidth,
child: Column(
@ -195,29 +193,25 @@ class _DynamicTableState extends State<DynamicTable> {
widget.headers[colIndex] == 'Settings'
? buildSettingsIcon(
width: _settingsColumnWidth,
onTap: () => widget
.onSettingsPressed
onTap: () => widget.onSettingsPressed
?.call(rowIndex),
)
: _buildTableCell(
row[colIndex].toString(),
width: widget.headers[
colIndex] ==
width: widget.headers[colIndex] ==
'Settings'
? _settingsColumnWidth
: (_totalTableWidth -
(widget.withCheckBox
? _checkboxColumnWidth
: 0) -
(widget.headers
.contains(
'Settings')
(widget.headers.contains(
'Settings')
? _settingsColumnWidth
: 0)) /
(widget.headers.length -
(widget.headers
.contains(
'Settings')
(widget.headers.contains(
'Settings')
? 1
: 0)),
rowIndex: rowIndex,
@ -241,7 +235,7 @@ class _DynamicTableState extends State<DynamicTable> {
Widget _buildEmptyState() => Container(
height: widget.size.height,
color: ColorsManager.whiteColors,
color: ColorsManager.white,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -281,9 +275,8 @@ class _DynamicTableState extends State<DynamicTable> {
),
child: Checkbox(
value: _selectAll,
onChanged: widget.withSelectAll && widget.data.isNotEmpty
? _toggleSelectAll
: null,
onChanged:
widget.withSelectAll && widget.data.isNotEmpty ? _toggleSelectAll : null,
),
);
}
@ -300,7 +293,7 @@ class _DynamicTableState extends State<DynamicTable> {
width: 1.0,
),
),
color: ColorsManager.whiteColors,
color: ColorsManager.white,
),
alignment: Alignment.centerLeft,
child: Center(
@ -341,9 +334,7 @@ class _DynamicTableState extends State<DynamicTable> {
}
Widget _buildTableCell(String content,
{required double width,
required int rowIndex,
required int columnIndex}) {
{required double width, required int rowIndex, required int columnIndex}) {
bool isBatteryLevel = content.endsWith('%');
double? batteryLevel;
@ -415,7 +406,7 @@ class _DynamicTableState extends State<DynamicTable> {
height: _fixedRowHeight,
padding: const EdgeInsets.only(left: 15, top: 10, bottom: 10),
decoration: const BoxDecoration(
color: ColorsManager.whiteColors,
color: ColorsManager.white,
border: Border(
bottom: BorderSide(
color: ColorsManager.boxDivider,