Closed noxasch closed 2 years ago
closing this as I cannot reproduce bare minimum in flutter.
If anyone wondering, this is because i have a relatively complex widget tree and haven't been able to reproduce the issue in minimal project. in the meantime I'm using my own for with this fix since it solve my issue:
final RenderBox box =
_containerKey.currentContext?.findRenderObject() as RenderBox;
if (box.hasSize) {
setState(() {
_containerWidth = _containerKey.currentContext?.size?.width ?? 0.0;
_containerHeight =
_containerKey.currentContext?.size?.height ?? 0.0;
if (_keyIndicator.currentContext != null) {
_indicatorWidth =
_keyIndicator.currentContext?.size?.width ?? 0.0;
_indicatorHeight =
_keyIndicator.currentContext?.size?.height ?? 0.0;
}
});
}
After investigating, the issue was cause by ListView that contain the LinearPercentIndicator. By setting shrinkWrap: true
seems to resolve this issue.
Description
I have a nested routes like ''home -> items".
where '/' (home) path contains widget that use percent_indicator.
If I run '/items' directly the stack will be
home -> item screen
, it will throw the error:Where the error is thrown:
Version
percent_indicator: 4.2.2 Flutter SDK: 3.0.5