-
Notifications
You must be signed in to change notification settings - Fork 208
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
full page messages (not focussing on any widget) #174
Comments
Found a woraround for that. You just need set the size and offeset to (1,1), then aligning your widget to make sure they are at the middle of the screen.
|
I tried this but didn't work for me. I just placed an empty SizedBox in the middle of the screen and added the key to it. |
This workaround worked for me, and I also got a nice fadeIn animation:
// Method 1: use MediaQuery to get screen size
TargetFocus(
targetPosition: TargetPosition(MediaQuery.sizeOf(context), Offset.zero),
)
// Method 2: go big
TargetFocus(
targetPosition: TargetPosition(Size(double.maxFinite, double.maxFinite), Offset.zero),
)
TargetContent(
align: ContentAlign.custom,
customPosition: CustomTargetContentPosition(left: 0, right: 0, top: 0, bottom: 0), // to cover whole screen
padding: EdgeInsets.zero,
child: ColoredBox(color: Colors.black.withOpacity(0.8)), // Use the same values as your TutorialCoachMark.colorShadow and TutorialCoachMark.opacityShadow to get the same result
) |
Thanks! @PuntitOwO |
Is it possible to insert full page messages? In other words, I need one of the targets, not linked to a specific widget since it is rather a message to the user to better explain what is coming next
The text was updated successfully, but these errors were encountered: