mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
Adjust ConditionToggle widget dimensions and colors for improved UI consistency
This commit is contained in:
@ -23,9 +23,10 @@ class ConditionToggle extends StatelessWidget {
|
||||
final selectedIndex = _conditions.indexOf(currentCondition ?? "==");
|
||||
|
||||
return Container(
|
||||
height: 80,
|
||||
height: 30,
|
||||
width: MediaQuery.of(context).size.width * 0.1,
|
||||
decoration: BoxDecoration(
|
||||
color: ColorsManager.grayColor,
|
||||
color: ColorsManager.softGray.withOpacity(0.5),
|
||||
borderRadius: BorderRadius.circular(50),
|
||||
),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
@ -34,18 +35,19 @@ class ConditionToggle extends StatelessWidget {
|
||||
children: List.generate(_conditions.length, (index) {
|
||||
final isSelected = index == selectedIndex;
|
||||
return Expanded(
|
||||
child: GestureDetector(
|
||||
child: InkWell(
|
||||
onTap: () => onChanged(_conditions[index]),
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 180),
|
||||
curve: Curves.ease,
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected ? ColorsManager.blue1 : Colors.transparent,
|
||||
color:
|
||||
isSelected ? ColorsManager.vividBlue : Colors.transparent,
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
_icons[index],
|
||||
size: 38,
|
||||
size: 20,
|
||||
color: isSelected
|
||||
? ColorsManager.whiteColors
|
||||
: ColorsManager.blackColor,
|
||||
|
Reference in New Issue
Block a user