This blog post has been created with the intention of converting the project from Flutter version 1.22 to 3.29. It has also been updated to reflect the latest information and changes related to upgrading Flutter versions. It is also helpful if you want to upgrade Flutter from 2.0 to 3.29. Before discussing the steps to update a Flutter project, let us explain why upgrading from Flutter 1.0 to 3.29 or Flutter 2.0 to 3.29 is essential.
Why Upgrade the Flutter Version for Your Old Project in 2025?
For any developer or application owner, it is essential to upgrade Flutter to its latest version for the following reasons:
Firstly, Flutter is an ever-evolving framework, and its latest version offers improved performance, security, and features.
Secondly, upgrading the Flutter version will allow developers to take advantage of the latest features, such as improved animations, better UI/UX design, enhanced accessibility features, and more. This will help make the project more attractive and engaging for users.
Thirdly, upgrading the Flutter version will help ensure the project remains compatible with all the supported platforms. This is especially important for projects that are cross-platform compatible.
Finally, upgrading the Flutter version will ensure that the project remains up-to-date with industry trends and competitive with other projects. This will help ensure that the project is successful and remains relevant.
Here are some other benefits:
- Access to the latest Material and Cupertino widgets
- From 3.29, Dart code executes on the main thread instead of a separate UI thread on Android and iOS
- Removal of script-based application of the Flutter Gradle plugin in Android
- Impeller is now the default rendering engine on Android
- Better DevTools and logging for preview and code inspection
Overall, upgrading the Flutter version of an old project in 2025 is a great idea that will help ensure the project remains competitive, attractive, and up-to-date. Also, when you upgrade Flutter to the latest version, your project can be ready to support the latest versions of all the supported platforms.
Learn about some of the options for animating in Flutter.
How to Upgrade Flutter Project (Flutter 1 to 3.29 or v2 to v3)?
- The latest Flutter should be installed in the system. If you do not have the latest Flutter SDK, then install it first. Here are the steps for Flutter installation.
- If you have an older version of Flutter already installed, run the following command to upgrade Flutter.
flutter upgrade
- If you use the Flutter version manager, run the following command to upgrade Flutter.
fvm install stable
--------OR--------
fvm install 3.27.0
# Latest version is recommended
- Update the Dart SDK version in a pubspec.yaml
sdk: ^3.7.0
Don’t forget to use the Dart 3 features such as records, new class modifiers, exhaustiveness checking, if-case patterns, etc., if you upgrade from Dart 2 and lower versions.
- Run the following command
flutter pub get
- After the above command, You will get errors related to third-party packages/plugins due to the non-supported Dart SDK version. Update those third-party packages/plugins to the latest version. The following IDE plugin can help with this. Version Lens - (VS code) or Flutter pub version checker - (Android studio)
- Run the flutter pub get command and fix the errors until you reach exit code 0. You may need to update the code for Flutter SDK as well as the third-party plugin for breaking changes.
- Code migration to “Sound Null Safety” is required if your Dart SDK is outdated, specifically if it’s below version 2.12. Learn more about Sound null-safety.
Learn about unleashing the power of Dart’s extension methods in Flutter to boost productivity.
We also need to update the platform-specific settings. Below are the recommended configurations for each platform:
Android
- Upgrading Android Studio IDE is a first recommended step to execute code in a compatible JRE.
- From Flutter 3.29 onward, Android projects will use KTS build scripts instead of Groovy. The recommended approach is to create a new Flutter project, compare the changes, and apply them accordingly. The major changes would be in the following files:
- Project level “build.gradle” and app-level “app/build.gradle” files are renamed to “build.gradle.kts” with syntax updates.
- “distributionUrl” in “gradle/gradle-wrapper.properties” should be updated to the latest version. (Check the latest Gradle version here)
- “org.gradle.jvmargs” in “gradle.properties” can be updated. (Optional but recommended).
- “settings.gradle” is renamed to “settings.gradle.kts” and it can be fully replaced with the version from a newly created Flutter project. (Check the latest Kotlin version here). (Check the latest Android Gradle Plugin here).
- Update minSdk to at least 26 OR (current minus 8) and targetSdk to the latest one in app-level “build.gradle.kts”.
iOS/MacOS
- Minimum Xcode 14 is required to use Flutter version 3.13+ but the latest version of Xcode is recommended to use all the iOS/MacOS platform-specific settings.
- Update the iOS deployment target version to 14.0 from Xcode. You can consider this to be (current minus 4).
- To update the iOS pods, the quickest way is to delete the Podfile.lock file and run pod install. Alternatively, you can update the pods by running the following command:
pod repo update
- If you have updated Firebase plugins then It may be required to update their pod manually. To do that follow the below commands for reference. Below are some examples.
- To update the firebase_core pod update Firebase/FirebaseCore
- To update the firebase_auth pod update Firebase/FirebaseAuth
- To update the firebase_crashlytics pod update Firebase/FirebaseCrashlytics
- If you have updated flutter_facebook_auth then run the command pod update FBSDKLoginKit
Note: You have these commands in the error logs when you run and encounter these types of errors.
Web
- If your index.html contains the following script inside the <head> tag, it is no longer required:
1</script>
2<!-- This script adds the flutter initialization JS code -->
3<script src="flutter.js" defer></script>
Instead, add the following script inside the <body> tag:
1<body>
2 <script src="flutter_bootstrap.js" async></script>
3</body>
- If your project contains imports like dart:html or dart:js_util, they are deprecated and should be replaced with package:web or dart:js_interop.
- If you encounter any other JavaScript-specific deprecation warnings when running the project on the web, you can resolve them by making the necessary updates.
Developers' Guidelines on Upgrading Flutter
- Always follow standard documentation when making any updates to Flutter/platform-specific.
- Check for recommended Flutter updates to do or changes to make when you go to update the Flutter version.
- For upgrading to the latest version from Flutter 2.0, 1.22 or any lower version, you can follow our guide. When you want to upgrade a pre-1.12 Flutter project, kindly follow this guideline for Android.
- Avoid using outdated versions of third-party packages/plugins, as they may cause issues with your current codebase.
Migration guide to update Flutter code
- You can find all the necessary changes for your deprecated code in the Flutter migration guide
- It shows which code has been deprecated in which version and which deprecated code has been removed in which version.
Are you ready to take your app to the next level with the latest Flutter upgrade? At Aubergine Solutions, we specialize in elevating your application's performance through our expert Flutter development services. Our team ensures a smooth transition to the newest Flutter version, enhancing your app with advanced features and a seamless user experience. Contact us today.