Handle "TutorialCoachMark (ERROR): It was not possible to obtain target position."
Hi !
When this error occurs, a white overlay covers the entire app. The user is forced to restart the application.
Or can I handle this exception ?
The code in Widget _buildContents() should handle a null target, don't you think ?
TargetPosition target = getTargetCurrent(currentTarget);
var positioned = Offset(
target.offset.dx + target.size.width / 2,
target.offset.dy + target.size.height / 2,
);
In my app, this error often happens because tutorials are added on multiple tabs. If the user taps on a tab, the tutorial is activated. But if he also clicks quickly on another tab, it will result in the following error : TutorialCoachMark (ERROR): It was not possible to obtain target position, because the target is no longer on screen.
Thanks !
I would suggest wrapping your Screens with an Ignore Pointer / Absorb Pointer to handle unwanted taps and ignore the taps while the tutorial is not finished (I am personally keeping track of each individual tutorial with a bool, its easy to manage with your state-management of choice). I don't think that this error should be the norm.