mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-25 17:19: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:
@ -43,7 +43,7 @@ class CustomExpansionTileSpaceTree extends StatelessWidget {
|
||||
|
||||
return ColorsManager.checkBoxFillColor;
|
||||
}),
|
||||
checkColor: ColorsManager.whiteColors,
|
||||
checkColor: ColorsManager.white,
|
||||
),
|
||||
_buildExpansionIcon(),
|
||||
Expanded(
|
||||
|
@ -48,17 +48,15 @@ class _SpaceTreeViewState extends State<SpaceTreeView> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocBuilder<SpaceTreeBloc, SpaceTreeState>(
|
||||
builder: (context, state) {
|
||||
return BlocBuilder<SpaceTreeBloc, SpaceTreeState>(builder: (context, state) {
|
||||
final communities = state.searchQuery.isNotEmpty
|
||||
? state.filteredCommunity
|
||||
: state.communityList;
|
||||
return Container(
|
||||
height: MediaQuery.sizeOf(context).height,
|
||||
decoration: widget.isSide == true
|
||||
? subSectionContainerDecoration.copyWith(
|
||||
color: ColorsManager.whiteColors)
|
||||
: const BoxDecoration(color: ColorsManager.whiteColors),
|
||||
? subSectionContainerDecoration.copyWith(color: ColorsManager.white)
|
||||
: const BoxDecoration(color: ColorsManager.white),
|
||||
child: state is SpaceTreeLoadingState
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: Column(
|
||||
@ -133,10 +131,9 @@ class _SpaceTreeViewState extends State<SpaceTreeView> {
|
||||
)
|
||||
else
|
||||
CustomSearchBar(
|
||||
onSearchChanged: (query) =>
|
||||
context.read<SpaceTreeBloc>().add(
|
||||
SearchQueryEvent(query),
|
||||
),
|
||||
onSearchChanged: (query) => context.read<SpaceTreeBloc>().add(
|
||||
SearchQueryEvent(query),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Expanded(
|
||||
@ -177,8 +174,7 @@ class _SpaceTreeViewState extends State<SpaceTreeView> {
|
||||
communities[index].uuid,
|
||||
),
|
||||
),
|
||||
isExpanded:
|
||||
state.expandedCommunities.contains(
|
||||
isExpanded: state.expandedCommunities.contains(
|
||||
communities[index].uuid,
|
||||
),
|
||||
onItemSelected: () {
|
||||
@ -226,10 +222,9 @@ class _SpaceTreeViewState extends State<SpaceTreeView> {
|
||||
),
|
||||
isSelected: state.selectedSpaces
|
||||
.contains(space.uuid) ||
|
||||
state.soldCheck
|
||||
.contains(space.uuid),
|
||||
isSoldCheck: state.soldCheck
|
||||
.contains(space.uuid),
|
||||
state.soldCheck.contains(space.uuid),
|
||||
isSoldCheck:
|
||||
state.soldCheck.contains(space.uuid),
|
||||
children: _buildNestedSpaces(
|
||||
context,
|
||||
state,
|
||||
@ -243,8 +238,7 @@ class _SpaceTreeViewState extends State<SpaceTreeView> {
|
||||
},
|
||||
),
|
||||
),
|
||||
if (state.paginationIsLoading)
|
||||
const CircularProgressIndicator(),
|
||||
if (state.paginationIsLoading) const CircularProgressIndicator(),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
Reference in New Issue
Block a user