Allow Exporting transaction history to a CSV file (#3230)

* Allow Exporting transaction history to a CSV file

* fix: improve safety for share dialog bounds and navigation pop
This commit is contained in:
Omar Hatem
2026-05-18 16:53:06 +02:00
committed by GitHub
parent 491a692cd6
commit 4125c5fe80
38 changed files with 538 additions and 48 deletions
+14 -2
View File
@@ -33,8 +33,20 @@ class ShareUtil {
return Rect.zero;
}
final box = context.findRenderObject() as RenderBox?;
final renderObject = context.findRenderObject();
if (renderObject is! RenderBox) {
return Rect.zero;
}
return box!.localToGlobal(Offset.zero) & box.size;
final rect = renderObject.localToGlobal(Offset.zero) & renderObject.size;
// iOS requires sharePositionOrigin to lie fully within the source view's
// bounds; clip to the screen so an offset/oversized page rect doesn't spill
// past the edge and trigger a PlatformException on iPad.
final screen = Offset.zero & MediaQuery.of(context).size;
final clipped = rect.intersect(screen);
if (clipped.isEmpty) {
return Rect.zero;
}
return clipped;
}
}