Skip to content

Conversation

@daniJimen
Copy link

@daniJimen daniJimen commented Jan 29, 2026

This PR adds more flexibility to the error handling in the update alerts. Previously, error messages were hardcoded or less descriptive. Now, developers can pass custom strings for the error title, subtitle, and button label.
Type of Change

  • New feature (non-breaking change which adds functionality)
  • Documentation/Example update
  • Update dependencies

#41

- Updates Java and JVM target version from 1.8 to 11.
- Switches the Kotlin plugin ID to the fully qualified `org.jetbrains.kotlin.android`.
- Adjusts Gradle distribution to version 8.10.2-all.
- Increases Gradle heap memory and metaspace limits.
- Disables `android.enableJetifier`.
- Downgrades `com.android.application` and `org.jetbrains.kotlin.android` plugin versions for better compatibility.
Converts the Android build configuration from Groovy (`.gradle`) to Kotlin DSL (`.gradle.kts`) for the app-level `build.gradle`, project-level `build.gradle`, and `settings.gradle` files.

Key changes include:
- Updates Gradle wrapper to version 9.1.0.
- Updates Android Gradle Plugin to 8.13.1 and Kotlin to 2.2.21.
- Refactors `build.gradle.kts` to use `flutter` extension properties for SDK versions (compileSdk, minSdk, targetSdk).
- Modernizes `settings.gradle.kts` to use the `dev.flutter.flutter-plugin-loader`.
- Adjusts JVM arguments in `gradle.properties` for better memory management.
- Cleans up `AndroidManifest.xml` by removing the redundant `package` attribute.
- Simplifies `MainActivity.kt` syntax.
Updates the Dio example to safely access the status code from the error
response. It now checks for nullability before passing the status code
to the version check function, preventing potential null pointer
exceptions during error handling.
@Spaccesi
Copy link

Please take a look. This is very much needed 🙏

…t configuration

Refactors `NativeUpdater.displayUpdateAlert` to return `Future<void>` and updates the example app to correctly await these calls within async blocks.

Key changes based on the changelog and diffs:
- Updates the library to Flutter 3.x and Dart 3.x.
- Migrates from `package_info` to `package_info_plus`.
- Updates `url_launcher` and `in_app_update` to their latest versions.
- Modernizes the Android build system using the declarative Gradle plugin system.
- Increases Android `compileSdk` and `targetSdk` to 35.
- Upgrades Android environment to Java 17 and Kotlin 2.1.0.
- Implements code quality improvements including `const` constructors and updated Flutter best practices.
- Fixes build errors related to unresolved references in Android migration.
@acastanos
Copy link

A great contribution, please take a look

@daniJimen daniJimen mentioned this pull request Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants