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

_RenderWeekIndicatorText does not meet its constraints #131

Closed
abel-123 opened this issue Sep 27, 2022 · 1 comment
Closed

_RenderWeekIndicatorText does not meet its constraints #131

abel-123 opened this issue Sep 27, 2022 · 1 comment
Assignees
Labels
T: Fix Type: :bug: Bug Fixes

Comments

@abel-123
Copy link

abel-123 commented Sep 27, 2022

Using alpha 10 version, loading the timetable widget throws an exception:

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
_RenderWeekIndicatorText does not meet its constraints.

Constraints: BoxConstraints(0.0<=w<=14.0, 0.0<=h<=309.5)
Size: Size(16.0, 16.0)

If you are not writing your own RenderBox subclass, then this is not your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was:
MultiDateTimetable MultiDateTimetable:file:///C:/Users/healt/AndroidStudioProjects/MyWod/lib/screens/timetable/timetable.dart:67:24
When the exception was thrown, this was the stack:
#0 RenderBox.debugAssertDoesMeetConstraints. (package:flutter/src/rendering/box.dart:2295:9)
#1 RenderBox.debugAssertDoesMeetConstraints (package:flutter/src/rendering/box.dart:2382:6)
#2 RenderBox.size=. (package:flutter/src/rendering/box.dart:2066:7)
#3 RenderBox.size= (package:flutter/src/rendering/box.dart:2068:6)
#4 _RenderWeekIndicatorText.performLayout (package:timetable/src/components/week_indicator.dart:241:5)
#5 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#6 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#7 RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:249:12)
#8 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#9 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#10 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:120:14)
#11 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#12 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#13 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:120:14)
#14 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#15 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#16 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:120:14)
#17 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#18 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#19 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:120:14)
#20 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#21 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#22 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:120:14)
#23 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#24 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#25 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:120:14)
#26 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#27 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#28 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:120:14)
#29 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#30 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#31 RenderPositionedBox.performLayout (package:flutter/src/rendering/shifted_box.dart:451:14)
#32 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#33 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#34 RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:292:14)
#35 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#36 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#37 RenderFlex._computeSizes (package:flutter/src/rendering/flex.dart:836:43)
#38 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:938:32)
#39 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#40 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#41 RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:292:14)
#42 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#43 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#44 RenderFlex._computeSizes (package:flutter/src/rendering/flex.dart:836:43)
#45 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:938:32)
#46 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#47 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#48 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:318:14)
#49 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#50 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#51 RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:249:12)
#52 RenderObject.layout (package:flutter/src/rendering/object.dart:2135:7)
#53 RenderBox.layout (package:flutter/src/rendering/box.dart:2418:11)
#54 RenderFlex._computeSizes (package:flutter/src/rendering/flex.dart:903:45)
#55 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:938:32)
#56 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1973:7)
#57 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:999:18)
#58 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:513:19)
#59 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:884:13)
#60 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:378:5)
#61 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1175:15)
#62 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1104:9)
#63 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1015:5)
#64 _invoke (dart:ui/hooks.dart:148:13)
#65 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:318:5)
#66 _drawFrame (dart:ui/hooks.dart:115:31)
The following RenderObject was being processed when the exception was fired: _RenderWeekIndicatorText#95959 relayoutBoundary=up16
... parentData: offset=Offset(8.0, 2.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=14.0, 0.0<=h<=309.5)
... size: Size(16.0, 16.0)
RenderObject: _RenderWeekIndicatorText#95959 relayoutBoundary=up16
parentData: offset=Offset(8.0, 2.0) (can use size)
constraints: BoxConstraints(0.0<=w<=14.0, 0.0<=h<=309.5)
size: Size(16.0, 16.0)

My code:

            Container(
              padding: EdgeInsets.symmetric(horizontal: 10),
              child: TimetableConfig<BasicEvent>(
                child: MultiDateTimetable<BasicEvent>(),
                dateController: ref.read(dateControllerProvider.state).state,
                timeController: ref.read(timeControllerProvider.state).state,
                eventProvider: eventProviderFromFixedList(basicEvents ?? []),
                theme: TimetableThemeData(context,
                    weekdayIndicatorStyleProvider: (date) => WeekdayIndicatorStyle(context, date, textStyle: date == DateTimeTimetable.today() ? TextStyle(fontSize: 12, color: boxData.highlight) : null),
                    dateIndicatorStyleProvider: (date) => DateIndicatorStyle(context, date, decoration: date == DateTimeTimetable.today() ? BoxDecoration (shape: BoxShape.circle, color: boxData.highlight) : null),
                    nowIndicatorStyle: NowIndicatorStyle(context, lineColor: boxData.highlight),
                    timeIndicatorStyleProvider: (time) => TimeIndicatorStyle(context, time, alwaysUse24HourFormat: true)),
                eventBuilder: (context, event) => BasicEventWidget(event, onTap: () => _showEventDetails(event, sessionEvents, boxData, context),
                )
              ),
            ),
@abel-123 abel-123 added the T: Fix Type: :bug: Bug Fixes label Sep 27, 2022
@JonasWanke JonasWanke self-assigned this Jan 24, 2023
@JonasWanke
Copy link
Owner

This is fixed as part of v1.0.0-alpha.11

TruFelix added a commit to BettaSystems/timetable that referenced this issue Jan 24, 2023
commit 4815598
Author: Jonas Wanke <[email protected]>
Date:   Tue Jan 24 18:24:08 2023 +0100

    Release v1.0.0-alpha.11

commit e7bae6d
Author: Jonas Wanke <[email protected]>
Date:   Tue Jan 24 18:18:38 2023 +0100

    Add more linter rules

commit 40f1b67
Author: Jonas Wanke <[email protected]>
Date:   Tue Jan 24 18:16:46 2023 +0100

    Update black_hole_flutter to ^1.0.0

commit ed2d0a0
Author: Jonas Wanke <[email protected]>
Date:   Tue Jan 24 18:14:42 2023 +0100

    Upgrade Dart to v2.18.0, Flutter to v3.3.0

commit 59b0eb4
Author: Jonas Wanke <[email protected]>
Date:   Tue Jan 24 15:40:14 2023 +0100

    Add DateScrollActivity

    Closes: JonasWanke#110

commit 8855d85
Author: Jonas Wanke <[email protected]>
Date:   Tue Jan 24 15:39:34 2023 +0100

    Implement Diagnosticable for VisibleDateRange

commit 469a0de
Author: Jonas Wanke <[email protected]>
Date:   Tue Jan 24 15:38:46 2023 +0100

    Add DateDiagnosticsProperty

commit b35b240
Author: Jonas Wanke <[email protected]>
Date:   Tue Jan 24 15:38:31 2023 +0100

    Fix allDayEventBorder.toString()

commit 174387e
Author: Jonas Wanke <[email protected]>
Date:   Tue Jan 24 15:38:09 2023 +0100

    Fix formatting

commit 8e0315c
Author: Jonas Wanke <[email protected]>
Date:   Tue Jan 24 12:36:34 2023 +0100

    Honor maxWidth in WeekIndicator

    Closes: JonasWanke#131

commit b2f06cf
Author: Jonas Wanke <[email protected]>
Date:   Tue Jan 24 12:03:19 2023 +0100

    Remove superfluous num type arguments

commit 763661e
Author: Jonas Wanke <[email protected]>
Date:   Tue Jan 24 11:51:44 2023 +0100

    Fix MonthPageView's shrinkWrapped height when jumping to far-away date

commit c0167c2
Author: Jonas Wanke <[email protected]>
Date:   Tue Jan 24 11:51:04 2023 +0100

    Cancel animation when jumping in Date-/TimeController

    Closes JonasWanke#135
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Fix Type: :bug: Bug Fixes
Projects
None yet
Development

No branches or pull requests

2 participants