table_calendar icon indicating copy to clipboard operation
table_calendar copied to clipboard

The following assertion was thrown building AnimatedContainer(duration: 250ms, Alignment.center, padding: EdgeInsets.zero, bg: BoxDecoration(color: Color(0xff6262d5), borderRadius: BorderRadius.circular(10.0)), margin: EdgeInsets.all(6.0), clipBehavior: Clip.none, dirty, state: _AnimatedContainerState#d3f3a(ticker active, AlignmentGeometryTween(Alignment.center → Alignment.center), padding: EdgeInsetsGeometryTween(EdgeInsets.zero → EdgeInsets.zero), bg: DecorationTween(BoxDecoration(shape: circle) → BoxDecoration(color: Color(0xff6262d5), borderRadius: BorderRadius.circular(10.0))), margin: EdgeInsetsGeometryTween(EdgeInsets.all(6.0) → EdgeInsets.all(6.0)))): 'package:flutter/src/painting/box_decoration.dart': Failed assertion: line 128 pos 12: 'shape != BoxShape.circle || borderRadius == null': is not true.

Open ShiyanaSam opened this issue 1 year ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

To reproduce Please include a short code sample that can be used to reproduce the problem. TableCalendar(

                      calendarStyle: CalendarStyle(
                        todayTextStyle: AppTextStyles.n14w600.black,
                        todayDecoration:
                            const BoxDecoration(borderRadius: null),


                        rangeHighlightColor: AppColors.progressBackground,
                        rangeStartTextStyle: AppTextStyles.n14w600.white,
                        rangeEndTextStyle: AppTextStyles.n14w600.white,
                        rangeStartDecoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(10),
                          color: AppColors.primaryLightPurple,
                  
                        ),
                        rangeEndDecoration: BoxDecoration(
                          color: AppColors.primaryLightPurple,
                          borderRadius: BorderRadius.circular(10),
                        ),
                      ),
                      rowHeight: 40,
                      currentDay: DateTime.now(),
                      focusedDay: DateTime.now(),
                      firstDay: DateTime(2000),
                      lastDay: DateTime.now(),
           
                      onFormatChanged: (format) {
            
                      },
                      onPageChanged: (focusedDay) {
                        _focusedDay = focusedDay;
                      },
                      rangeEndDay: _rangeEnd,
                      rangeStartDay: _rangeStart,
                      rangeSelectionMode: RangeSelectionMode.toggledOn,
                      onRangeSelected: _onRangeSelected,
                      headerStyle: HeaderStyle(
                        titleCentered: true,
                        titleTextStyle: AppTextStyles.n16w700,
                        formatButtonVisible: false,
                      ),
                      daysOfWeekStyle: DaysOfWeekStyle(
                        weekdayStyle: AppTextStyles.n12w700.primaryPurple,
                        weekendStyle: AppTextStyles.n12w700.primaryPurple,
                      ),
                    ),

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Output of flutter doctor Paste the result of this command here. The following assertion was thrown building AnimatedContainer(duration: 250ms, Alignment.center, padding: EdgeInsets.zero, bg: BoxDecoration(color: Color(0xff6262d5), borderRadius: BorderRadius.circular(10.0)), margin: EdgeInsets.all(6.0), clipBehavior: Clip.none, dirty, state: _AnimatedContainerState#d3f3a(ticker active, AlignmentGeometryTween(Alignment.center → Alignment.center), padding: EdgeInsetsGeometryTween(EdgeInsets.zero → EdgeInsets.zero), bg: DecorationTween(BoxDecoration(shape: circle) → BoxDecoration(color: Color(0xff6262d5), borderRadius: BorderRadius.circular(10.0))), margin: EdgeInsetsGeometryTween(EdgeInsets.all(6.0) → EdgeInsets.all(6.0)))): 'package:flutter/src/painting/box_decoration.dart': Failed assertion: line 128 pos 12: 'shape != BoxShape.circle || borderRadius == null': is not true.

Additional context Add any other context about the problem here.

ShiyanaSam avatar Jan 29 '24 11:01 ShiyanaSam

you need to set all decoration

zhangjinhuang avatar Feb 05 '24 10:02 zhangjinhuang

Looks like duplicate of https://github.com/aleksanderwozniak/table_calendar/issues/583

aleksanderwozniak avatar Mar 24 '24 12:03 aleksanderwozniak