Flutter 3.0: Build Apps With macOS and Linux

Updated on 28 Jun 228 Min read

Flutter 3.0: Build Apps With macOS and Linux

Flutter is an open-source mobile app development platform from Google. The framework allows developers to build native apps for Android and iOS from a single codebase. Flutter has grown in popularity over the last year. It's easy to use, produces high-quality apps, and is a great way to develop native apps.

One of the biggest trends in mobile app development today is the development of mobile apps using the Flutter SDK for Android and iOS platforms.

Google has been working on Flutter for quite some time, and there have been huge updates and releases since the initial release. With Flutter getting a lot of attention from developers and tech giants like Alibaba, it has been upgraded to Flutter 3.0.

In this article, we'll understand how Flutter has evolved over the years and what has changed with the release of Flutter 3.0.

Features of newest Flutter 3.0

1. macOS and Linux support

With Flutter 3.0, you can now build apps for macOS and Linux using the same code base as Android, iOS, and Windows. This is possible because all platforms share the same Dart codebase. Once you've written your app in Dart, it can run on any target platform.

2. Easy iOS Releases & Support for Refresh Rate

Flutter is the first mobile development framework to support a refresh rate higher than 60 frames per second. This means apps can now run at up to 120 fps on phones with high-resolution displays. It'll support variable refresh rates on iOS devices such as the iPhone 13 pro and iPad pro. Higher refresh rates help provide a smoother experience during animations. Therefore, it eliminates choppiness, which is usually experienced when you scroll through the device or during transitions.

3. Foldable Mobile Support

Flutter supports single-page and multi-page applications across all major platforms (Android, iOS, Windows, and macOS). You can build cross-platform apps with Flutter that look amazing on foldable devices as well. You can also easily scale your app to suit different screen sizes with the help of this new feature.

4. Sunsetting 32-bit iOS/iOS 9/iOS 10 Migration

Flutter has supported 64-bit builds since day one, but it has been limited by Apple's requirement that apps be built in Objective C or Swift. With Flutter 3.0, you can now write your apps in Kotlin (which runs on Android) or Dart (which runs on iOS). This means you no longer need to worry about building an AppStore-ready app because you will have complete control over what language your app uses!

5. Support for macOS System Menu Bar and Cascading Menu

The Flutter SDK provides a Cascading Menu widget that allows you to create an app-wide menu easily. The cascading menu combines the new popup menu and the native system menu bar to allow for a seamless transition between the app's main menu and its secondary menu.

The CascadingMenu widget provides several features:

  • The CascadingMenu is automatically placed at the top of the screen when it is created and automatically removed when it is no longer needed. You can customize it by setting a top offset value in pixels.
  • Multiple menus can be created and added to the screen at once, allowing you to change their order and appearance programmatically.
  • Menus can be added dynamically, meaning they will appear on the screen even if they are not present in your app yet.

6. Flutter's Games Toolkit

Flutter 3.0 also includes a casual game toolkit, a collection of widgets that help you design games for iOS and Android. The game engine uses the GPU to render scenes, provides a high-performance animation system that supports physics and collision detection, and offers an extensive set of templates, guidelines, and tutorials to make it easier for you to build games.

7. Dart 2.17

The latest version of Dart, v2.17, is the biggest update so far. It has added major new support for working with enums, making writing code that uses named parameters in constructors easier. It refines how to use named arguments in constructors and streamlines writing code for forwarding parameters to superclasses.

8. Image decoding

Image decoding is the conversion of an image file into a format that is readable by the app. The best way to do this is through an image encoder, which creates a decoded version of the image that can be sent to your app.

Flutter image decoding was added as part of Flutter 3.0. It helps you write less code and makes your apps faster and more responsive.

In addition to improving image decoding performance, Flutter provides built-in support for many common image formats. It allows you to encode images differently depending on what you need them for.

Features in previous Flutter updates

Features of Flutter 1.0

1. Hot Reload

Hot reloading means you can change your app while running without having to restart or reload it. This is great for development and debugging purposes. Flutter hot reloads your app on every change. You can see the changes made to your app without launching it again. This helps you stay in sync with your users and makes it easier to test differences in real-time.

2. Cross-Platform Development

Flutter 1.0 allowed you to create applications for both iOS and Android. But, you’re required to create a different codebase for running the apps on both platforms. It means you can’t write code for an application that looks exactly the same on both platforms. For example, if you have written a widget (a widget is like a control), then it can’t be reused across iOS and Android. You’re required to write a different code altogether.

3. Accessible native features and SDKs

Flutter provides native APIs for accessing many different APIs like cameras, contacts, push notifications, and more. You can use all of the native features of each platform in your app without writing any code for them yourself (except for the most basic ones).

4. Minimal Code

Flutter uses the Dart programming language that Google developed. The Dart programming language is straightforward to learn and use compared to JavaScript or Java, so developing Flutter apps is much quicker than in other languages. The language also has a lot of built-in functionality that makes it easier than JavaScript or Java to implement complex logic without having to write too much code yourself.

5. Widgets

Widgets are small, reusable components you can add to your app's UI. They can contain text and images, which you can use across multiple screens of your application. With Flutter 1.0, you got material design widgets for buttons, checkboxes, and more, with support for rounded corners.

Features of Flutter 2.0

1. Code reusability

The biggest news with Flutter 2.0 was the code reusability across platforms. With this release, developers can build their apps using Flutter and deploy them across desktop, mobile, and embedded platforms using only one codebase. This is a big deal because it opens up Flutter to a whole new audience of developers who may not have been able to use it before due to its dependency on Android or iOS.

2. First-Ever Desktop Support

Flutter hasn’t had desktop support since its first release as an experimental feature in beta 3. With Flutter 2.0, you can now build native desktop apps for Windows (and all other supported operating systems). This includes using Redux State Management to manage your UI state, a powerful tool that makes it easier to write maintainable applications.

3. Sound Null Safety for Dart

Dart's latest version also comes with a new compiler tool called dart2js. It allows you to use Dart libraries in JavaScript projects without worrying about porting them yourself. You don't have to manually compile them into JavaScript files that run on any platform supported by Google's Closure Compiler (which covers most modern browsers).

4. System Integrated Context Menu

Context menus are a great way to offer quick access to common actions, such as sharing or deleting an item or copying it to the clipboard. In Flutter 2.0, you can use the new context menu to provide users with quick access to system-integrated actions, such as search or calendar entries, without requiring them to navigate through a long list of options.

5. Integration of Google Ads in Your Apps

The Flutter 2.0 SDK includes support for ad integration in your app. It lets you easily start monetizing your app by showing ads directly inside it. This feature is supported by Google Ads and allows you to create an ad unit that looks like a native widget and can be embedded into your app's UI. You can also configure Google Ads on a per-app basis so that only those apps that have signed up with Google will show ads in them.

6. Memory Allocation Tools

Flutter 2.0 introduced memory allocation tools, which allow you to allocate memory on the heap and manage it with a stack or a queue. This will enable you to create large objects that are eagerly allocated and deallocated. Also, you can create small objects that aren't deallocated until they're no longer needed. These APIs are useful for tracking how much memory an app needs at any given time, so you can ensure your app doesn't run out of memory while it's running.

Comparison: Flutter 1.0 vs Flutter 2.0 vs Flutter 3.0

Flutter 1.0Flutter 2.0Flutter 3.0

Web Support Only in the beta version

Web Support On both web and mobile

Web Support On both the web and mobile (including foldable devices)

App crash possibilities Developers had to suffer through many crashes as there was a lack of null safety in Flutter 1.

App crash possibilities With Null Safety features, app crashes are reduced significantly with Flutter 2.

App crash possibilities Introduction of Firebase crashlytics to keep track of errors and reduce them.

Devices supported It didn’t have desktop support.

Devices supported iOS and Android, with web and Windows support

Devices supported Added support to macOS and Linus Apps along with the earlier supported devices

Difficult to search libraries for iOS. Developers had to go through a complicated task to find a search bar on iOS.

In Flutter 2.0, Google has incorporated the Search Bar UI from iOS into its TextField

Supported a higher refresh rate to provide a smoother experience for iOS users.

Difficult for developers to write code as they used different platforms.

Flutter 2.0 allowed developers to use the same code for both platforms.

Facility to create native interfaces for six different platforms with a single codebase.

Conclusion

Flutter 3's significant highlight was that it was first-hand available for 6 major platforms, with the addition of MacOS and Linux. Tim Sneath said that making these versions of Flutter a reality was Google's main goal with Flutter. He said this is a huge step towards developing a robust foundation for Flutter to build upon.

Ultimately, he agrees that developers will be more productive if they can take advantage of all the different versions of Flutter's supported platforms. Hopefully, in the coming days or so, we will be able to see what Google has in store for us next.

author

Rashi Jaitly