Skip to content
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

showoverlay wrong size #133

Open
haygcao opened this issue Aug 31, 2024 · 0 comments
Open

showoverlay wrong size #133

haygcao opened this issue Aug 31, 2024 · 0 comments

Comments

@haygcao
Copy link

haygcao commented Aug 31, 2024

@X-SLAYER 1725102266709
1725102226372 " await FlutterOverlayWindow.showOverlay(
enableDrag: true,
overlayTitle: "Incoming call",
overlayContent:
"name:${callerIdData.phoneNumber},region:${callerIdData.countryName},carrier:${callerIdData.carrier}",
alignment: OverlayAlignment.center,
flag: OverlayFlag.defaultFlag,
visibility: overlay.NotificationVisibility.visibilityPublic,
positionGravity: PositionGravity.auto,
height: (styleProvider.windowHeight * MediaQuery.of(context).devicePixelRatio).toInt(),
width: (styleProvider.windowWidth * MediaQuery.of(context).devicePixelRatio).toInt(),
startPosition: storedPosition!,
);"
The first picture above are the preview from a widget. and everything seems right. then second one is the incoming call mock, but it can only show a part of the overlay, I was trying to figure it out, still have no idea. But when I put [WindowSize.fullCover] [WindowSize.matchParent]. the overlay can be shown. await FlutterOverlayWindow.showOverlay(
enableDrag: true,
overlayTitle: "Incoming Call",
overlayContent:
"name:${callerIdData.phoneNumber},region:${callerIdData.countryName},carrier:${callerIdData.carrier}",
alignment: OverlayAlignment.center,
flag: OverlayFlag.defaultFlag,
visibility: overlay.NotificationVisibility.visibilityPublic,
positionGravity: PositionGravity.auto,
height: WindowSize.fullCover,
width: WindowSize.matchParent,
startPosition: storedPosition!,
);

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant