Skip to content

Commit

Permalink
Merge pull request #46 from reown-com/feature/upgrade_flutter_3.24.5
Browse files Browse the repository at this point in the history
[Feature] Upgrade flutter 3.24.5
  • Loading branch information
quetool authored Dec 18, 2024
2 parents f08f9f9 + 62f6919 commit 238b076
Show file tree
Hide file tree
Showing 130 changed files with 1,867 additions and 1,049 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The communications protocol for web3, Reown brings the ecosystem together by ena

| [Core SDK](packages/reown_core) | [Sign SDK](packages/reown_sign) | [WalletKit](packages/reown_walletkit) | [AppKit](packages/reown_appkit) |
|---------------------------------|---------------------------------|---------------------------------------|---------------------------------|
| 1.0.4 | 1.0.4 | 1.0.3 | 1.2.0 |
| 1.1.0 | 1.1.0 | 1.1.0 | 1.3.0 |

## License

Expand Down
6 changes: 6 additions & 0 deletions packages/reown_appkit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.3.0-beta01

- Update to flutter version 3.24.5
- Dependency updates
- Reconnection and resubscription mechanism, specially for Android 15 that implemented a strict doze mode.

## 1.2.0

- Non-EVM Chains support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
namespace "com.walletconnect.flutterdapp"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
ndkVersion = "27.0.12077973"

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
<package android:name="com.walletconnect.flutterwallet.internal"/>
<package android:name="com.walletconnect.web3wallet.rnsample"/>
<package android:name="com.walletconnect.web3wallet.rnsample.internal"/>
<package android:name="com.walletconnect.sample.wallet"/>
<package android:name="com.walletconnect.sample.wallet.internal"/>
<package android:name="com.reown.sample.wallet"/>
<package android:name="com.reown.sample.wallet.internal"/>
</queries>
Expand Down
4 changes: 2 additions & 2 deletions packages/reown_appkit/example/base/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.9.0'
ext.kotlin_version = '2.0.21'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'com.android.tools.build:gradle:8.7.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
21 changes: 11 additions & 10 deletions packages/reown_appkit/example/base/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ PODS:
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sqflite (0.0.3):
- sqflite_darwin (0.0.4):
- Flutter
- FlutterMacOS
- url_launcher_ios (0.0.1):
- Flutter
- webview_flutter_wkwebview (0.0.1):
- Flutter
- FlutterMacOS

DEPENDENCIES:
- appcheck (from `.symlinks/plugins/appcheck/ios`)
Expand All @@ -35,9 +36,9 @@ DEPENDENCIES:
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/darwin`)

SPEC REPOS:
trunk:
Expand All @@ -58,25 +59,25 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqflite:
:path: ".symlinks/plugins/sqflite/darwin"
sqflite_darwin:
:path: ".symlinks/plugins/sqflite_darwin/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
:path: ".symlinks/plugins/webview_flutter_wkwebview/darwin"

SPEC CHECKSUMS:
appcheck: e1ab9d4e03736f03e0401554a134d1ed502d7629
coinbase_wallet_sdk: 7ccd4e1a7940deba6ba9bd81beece999a2268c15
CoinbaseWalletSDK: ea1f37512bbc69ebe07416e3b29bf840f5cc3152
connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
connectivity_plus: 18382e7311ba19efcaee94442b23b32507b20695
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
webview_flutter_wkwebview: 2a23822e9039b7b1bc52e5add778e5d89ad488d1
webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4

PODFILE CHECKSUM: 0772a2bd8cd4c7aaeb2576ddfaf6b03be722593b

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import UIKit
import Flutter
import CoinbaseWalletSDK

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {

private static let EVENTS_CHANNEL = "com.walletconnect.flutterdapp/events"
Expand Down
3 changes: 1 addition & 2 deletions packages/reown_appkit/example/base/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:convert';
import 'dart:developer';
import 'dart:io';

import 'package:flutter/foundation.dart';
Expand Down Expand Up @@ -200,7 +199,7 @@ class _MyHomePageState extends State<MyHomePage> {
AppKitSocialOption.Apple,
AppKitSocialOption.Discord,
],
showMainWallets: false, // OPTIONAL - true by default
showMainWallets: true, // OPTIONAL - true by default
),
// requiredNamespaces: {},
// optionalNamespaces: {},
Expand Down
20 changes: 11 additions & 9 deletions packages/reown_appkit/example/base/lib/pages/connect_page.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:async';
import 'dart:convert';

import 'package:fl_toast/fl_toast.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
Expand All @@ -16,6 +15,7 @@ import 'package:reown_appkit_dapp/utils/crypto/solana.dart';
import 'package:reown_appkit_dapp/utils/string_constants.dart';
import 'package:reown_appkit_dapp/widgets/chain_button.dart';
import 'package:reown_appkit_dapp/widgets/method_dialog.dart';
import 'package:toastification/toastification.dart';

class ConnectPage extends StatefulWidget {
const ConnectPage({
Expand Down Expand Up @@ -492,28 +492,28 @@ class ConnectPageState extends State<ConnectPage> {

// ignore: unused_element
ButtonStyle get _buttonStyle => ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith<Color>(
backgroundColor: WidgetStateProperty.resolveWith<Color>(
(states) {
if (states.contains(MaterialState.disabled)) {
if (states.contains(WidgetState.disabled)) {
return StyleConstants.grayColor;
}
return Colors.blue;
},
),
textStyle: MaterialStateProperty.resolveWith<TextStyle>(
textStyle: WidgetStateProperty.resolveWith<TextStyle>(
(states) => TextStyle(
fontSize: 8.0,
fontWeight: FontWeight.w400,
),
),
padding: MaterialStateProperty.resolveWith<EdgeInsetsGeometry>(
padding: WidgetStateProperty.resolveWith<EdgeInsetsGeometry>(
(states) => EdgeInsets.all(0.0),
),
minimumSize: MaterialStateProperty.all<Size>(const Size(
minimumSize: WidgetStateProperty.all<Size>(const Size(
1000.0,
StyleConstants.linear48,
)),
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
StyleConstants.linear8,
Expand Down Expand Up @@ -673,9 +673,11 @@ class _QRCodeView extends StatelessWidget {
Clipboard.setData(
ClipboardData(text: uri.toString()),
).then(
(_) => showPlatformToast(
child: const Text(StringConstants.copiedToClipboard),
(_) => toastification.show(
title: const Text(StringConstants.copiedToClipboard),
context: context,
autoCloseDuration: Duration(seconds: 2),
alignment: Alignment.bottomCenter,
),
);
},
Expand Down
20 changes: 18 additions & 2 deletions packages/reown_appkit/example/base/lib/utils/sample_wallets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,20 @@ class WCSampleWallets {
'bundleId': 'com.walletconnect.web3wallet.rnsample.internal',
'universal': 'https://appkit-lab.reown.com/rn_walletkit_internal',
},
// {
// 'name': 'KT Wallet (Internal)',
// 'platform': ['android'],
// 'id': '123456789012345678901234567894',
// 'schema': 'kotlin-web3wallet://wc',
// 'bundleId': 'com.reown.sample.wallet.internal',
// 'universal': 'https://appkit-lab.reown.com/wallet_internal',
// },
{
'name': 'KT Wallet (Internal)',
'platform': ['android'],
'id': '123456789012345678901234567894',
'schema': 'kotlin-web3wallet://wc',
'bundleId': 'com.reown.sample.wallet.internal',
'bundleId': 'com.walletconnect.sample.wallet.internal',
'universal': 'https://appkit-lab.reown.com/wallet_internal',
},
];
Expand Down Expand Up @@ -62,12 +70,20 @@ class WCSampleWallets {
'bundleId': 'com.walletconnect.web3wallet.rnsample',
'universal': 'https://appkit-lab.reown.com/rn_walletkit',
},
// {
// 'name': 'KT Wallet',
// 'platform': ['android'],
// 'id': '123456789012345678901234567893',
// 'schema': 'kotlin-web3wallet://wc',
// 'bundleId': 'com.reown.sample.wallet',
// 'universal': 'https://appkit-lab.reown.com/wallet_release',
// },
{
'name': 'KT Wallet',
'platform': ['android'],
'id': '123456789012345678901234567893',
'schema': 'kotlin-web3wallet://wc',
'bundleId': 'com.reown.sample.wallet',
'bundleId': 'com.walletconnect.sample.wallet',
'universal': 'https://appkit-lab.reown.com/wallet_release',
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ class ChainButton extends StatelessWidget {
child: ElevatedButton(
onPressed: onPressed,
style: ButtonStyle(
elevation: MaterialStateProperty.all(0.0),
backgroundColor: MaterialStateProperty.all<Color>(
elevation: WidgetStateProperty.all(0.0),
backgroundColor: WidgetStateProperty.all<Color>(
selected ? Colors.white : Colors.grey.shade300,
),
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
side: BorderSide(
color: selected ? Colors.blue : Colors.grey.shade300,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import 'dart:convert';

import 'package:fl_toast/fl_toast.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:reown_appkit_dapp/utils/constants.dart';
import 'package:reown_appkit_dapp/utils/string_constants.dart';
import 'package:toastification/toastification.dart';

class MethodDialog extends StatefulWidget {
static Future<void> show(
Expand Down Expand Up @@ -51,9 +51,11 @@ class MethodDialogState extends State<MethodDialog> {
return InkWell(
onTap: () {
Clipboard.setData(ClipboardData(text: t)).then(
(_) => showPlatformToast(
child: const Text(StringConstants.copiedToClipboard),
(_) => toastification.show(
title: const Text(StringConstants.copiedToClipboard),
context: context,
autoCloseDuration: Duration(seconds: 2),
alignment: Alignment.bottomCenter,
),
);
},
Expand All @@ -64,9 +66,11 @@ class MethodDialogState extends State<MethodDialog> {
onTap: () {
Clipboard.setData(ClipboardData(text: snapshot.data.toString()))
.then(
(_) => showPlatformToast(
child: const Text(StringConstants.copiedToClipboard),
(_) => toastification.show(
title: const Text(StringConstants.copiedToClipboard),
context: context,
autoCloseDuration: Duration(seconds: 2),
alignment: Alignment.bottomCenter,
),
);
},
Expand Down
20 changes: 10 additions & 10 deletions packages/reown_appkit/example/base/lib/widgets/session_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class SessionWidgetState extends State<SessionWidget> {
);
},
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(
backgroundColor: WidgetStateProperty.all<Color>(
Colors.red,
),
),
Expand Down Expand Up @@ -205,12 +205,12 @@ class SessionWidgetState extends State<SessionWidget> {
}
: null,
style: ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith<Color>(
(states) => states.contains(MaterialState.disabled)
backgroundColor: WidgetStateProperty.resolveWith<Color>(
(states) => states.contains(WidgetState.disabled)
? Colors.grey
: Colors.blue,
),
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
StyleConstants.linear8,
Expand Down Expand Up @@ -308,13 +308,13 @@ class SessionWidgetState extends State<SessionWidget> {
}
: null,
style: ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith<Color>((states) {
if (states.contains(MaterialState.disabled)) {
backgroundColor: WidgetStateProperty.resolveWith<Color>((states) {
if (states.contains(WidgetState.disabled)) {
return StyleConstants.grayColor;
}
return Colors.orange;
}),
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
StyleConstants.linear8,
Expand Down Expand Up @@ -351,13 +351,13 @@ class SessionWidgetState extends State<SessionWidget> {
}
: null,
style: ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith<Color>((states) {
if (states.contains(MaterialState.disabled)) {
backgroundColor: WidgetStateProperty.resolveWith<Color>((states) {
if (states.contains(WidgetState.disabled)) {
return StyleConstants.grayColor;
}
return Colors.orange;
}),
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
StyleConstants.linear8,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import connectivity_plus
import package_info_plus
import path_provider_foundation
import shared_preferences_foundation
import sqflite
import sqflite_darwin
import url_launcher_macos
import webview_flutter_wkwebview

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
Expand All @@ -19,4 +20,5 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
FLTWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "FLTWebViewFlutterPlugin"))
}
Loading

0 comments on commit 238b076

Please sign in to comment.