mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-26 01:09:40 +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:
@ -3,6 +3,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_web/pages/routines/create_new_routines/dropdown_menu_content.dart';
|
||||
import 'package:syncrow_web/pages/spaces_management/all_spaces/model/community_model.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
|
||||
import 'space_tree_dropdown_bloc.dart';
|
||||
|
||||
class SpaceTreeDropdown extends StatelessWidget {
|
||||
@ -176,7 +177,7 @@ class _DropdownContentState extends State<_DropdownContent> {
|
||||
showWhenUnlinked: false,
|
||||
offset: const Offset(0, 48),
|
||||
child: Material(
|
||||
color: ColorsManager.whiteColors,
|
||||
color: ColorsManager.white,
|
||||
elevation: 8,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
child: BlocProvider.value(
|
||||
@ -201,8 +202,7 @@ class _DropdownContentState extends State<_DropdownContent> {
|
||||
Overlay.of(context).insert(_overlayEntry!);
|
||||
}
|
||||
|
||||
CommunityModel? _findCommunity(
|
||||
SpaceTreeDropdownState state, String? communityId) {
|
||||
CommunityModel? _findCommunity(SpaceTreeDropdownState state, String? communityId) {
|
||||
if (communityId == null) return null;
|
||||
try {
|
||||
return state.filteredCommunities.firstWhere((c) => c.uuid == communityId);
|
||||
|
@ -35,8 +35,7 @@ class SpaceDropdown extends StatelessWidget {
|
||||
DropdownButton2<String>(
|
||||
underline: const SizedBox(),
|
||||
buttonStyleData: ButtonStyleData(
|
||||
decoration:
|
||||
BoxDecoration(borderRadius: BorderRadius.circular(12)),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12)),
|
||||
),
|
||||
value: selectedValue,
|
||||
items: spaces.map((space) {
|
||||
@ -98,9 +97,7 @@ class SpaceDropdown extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(left: 10),
|
||||
child: Text(
|
||||
selectedValue != null
|
||||
? spaces
|
||||
.firstWhere((e) => e.uuid == selectedValue)
|
||||
.name
|
||||
? spaces.firstWhere((e) => e.uuid == selectedValue).name
|
||||
: hintMessage,
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||
fontSize: 13,
|
||||
@ -134,7 +131,7 @@ class SpaceDropdown extends StatelessWidget {
|
||||
dropdownStyleData: DropdownStyleData(
|
||||
maxHeight: MediaQuery.of(context).size.height * 0.4,
|
||||
decoration: BoxDecoration(
|
||||
color: ColorsManager.whiteColors,
|
||||
color: ColorsManager.white,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user