diff --git a/lib/pages/analytics/modules/analytics/widgets/month_picker_widget.dart b/lib/pages/analytics/modules/analytics/widgets/month_picker_widget.dart index ab7603e5..57133b02 100644 --- a/lib/pages/analytics/modules/analytics/widgets/month_picker_widget.dart +++ b/lib/pages/analytics/modules/analytics/widgets/month_picker_widget.dart @@ -178,7 +178,6 @@ class _MonthPickerWidgetState extends State { shrinkWrap: true, itemCount: 12, physics: const NeverScrollableScrollPhysics(), - padding: const EdgeInsets.all(8), gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 3, childAspectRatio: 2.5, @@ -191,27 +190,39 @@ class _MonthPickerWidgetState extends State { return InkWell( onTap: isFutureMonth ? null : () => setState(() => _selectedMonth = index), - child: Container( - alignment: Alignment.center, + child: DecoratedBox( decoration: BoxDecoration( - color: isSelected - ? ColorsManager.vividBlue.withValues(alpha: 0.7) - : isFutureMonth - ? ColorsManager.grey700.withValues(alpha: 0.1) - : const Color(0xFFEDF2F7), - borderRadius: - isSelected ? BorderRadius.circular(15) : BorderRadius.zero, + color: const Color(0xFFEDF2F7), + borderRadius: BorderRadius.only( + topLeft: index % 3 == 0 ? const Radius.circular(16) : Radius.zero, + bottomLeft: index % 3 == 0 ? const Radius.circular(16) : Radius.zero, + topRight: index % 3 == 2 ? const Radius.circular(16) : Radius.zero, + bottomRight: + index % 3 == 2 ? const Radius.circular(16) : Radius.zero, + ), ), - child: Text( - _monthNames[index], - style: context.textTheme.titleSmall?.copyWith( - fontSize: 12, + child: Container( + alignment: Alignment.center, + decoration: BoxDecoration( color: isSelected - ? ColorsManager.whiteColors + ? ColorsManager.vividBlue.withValues(alpha: 0.7) : isFutureMonth - ? ColorsManager.blackColor.withValues(alpha: 0.3) - : ColorsManager.blackColor.withValues(alpha: 0.8), - fontWeight: FontWeight.w500, + ? ColorsManager.grey700.withValues(alpha: 0.1) + : const Color(0xFFEDF2F7), + borderRadius: + isSelected ? BorderRadius.circular(15) : BorderRadius.zero, + ), + child: Text( + _monthNames[index], + style: context.textTheme.titleSmall?.copyWith( + fontSize: 12, + color: isSelected + ? ColorsManager.whiteColors + : isFutureMonth + ? ColorsManager.blackColor.withValues(alpha: 0.3) + : ColorsManager.blackColor.withValues(alpha: 0.8), + fontWeight: FontWeight.w500, + ), ), ), ), diff --git a/lib/pages/analytics/modules/analytics/widgets/year_picker_widget.dart b/lib/pages/analytics/modules/analytics/widgets/year_picker_widget.dart index 2bcb223b..22eb6646 100644 --- a/lib/pages/analytics/modules/analytics/widgets/year_picker_widget.dart +++ b/lib/pages/analytics/modules/analytics/widgets/year_picker_widget.dart @@ -109,7 +109,6 @@ class _YearPickerWidgetState extends State { shrinkWrap: true, itemCount: years.length, physics: const NeverScrollableScrollPhysics(), - padding: const EdgeInsets.all(8), gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 3, childAspectRatio: 2.5, @@ -120,23 +119,35 @@ class _YearPickerWidgetState extends State { final isSelected = _currentYear == years[index]; return InkWell( onTap: () => setState(() => _currentYear = years[index]), - child: Container( - alignment: Alignment.center, + child: DecoratedBox( decoration: BoxDecoration( - color: isSelected - ? ColorsManager.vividBlue.withValues(alpha: 0.7) - : const Color(0xFFEDF2F7), - borderRadius: - isSelected ? BorderRadius.circular(15) : BorderRadius.zero, + color: const Color(0xFFEDF2F7), + borderRadius: BorderRadius.only( + topLeft: index % 3 == 0 ? const Radius.circular(16) : Radius.zero, + bottomLeft: index % 3 == 0 ? const Radius.circular(16) : Radius.zero, + topRight: index % 3 == 2 ? const Radius.circular(16) : Radius.zero, + bottomRight: + index % 3 == 2 ? const Radius.circular(16) : Radius.zero, + ), ), - child: Text( - years[index].toString(), - style: context.textTheme.titleSmall?.copyWith( - fontSize: 12, + child: Container( + alignment: Alignment.center, + decoration: BoxDecoration( color: isSelected - ? ColorsManager.whiteColors - : ColorsManager.blackColor.withValues(alpha: 0.8), - fontWeight: FontWeight.w500, + ? ColorsManager.vividBlue.withValues(alpha: 0.7) + : const Color(0xFFEDF2F7), + borderRadius: + isSelected ? BorderRadius.circular(15) : BorderRadius.zero, + ), + child: Text( + years[index].toString(), + style: context.textTheme.titleSmall?.copyWith( + fontSize: 12, + color: isSelected + ? ColorsManager.whiteColors + : ColorsManager.blackColor.withValues(alpha: 0.8), + fontWeight: FontWeight.w500, + ), ), ), ),