DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
11 Monitoring and Observability Tools for 2023
Learn more
  1. DZone
  2. Coding
  3. Frameworks
  4. What’s New in Flutter 3.7?

What’s New in Flutter 3.7?

Discover the latest updates and enhancements in Flutter 3.7. Stay up-to-date with the latest developments in Flutter technology.

Bernard Maina user avatar by
Bernard Maina
·
Mar. 09, 23 · Analysis
Like (2)
Save
Tweet
Share
2.81K Views

Join the DZone community and get the full member experience.

Join For Free

Flutter 3.7, the latest version of the popular cross-platform app development framework, was recently released with numerous improvements and new features. This version brings a lot of new advancements in performance, development tools, and framework stability.

Here are some of the new features that Flutter 3.7 has to offer:

1. Flutter for Web Improvements

Flutter 3.7 brings a lot of new improvements to the Flutter for Web platform. The most significant improvement is the introduction of the NavigationDelegate API, which provides a new way for developers to handle navigation events in the web application. 

The following is an example of how to use the NavigationDelegate API in Flutter:

Dart
 
import 'package:flutter_web/material.dart';

void main() {
  runApp(MaterialApp(
    home: MyHomePage(),
    onGenerateRoute: (RouteSettings settings) {
      return MaterialPageRoute<void>(
        settings: settings,
        builder: (BuildContext context) => MyHomePage(),
        maintainState: true,
        fullscreenDialog: false,
      );
    },
    navigatorObservers: [
      NavigationDelegate(),
    ],
  ));
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Text('Welcome to Flutter'),
      ),
    );
  }
}


2. Better Debugging and Development Tools

Flutter 3.7 includes new features and improvements in the development tools that make it easier for developers to debug their apps. 

One of the new features is the Flutter CLI, which now includes a new flag called --debug-print that allows developers to turn on debug logging when running the application.

3. Support for Apple Silicon-Based Macs

This means that developers can now build and run Flutter apps on Apple Silicon-based Macs, which provides better performance, longer battery life, and access to the latest features in macOS.

To run Flutter apps on an Apple Silicon-based Mac, follow the instructions on the Flutter website to install the Flutter SDK.


install the Flutter SDK


4. Support for Non-Nullable Types

With the Dart SDK upgrade to version 2.12, Flutter 3.7 now supports non-nullable types. This feature can help developers catch errors in their code more easily, as the compiler will automatically generate warnings when non-nullable types are used incorrectly.

Here's an example of using non-nullable types in the flutter

Dart
 
void main() { int age = 25; print("The age is $age"); }


In this example, we declare a non-nullable integer variable age and assign it a value of 25. Then, we print the value of age using string interpolation.

Non-nullable types are the default type in Dart and do not require the? operator. If you declare a variable without the? operator, you must assign it a value when it's declared or in a later assignment.

If you try to use a non-nullable variable that has not been assigned a value, it will result in a compile-time error.

5. Improved Performance

Flutter 3.7 introduces several new features and improvements aimed at improving the performance of Flutter apps. 

One of the new features is the introduction of the enum class, which allows developers to define a set of named constants that can be used in switch statements. 

This feature can lead to a performance boost in applications that use a large number of switch statements. The following is an example of how to use the enum class in Flutter:

Dart
 
enum Color { red, green, blue }

void main() {
  var color = Color.red;
  switch (color) {
    case Color.red:
      print('Red');
      break;
    case Color.green:
      print('Green');
      break;
    case Color.blue:
      print('Blue');
      break;
  }
}


Conclusion

Flutter 3.7 is a major release that introduces several new features and improvements aimed at making app development easier and more efficient. Whether you are a seasoned Flutter developer or just starting out, the new features and improvements in Flutter 3.7 are sure to make your app development experience smoother and more enjoyable.

Flutter (software) Debug code Software development

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Build an Automated Testing Pipeline With GitLab CI/CD and Selenium Grid
  • Fixing Bottlenecks in Your Microservices App Flows
  • Microservices 101: Transactional Outbox and Inbox
  • Stress Testing Tutorial: Comprehensive Guide With Best Practices

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: