Flutter is one of the most popular cross-platform UI frameworks for creating rich mobile, desktop and web applications. It is a portable framework that can run across all devices wherever pixels are rendered including embedded devices. Flutter 2 is a major release that happened during the Flutter engage event on March 3, 2021. In this blog, I am going to highlight the following important updates in the Flutter 2 release and our Syncfusion’s plan to provide support in our widgets:
- Web support is now Stable
- Desktop support is now in beta
- Null Safety is now stable
- New widgets and improvements
- Breaking Changes
Let’s discuss them!
Web support is now Stable
Flutter Web support is now stable! This means you can use Flutter for developing production apps. Google recommends Flutter for Web for:
- Developing single-page apps (SPAs).
- Developing progressive web apps (PWAs).
- Publishing your existing mobile apps as web apps to expand your users outside the app stores.
The Syncfusion Flutter package is already compatible with the web platform, with built-in mouse and keyboard support. You can leverage our beautiful charts, feature-rich event calendar, highly performing DataGrid (data table), interactive maps, unique Excel Library and popular PDF packages to build a feature rich and robust web application.
Look at our widgets demo in this Flutter web app.
Note: Our PDF Viewer plugin will receive web support in our 2021 Volume 1 release, which is scheduled for the end of March.
Desktop support is now in beta
Flutter Desktop support for Windows, macOS, and Linux is now available in beta mode. However, you can still use the beta snapshot in a stable channel to build and run-on desktop platforms. To use the latest updates for your desktop applications, you must switch to the beta channel. Otherwise, you have to wait till the next stable release.
Syncfusion is now in the process of ensuring that all our components’ features work in desktop platforms in accordance with the Flutter 2 update. We will be upgrading our Flutter example projects in GitHub so that you can easily run them and see the demos of our widgets in your desired desktop platform. We also have plans to publish our examples in the corresponding app stores.
Note: We’ll be providing desktop support for the PDF Viewer in our upcoming releases.
Null Safety is now stable
Null safety has been moved to stable category in the Dart 2.12 release. With null safety, it is possible to eradicate null reference issues in our Flutter applications. It is high time that everyone migrate their packages and apps to null safety.
At Syncfusion, we know many of you are expecting us to migrate our packages. We are now working with very high priority to migrate all our packages to null safety before the end of March.
New widgets and improvements
Although there are a lot of new features and bugs fixes in the Flutter release, I am going to highlight the following important items:
- New Widgets: Autocomplete and ScaffoldMessenger.
- iOS features:
- CupertinoSearchTextField that looks similar to the iOS search bar.
- CupertinoFormSection, CupertinoFormRow, and CupertinoTextFormFieldRow to ease the form-field validation.
- Ability to build IPA directly in the command line.
- The scrollbar will show the track and you can click on the track to scroll the page up and down.
- You can customize the URLs in the address bar with the new custom URL strategy.
- Multiple Flutter instances can be added to an existing app along with a reduced memory footprint.
- Flutter DevTools:
- Performance view was renamed CPU Profiler.
- Timeline view was renamed Performance.
- Layout overflow exceptions can be inspected using the Flutter Inspector.
Note: For more information about DevTools updates, refer to the Flutter DevTools 2 release notes.
Breaking Changes
- Continuation of clipBehavior changes: 61366 & 66700.
- Removed some of the deprecated APIs as per Flutter deprecation policy.
- Removed the nullOk parameters and introduced the equivalent method with the prefix maybe. This breaking change is part of the null safety support. Check out this design proposal.
You can now quickly fix these breaking change using the Flutter Fix.
Note: For more information, refer to the Flutter 2 complete release notes.
Conclusion
Thanks for reading! Flutter 2 is the primary focus of Flutter Engage. However, there were other interesting announcements made there. Some of them were:
- Microsoft announced its preview support for foldable devices in Flutter.
- Canonical’s decision to choose Flutter as the default choice for app development.
- Upgraded Firebase plugins for Flutter.
- Google Mobile Ads SDK for Flutter.
For a complete list of all sessions, please check this Flutter Engage playlist. Please leave your opinion on the Flutter update in the comments section below!
Syncfusion Flutter Widgets
Syncfusion offers flexible Flutter widgets to create high-quality apps for Android, iOS and the web. The number of widgets available is increasing every release and we are making every effort to ensure their stability. Try out our Flutter widgets in your Flutter application development. If you need a particular new Flutter widget, you can contact us through our support forum, Direct-Trac, or feedback portal. We are always happy to assist you!
Related Blog
If you like this blog post, we think you’ll also like the following articles too: