flutter_overlay_window
flutter_overlay_window copied to clipboard
showoverlay wrong size
@X-SLAYER
" 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!,
);