I’m currently on version 3.3.9 channel stable
and experiencing some weird assertion error from ‘text_painter.dart:975:12’ – which is the following function:
/// Returns the position within the text for the given pixel offset.
TextPosition getPositionForOffset(Offset offset) {
assert(!_debugNeedsLayout);
return _paragraph!.getPositionForOffset(offset);
}
I’m working on web and it seems to happen when I move my cursor over the screen before the page has fully loaded – before my custom fonts show up.
Has anyone else experienced something similar? What’s my safest option for a production release?
** UPDATE
Now using latest version 3.3.10 channel stable
and still facing the same issue. Additionally, found this comment the source code:
// The TextPainter class should not aggressively invalidate the layout as long
// as `markNeedsLayout` is not called (i.e., the layout cache is still valid).
// See: https://github.com/flutter/flutter/issues/85108
2
Answers
Try updating Flutter Source packages:
To update to the latest compatible versions of all the dependencies listed in the pubspec.yaml file, use the upgrade command:
If still issue persists,
Try updating all packages:
This must be a source code error from flutter. You should try downgrading to version 3.2.0. I find It more state in production rollouts.