Skip to content

Commit 9c2e850

Browse files
authored
Merge pull request #1875 from EnsembleUI/flutter_3_29_upgrade_fix
flutter 3.29 build issues solved
2 parents c3a9950 + 23a6a07 commit 9c2e850

File tree

7 files changed

+32
-33
lines changed

7 files changed

+32
-33
lines changed

modules/auth/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ dependencies:
3939

4040
get_it: ^8.0.0
4141
google_sign_in: ^6.1.4
42-
sign_in_with_apple: ^5.0.0
42+
sign_in_with_apple: ^6.1.4
4343
firebase_auth: ^5.3.1
4444
firebase_core: ^3.6.0
45-
flutter_web_auth_2: ^2.1.4
45+
flutter_web_auth_2: ^4.1.0
4646
flutter_svg: ^2.0.7
4747
crypto: ^3.0.3
4848
# auth0_flutter: ^1.2.1

modules/ensemble/lib/action/saveFile/save_mobile.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import 'dart:io';
22

33
import 'package:flutter/foundation.dart';
4-
import 'package:image_gallery_saver/image_gallery_saver.dart';
54
import 'package:path_provider/path_provider.dart';
5+
import 'package:vision_gallery_saver/vision_gallery_saver.dart';
66
// Conditionally import the file that has `dart:html` vs. the stub:
77
import 'download_stub.dart' if (dart.library.html) 'download_web.dart';
88

@@ -11,7 +11,7 @@ Future<void> saveImageToDCIM(String fileName, Uint8List fileBytes) async {
1111
if (kIsWeb) {
1212
downloadFileOnWeb(fileName, fileBytes);
1313
} else {
14-
final result = await ImageGallerySaver.saveImage(
14+
final result = await VisionGallerySaver.saveImage(
1515
fileBytes,
1616
name: fileName,
1717
);

modules/ensemble/pubspec.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,13 @@ dependencies:
9191
walletconnect_dart: ^0.0.11
9292
http_parser: ^4.0.2
9393
shared_preferences: ^2.1.1
94-
workmanager: ^0.5.1
94+
workmanager:
95+
git:
96+
url: https://github.com/fluttercommunity/flutter_workmanager.git
97+
ref: main
98+
path: workmanager
9599
flutter_local_notifications: ^17.2.3
96-
image_gallery_saver: ^2.0.3
100+
vision_gallery_saver: ^2.0.1
97101
flutter_i18n: ^0.35.1
98102
pointer_interceptor: ^0.9.3+4
99103
flutter_secure_storage: ^9.2.2

modules/ensemble_bluetooth/pubspec.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ dependencies:
2424

2525
collection: ^1.17.1
2626
flutter_blue_plus: ^1.33.4
27-
workmanager: ^0.5.2
27+
workmanager:
28+
git:
29+
url: https://github.com/fluttercommunity/flutter_workmanager.git
30+
ref: main
31+
path: workmanager
2832
permission_handler: ^11.3.1
2933

3034
dev_dependencies:

modules/otp_pin_field/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ group 'com.shivam.otp_pin_field'
22
version '1.0-SNAPSHOT'
33

44
buildscript {
5-
ext.kotlin_version = '1.6.0'
5+
ext.kotlin_version = '2.1.10'
66
repositories {
77
google()
88
mavenCentral()
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.2.0'
12+
classpath 'com.android.tools.build:gradle:8.1.0'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
1515
}
@@ -43,7 +43,7 @@ android {
4343
}
4444

4545
defaultConfig {
46-
minSdkVersion 18
46+
minSdkVersion 19
4747
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4848
}
4949
lintOptions {

modules/otp_pin_field/android/src/main/kotlin/com/shivam/otp_pin_field/AppSignatureHelper.kt

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,21 @@ class AppSignatureHelper(context: Context?) : ContextWrapper(context) {
4949
// Get all package signatures for the current package
5050
val packageName: String = packageName
5151
val packageManager: PackageManager = packageManager
52-
val signatures: Array<Signature> = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
53-
packageManager.getPackageInfo(
54-
packageName,
55-
PackageManager.GET_SIGNING_CERTIFICATES
56-
).signingInfo.apkContentsSigners
57-
} else {
58-
packageManager.getPackageInfo(
59-
packageName,
60-
PackageManager.GET_SIGNATURES
61-
).signatures
62-
}
52+
val signatures = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
53+
packageManager.getPackageInfo(
54+
packageName,
55+
PackageManager.GET_SIGNING_CERTIFICATES
56+
).signingInfo?.apkContentsSigners?.let { Array(it.size) { i -> it[i] } } ?: emptyArray()
57+
} else {
58+
@Suppress("DEPRECATION")
59+
packageManager.getPackageInfo(
60+
packageName,
61+
PackageManager.GET_SIGNATURES
62+
).signatures
63+
}
6364

64-
// For each signature create a compatible hash
65-
for (signature in signatures) {
65+
// Updated this part to handle null safety
66+
signatures?.forEach { signature ->
6667
val hash = hash(packageName, signature.toCharsString())
6768
if (hash != null) {
6869
appCodes.add(String.format("%s", hash))

modules/otp_pin_field/android/src/main/kotlin/com/shivam/otp_pin_field/OtpPinFieldPlugin.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ class OtpPinFieldPlugin : FlutterPlugin, ActivityAware, MethodCallHandler {
4444

4545
constructor()
4646

47-
private constructor(registrar: PluginRegistry.Registrar) {
48-
activity = registrar.activity()
49-
setupChannel(registrar.messenger())
50-
registrar.addActivityResultListener(activityResultListener)
51-
}
52-
5347
fun setCode(code: String?) {
5448
channel?.invokeMethod("smsCode", code)
5549
}
@@ -178,9 +172,5 @@ class OtpPinFieldPlugin : FlutterPlugin, ActivityAware, MethodCallHandler {
178172

179173
companion object {
180174
private const val channelName = "otp_pin_field"
181-
182-
fun registerWith(registrar: PluginRegistry.Registrar) {
183-
OtpPinFieldPlugin(registrar)
184-
}
185175
}
186176
}

0 commit comments

Comments
 (0)