diff --git a/assets/png/2.0x/logo_wc.png b/assets/png/2.0x/logo_wc.png index 7e942933..356718be 100644 Binary files a/assets/png/2.0x/logo_wc.png and b/assets/png/2.0x/logo_wc.png differ diff --git a/assets/png/3.0x/logo_wc.png b/assets/png/3.0x/logo_wc.png index e6727d45..845a40aa 100644 Binary files a/assets/png/3.0x/logo_wc.png and b/assets/png/3.0x/logo_wc.png differ diff --git a/example/ios/Runner/Assets.xcassets/Contents.json b/example/ios/Runner/Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/example/ios/Runner/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/example/ios/Runner/Assets.xcassets/Logo.imageset/Contents.json b/example/ios/Runner/Assets.xcassets/Logo.imageset/Contents.json new file mode 100644 index 00000000..d40e37d8 --- /dev/null +++ b/example/ios/Runner/Assets.xcassets/Logo.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Logo@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Logo@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/example/ios/Runner/Assets.xcassets/Logo.imageset/Logo@2x.png b/example/ios/Runner/Assets.xcassets/Logo.imageset/Logo@2x.png new file mode 100644 index 00000000..4589bb7b Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/Logo.imageset/Logo@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/Logo.imageset/Logo@3x.png b/example/ios/Runner/Assets.xcassets/Logo.imageset/Logo@3x.png new file mode 100644 index 00000000..dc729670 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/Logo.imageset/Logo@3x.png differ diff --git a/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example/ios/Runner/Base.lproj/LaunchScreen.storyboard index f2e259c7..85abd121 100644 --- a/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ b/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,10 @@ - - + + + - + + @@ -14,24 +16,30 @@ + - + + + + + - + + - + - + diff --git a/lib/services/coinbase_service/coinbase_service.dart b/lib/services/coinbase_service/coinbase_service.dart index b1dae4a4..2be2ed53 100644 --- a/lib/services/coinbase_service/coinbase_service.dart +++ b/lib/services/coinbase_service/coinbase_service.dart @@ -1,8 +1,8 @@ import 'dart:convert'; import 'package:flutter/foundation.dart'; - import 'package:flutter/services.dart'; + import 'package:web3modal_flutter/services/coinbase_service/i_coinbase_service.dart'; import 'package:web3modal_flutter/services/coinbase_service/models/coinbase_events.dart'; import 'package:web3modal_flutter/web3modal_flutter.dart'; diff --git a/lib/utils/url/url_utils.dart b/lib/utils/url/url_utils.dart index 24044c2a..31be9c9e 100644 --- a/lib/utils/url/url_utils.dart +++ b/lib/utils/url/url_utils.dart @@ -1,7 +1,6 @@ import 'package:appcheck/appcheck.dart'; -import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; -import 'package:url_launcher/url_launcher.dart'; +import 'package:url_launcher/url_launcher.dart' as launcher; import 'package:web3modal_flutter/services/explorer_service/models/redirect.dart'; import 'package:web3modal_flutter/utils/core/core_utils_singleton.dart'; import 'package:web3modal_flutter/utils/platform/i_platform_utils.dart'; @@ -11,13 +10,18 @@ import 'package:web3modal_flutter/utils/url/launch_url_exception.dart'; import 'package:web3modal_flutter/utils/w3m_logger.dart'; -Future _launchUrl(Uri url, {LaunchMode? mode}) async { +Future _launchUrl(Uri url, {launcher.LaunchMode? mode}) async { try { - debugPrint('[url_utils] _launchUrl $url'); - return await launchUrl( + final success = await launcher.launchUrl( url, - mode: mode ?? LaunchMode.platformDefault, + mode: mode ?? launcher.LaunchMode.platformDefault, ); + if (!success) { + throw LaunchUrlException('App not installed'); + } + return true; + } on LaunchUrlException { + rethrow; } on PlatformException catch (e, s) { W3MLoggerUtil.logger.e( 'Error launching URL $url', @@ -43,11 +47,12 @@ class UrlUtils extends IUrlUtils { UrlUtils({ this.androidAppCheck = _androidAppCheck, this.launchUrlFunc = _launchUrl, - this.canLaunchUrlFunc = canLaunchUrl, + this.canLaunchUrlFunc = launcher.canLaunchUrl, }); final Future Function(String uri) androidAppCheck; - final Future Function(Uri url, {LaunchMode? mode}) launchUrlFunc; + final Future Function(Uri url, {launcher.LaunchMode? mode}) + launchUrlFunc; final Future Function(Uri url) canLaunchUrlFunc; @override @@ -78,8 +83,8 @@ class UrlUtils extends IUrlUtils { } @override - Future launchUrl(Uri url, {LaunchMode? mode}) async { - return launchUrlFunc( + Future launchUrl(Uri url, {launcher.LaunchMode? mode}) async { + return await launchUrlFunc( url, mode: mode, ); @@ -129,7 +134,7 @@ class UrlUtils extends IUrlUtils { } return await launchUrlFunc( uriToOpen!, - mode: LaunchMode.externalApplication, + mode: launcher.LaunchMode.externalApplication, ); } } diff --git a/lib/widgets/w3m_qr_code.dart b/lib/widgets/w3m_qr_code.dart index 25bf1976..af5c2658 100644 --- a/lib/widgets/w3m_qr_code.dart +++ b/lib/widgets/w3m_qr_code.dart @@ -23,7 +23,7 @@ class QRCodeWidget extends StatelessWidget { final responsiveData = ResponsiveData.of(context); final isPortrait = ResponsiveData.isPortrait(context); final isDarkMode = Web3ModalTheme.maybeOf(context)?.isDarkMode ?? false; - final imageSize = isPortrait ? 90.0 : 60.0; + final imageSize = isPortrait ? 80.0 : 60.0; final maxRadius = min(radiuses.radiusL, 36.0); return Container( constraints: BoxConstraints(