fix(mobile): keep toasts off the dynamic island when keyboard is open (#29159)

This commit is contained in:
Santo Shakil 2026-06-17 00:51:29 +06:00 committed by GitHub
parent 12b7cd066b
commit cda499f2b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -50,9 +50,10 @@ class ImmichToast {
),
),
positionedToastBuilder: (context, child, gravity) {
final isTop = gravity == ToastGravity.TOP;
return Positioned(
top: gravity == ToastGravity.TOP ? 150 : null,
bottom: gravity == ToastGravity.BOTTOM ? 150 : null,
top: isTop ? 150 : null,
bottom: isTop ? null : 150 + MediaQuery.of(context).viewInsets.bottom,
left: MediaQuery.of(context).size.width / 2 - 150,
right: MediaQuery.of(context).size.width / 2 - 150,
child: IgnorePointer(child: child),