feat(category): add autocomplete for category inputs
This commit is contained in:
@@ -109,6 +109,8 @@ class CategorySelector extends ConsumerWidget {
|
||||
required VoidCallback onTap,
|
||||
}) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
final activeColor = isDark ? AppColors.darkPrimary : AppColors.lightPrimary;
|
||||
final accentColor = isSelected ? activeColor : color;
|
||||
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
@@ -120,13 +122,13 @@ class CategorySelector extends ConsumerWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected
|
||||
? color.withOpacity(0.2)
|
||||
? accentColor.withOpacity(0.2)
|
||||
: isDark
|
||||
? AppColors.darkSurface
|
||||
: AppColors.lightBackground,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: Border.all(
|
||||
color: isSelected ? color : Colors.transparent,
|
||||
color: isSelected ? accentColor : Colors.transparent,
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
@@ -137,7 +139,7 @@ class CategorySelector extends ConsumerWidget {
|
||||
icon,
|
||||
size: 20,
|
||||
color: isSelected
|
||||
? color
|
||||
? accentColor
|
||||
: isDark
|
||||
? AppColors.darkTextSecondary
|
||||
: AppColors.lightTextSecondary,
|
||||
@@ -147,7 +149,7 @@ class CategorySelector extends ConsumerWidget {
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: isSelected
|
||||
? color
|
||||
? accentColor
|
||||
: isDark
|
||||
? AppColors.darkText
|
||||
: AppColors.lightText,
|
||||
|
||||
Reference in New Issue
Block a user