Flutter 3.35: Notable Advances in Performance, Accessibility, and UI

 

Key points everyone from beginners to professional developers should know



In the ever-evolving Flutter ecosystem, sometimes a small change catches our eye, but underneath it lies a major transformation. Flutter 3.35 arrived with such “small but effective” updates. In this article, I explore the most notable new features, explaining why each one is important and how they stand out in practice. I hope you find it useful.

You can read the full article here.

Breaking Changes — Changes That Require You to Rewrite Your Code

The form is no longer sliver

Previously, we could use the Form widget directly in CustomScrollView, but now we get an error. In the new world, it looks like this:

CustomScrollView(
slivers: [
SliverToBoxAdapter(
child: Form(...),
),
],
);

You will need to pay attention to where the Form widget is located in your code — because this is a direct irreversible change.

Semantics elevation & thickness removed

The semanticsElevation and semanticsThickness properties in the accessibility APIs are now gone. If you have developed custom a11y-enabled widgets, you may need to review these areas.

The use of value in DropdownButtonFormField is no longer recommended; initialValue has replaced it.

Now, when using DropdownButtonFormField:

DropdownButtonFormField<String>(
initialValue: 'A',
items: [...],
onChanged: (v) {},
);

If you are using the value: field, you need to replace it with initialValue:. This has been done to make form state management more consistent. You should adjust your code accordingly.

Radio Widget Redesigned

Radio has been updated visually and behaviorally. It has been improved in terms of theme compatibility and accessibility. However, if you are customizing, you will need to look at the new RadioThemeData fields. At this point, it would be good to open a separate parenthesis regarding the theme.

Theme Normalization

Many component theme APIs (AppBarTheme, InputDecorationTheme, etc.) have had their naming and default values adjusted. You may receive warnings in your theme files.

Important Developments in the Framework

Widget Preview’s light-language support

The Widget Preview feature has become much more flexible: you can now test theme and brightness settings and language localization in different modalities. I think this will be particularly useful for package developers.

DrivenScrollActivity.simulation Constructor

A new constructor has been added for those who want to manually manage more complex scroll animations. It is noted that this will be useful in special physics animation scenarios. For example:

TreeSliver & SliverEnsureSemantics

The scrolling behavior of the TreeSliver structure in Flutter has been fixed, resulting in fewer UI artifacts. At the same time, SliverEnsureSemantics incorrect sub-properties have been revived in terms of accessibility, which is particularly beneficial for screen reader users.

MediaQuery.heightOf / widthOf

Instead of MediaQuery.sizeOf(context).height, there are now shorter methods such as MediaQuery.heightOf(context).

final screenHeight = MediaQuery.heightOf(context);

Cupertino and Material Changes

Cupertino

  • CupertinoSlider now supports vibration (haptic feedback). Haptic feedback reinforces the user’s sense of scrolling.
  • New components or enhanced behaviors such as CupertinoDatePicker, CupertinoTimerPicker, CupertinoExpansionTile, and CupertinoCollapsible have been introduced.
  • Buttons and navigation bar transitions are now more consistent, and animations are smoother.

Material

CarouselView Improvements

CarouselView is now themeable and bugs have been fixed. Mouse scroll support and crash fixes are important.

InputDecorationTheme Extended

  • visualDensity support has been added.
  • hintMaxLines has been added to make it easier to control long placeholder text.
  • hintLocales enables multi-language support for placeholders.

Switch and CheckboxListTile Improvements

  • activeThumbColor has been added for Switch.
  • isThreeLine can be set via theme for CheckboxListTile and SwitchListTile.

DropdownMenuFormField Improvements

  • restorationId support.
  • trailingIcon can be hidden.
  • initialValue instead of value parameter. (I explained this above)

Platform-Specific Improvements

iOS & macOS

  • The minimum iOS version has not been updated from 13 to 14, but some APIs have been made compatible with modern Swift.
  • Embedder support with Swift has been expanded.
  • Small but important improvements have been made, such as the keyboard closing after a hot restart.
  • Live Text support has been added.

Android

  • Min SDK has been upgraded: API 24 (Lollipop) and below are no longer supported.
  • Android target SDK has been increased to 36.
  • Impeller Vulkan startup time has been improved, which will be directly noticeable in graphics-intensive applications.
  • Deprecation: methods such as setStatusBarColor will be removed.

Web

  • Some input focus issues in Safari/Firefox have been fixed.
  • Tab order has been adjusted in accessibility tools such as VoiceOver.
  • Graphical smoothness has been improved thanks to paint dithering.

Windows

  • Multi-window support has been added.
  • Platform and UI threads have been merged into a “unified structure.”
  • The goal is to improve performance and stability in Windows applications.

Engine and Performance Improvements

  • Impeller: more efficient stroke calculations, faster startup in Vulkan mode.
  • Experimental mode for leak tracker on the web is now available, making it easier for developers to check for memory leaks.
  • The working infrastructure with Pub workspace has evolved into a Modern Flutter project.
  • Many Pub packages have been cleaned up in the testing process, speeding up the build process.
  • Frame rendering is more stable: FPS fluctuations have decreased by 30% on low-end devices in particular.
  • Thanks to shader compilation cache improvements, the “jank” issue experienced during initial startup has been significantly reduced.
  • Skia update enables sharper vector drawings and lower memory consumption.

A quick note: If you use game-like animations, try testing with Impeller in this version. They say you’ll notice a smoother experience.

In summary;

Flutter 3.25 is not just a version update; it offers a smoother, more consistent, and developer-friendly experience. It is also a significant step forward in terms of performance optimization.

It includes changes that are useful even for small projects and will directly affect your code in large projects. I have tried to summarize the release notes as best I can, and I hope you find it useful.

If you haven’t updated your project yet, you can update Flutter immediately with the following command:

flutter upgrade

Thank you for reading this far.

If you liked my writing, don’t forget to click the clap button and subscribe to stay informed about my other content.

See you in my next posts.

Selin.

Hiç yorum yok: