enable exchange provider Fix share util on ipad
enable exchange provider Fix share util on ipad
Omar committed
Jun 8, 2026 at 10:44 UTC
efa2de1dd35ceb6d7e8c159c7346379a2495c978
3 files changed
+16
-9
lib/entities/default_settings_migration.dart
+8
@@ -599,6 +599,14 @@ Future<void> defaultSettingsMigration(
599
type: WalletType.arbitrum,
600
currentNodePreferenceKey: PreferencesKey.currentArbitrumNodeIdKey,
601
oldUri: ["arbitrum.nownodes.io"]);
602
+ break;
603
+ case 67:
604
+ _changeExchangeProviderAvailability(
605
+ sharedPreferences,
606
+ providerName: "LetsExchange",
607
+ enabled: true,
608
+ );
609
+ break;
610
default:
611
break;
612
}
lib/main.dart
+1
-1
@@ -318,7 +318,7 @@ Future<void> initializeAppConfigs({bool loadWallet = true}) async {
318
payjoinSessionSource: payjoinSessionSource,
319
anonpayInvoiceInfo: anonpayInvoiceInfo,
320
havenSeedStore: havenSeedStore,
321
- initialMigrationVersion: 66,
321
+ initialMigrationVersion: 67,
322
);
323
}
324
lib/utils/share_util.dart
+7
-8
@@ -30,22 +30,21 @@ class ShareUtil {
30
31
static Rect _sharePosition(BuildContext context) {
32
if (!context.mounted) {
33
- return Rect.zero;
33
+ return const Rect.fromLTWH(0, 0, 1, 1);
34
}
35
36
+ final screen = Offset.zero & MediaQuery.of(context).size;
37
+ final fallback = Rect.fromCenter(center: screen.center, width: 1, height: 1);
38
+
39
final renderObject = context.findRenderObject();
37
- if (renderObject is! RenderBox) {
38
- return Rect.zero;
40
+ if (renderObject is! RenderBox || !renderObject.hasSize) {
41
+ return fallback;
42
}
43
44
final rect = renderObject.localToGlobal(Offset.zero) & renderObject.size;
42
- // iOS requires sharePositionOrigin to lie fully within the source view's
43
- // bounds; clip to the screen so an offset/oversized page rect doesn't spill
44
- // past the edge and trigger a PlatformException on iPad.
45
- final screen = Offset.zero & MediaQuery.of(context).size;
45
final clipped = rect.intersect(screen);
46
if (clipped.isEmpty) {
48
- return Rect.zero;
47
+ return fallback;
48
}
49
return clipped;
50
}