Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #852

Closed
ShiyanaSam opened this issue Jan 29, 2024 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@ShiyanaSam
Copy link

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 ShiyanaSam added the bug Something isn't working label Jan 29, 2024
@zhangjinhuang
Copy link

you need to set all decoration

@aleksanderwozniak
Copy link
Owner

Looks like duplicate of #583

@aleksanderwozniak aleksanderwozniak closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2024
@aleksanderwozniak aleksanderwozniak added the duplicate This issue or pull request already exists label Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants