There are some new language features available in the Flutter master channel. They will be available in the stable channel when Dart 3 is released.
Records are collections of fields that can be used as a unit. For example:
(int, String, bool) triple = (3, 'f', true);
Records are displayed in the debugger as an expandable name, similar to lists.
Dart 3 adds pattern matching. As an example:
bool isAorBandAnother(List<String?> list) {
// Destructuring logical-or pattern in switch expression
return switch (list) { ['a' || 'b', var c] => c != null, _ => false };
}
This example introduces the “switch expression” and pattern matching on a list. It returns true if the list contains two elements, the first is ‘a’ or ‘b’, and the second element is not null, otherwise it returns false.
See the Flutter Forward video on pattern matching for details: https://www.youtube.com/watch?v=KhYTFglbF2k&t=2s
Code completion should be a little faster. The plugin was logging a lot of performance metrics that it didn’t need, and that caused performance issues.
Coverage results should be a bit friendlier. They were broken when a file had zero coverage.
Android Studio
Electric Eel | 2022.1
Flamingo | 2022.2
Giraffe | 2022.3 (unofficial, since this is the canary version)
IntelliJ
2022.1, 2022.2, 2022.3
2023.1