createTextOverlayContent method
Implementation
OverlayContent createTextOverlayContent(BuildContext context, PlainTextTutorialStep tutorialStep) {
Size tutorialTextSize = _calculateTextSize(context, tutorialStep.tutorialText);
double overlayPositionLeft = SizeConfig.screenWidth(context) / 2 - tutorialTextSize.width / 1.75;
double overlayPositionTop = SizeConfig.screenHeight(context) / 2 + tutorialTextSize.height;
return OverlayContent(
exclusionRect:
Rect.fromLTWH(overlayPositionLeft, overlayPositionTop, tutorialTextSize.width, tutorialTextSize.height + 100),
textPosition: Offset(overlayPositionLeft, overlayPositionTop + 50),
buttonPosition:
Offset(overlayPositionLeft + tutorialTextSize.width / 2 - buttonWidth / 2, overlayPositionTop + 100),
tutorialText: tutorialStep.tutorialText,
);
}