table_calendar
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.
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:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- 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.
you need to set all decoration
Looks like duplicate of https://github.com/aleksanderwozniak/table_calendar/issues/583