Skip to content

flutter 3.29 build issues solved #1875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/auth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ dependencies:

get_it: ^8.0.0
google_sign_in: ^6.1.4
sign_in_with_apple: ^5.0.0
sign_in_with_apple: ^6.1.4
firebase_auth: ^5.3.1
firebase_core: ^3.6.0
flutter_web_auth_2: ^2.1.4
flutter_web_auth_2: ^4.1.0
flutter_svg: ^2.0.7
crypto: ^3.0.3
# auth0_flutter: ^1.2.1
Expand Down
4 changes: 2 additions & 2 deletions modules/ensemble/lib/action/saveFile/save_mobile.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:io';

import 'package:flutter/foundation.dart';
import 'package:image_gallery_saver/image_gallery_saver.dart';
import 'package:path_provider/path_provider.dart';
import 'package:vision_gallery_saver/vision_gallery_saver.dart';
// Conditionally import the file that has `dart:html` vs. the stub:
import 'download_stub.dart' if (dart.library.html) 'download_web.dart';

Expand All @@ -11,7 +11,7 @@ Future<void> saveImageToDCIM(String fileName, Uint8List fileBytes) async {
if (kIsWeb) {
downloadFileOnWeb(fileName, fileBytes);
} else {
final result = await ImageGallerySaver.saveImage(
final result = await VisionGallerySaver.saveImage(
fileBytes,
name: fileName,
);
Expand Down
8 changes: 6 additions & 2 deletions modules/ensemble/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,13 @@ dependencies:
walletconnect_dart: ^0.0.11
http_parser: ^4.0.2
shared_preferences: ^2.1.1
workmanager: ^0.5.1
workmanager:
git:
url: https://github.com/fluttercommunity/flutter_workmanager.git
ref: main
path: workmanager
flutter_local_notifications: ^17.2.3
image_gallery_saver: ^2.0.3
vision_gallery_saver: ^2.0.1
flutter_i18n: ^0.35.1
pointer_interceptor: ^0.9.3+4
flutter_secure_storage: ^9.2.2
Expand Down
6 changes: 5 additions & 1 deletion modules/ensemble_bluetooth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ dependencies:

collection: ^1.17.1
flutter_blue_plus: ^1.33.4
workmanager: ^0.5.2
workmanager:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do they have a package? it's dangerous getting the latest from main like this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now the package they have released to pub.dev is 0.5.2 which still have the plugins that flutter 3.29.0 have deprecated that is causing the build to fail.
They have made changes in there repo to fix that issue, but haven't released a new version to pub.dev, for that issue has been created: fluttercommunity/flutter_workmanager#588
As soon as they will release it, i will switch it back.

git:
url: https://github.com/fluttercommunity/flutter_workmanager.git
ref: main
path: workmanager
permission_handler: ^11.3.1

dev_dependencies:
Expand Down
6 changes: 3 additions & 3 deletions modules/otp_pin_field/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ group 'com.shivam.otp_pin_field'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.6.0'
ext.kotlin_version = '2.1.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.android.tools.build:gradle:8.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down Expand Up @@ -43,7 +43,7 @@ android {
}

defaultConfig {
minSdkVersion 18
minSdkVersion 19
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,21 @@ class AppSignatureHelper(context: Context?) : ContextWrapper(context) {
// Get all package signatures for the current package
val packageName: String = packageName
val packageManager: PackageManager = packageManager
val signatures: Array<Signature> = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
packageManager.getPackageInfo(
packageName,
PackageManager.GET_SIGNING_CERTIFICATES
).signingInfo.apkContentsSigners
} else {
packageManager.getPackageInfo(
packageName,
PackageManager.GET_SIGNATURES
).signatures
}
val signatures = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
packageManager.getPackageInfo(
packageName,
PackageManager.GET_SIGNING_CERTIFICATES
).signingInfo?.apkContentsSigners?.let { Array(it.size) { i -> it[i] } } ?: emptyArray()
} else {
@Suppress("DEPRECATION")
packageManager.getPackageInfo(
packageName,
PackageManager.GET_SIGNATURES
).signatures
}

// For each signature create a compatible hash
for (signature in signatures) {
// Updated this part to handle null safety
signatures?.forEach { signature ->
val hash = hash(packageName, signature.toCharsString())
if (hash != null) {
appCodes.add(String.format("%s", hash))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ class OtpPinFieldPlugin : FlutterPlugin, ActivityAware, MethodCallHandler {

constructor()

private constructor(registrar: PluginRegistry.Registrar) {
activity = registrar.activity()
setupChannel(registrar.messenger())
registrar.addActivityResultListener(activityResultListener)
}

fun setCode(code: String?) {
channel?.invokeMethod("smsCode", code)
}
Expand Down Expand Up @@ -178,9 +172,5 @@ class OtpPinFieldPlugin : FlutterPlugin, ActivityAware, MethodCallHandler {

companion object {
private const val channelName = "otp_pin_field"

fun registerWith(registrar: PluginRegistry.Registrar) {
OtpPinFieldPlugin(registrar)
}
}
}