
2023 به تازگی با یک نسخه جدید هیجان انگیز برای Flutter یعنی نسخه 3.7 آغاز شده است. همانطور که به تکامل خود ادامه می دهد، شکی وجود ندارد که Flutter همچنان یکی از گسترده ترین چارچوب های توسعه بین پلتفرمی مورد استفاده خواهد بود.
بیایید نگاهی اجمالی به بهبودهایی که همراه با نسخه جدید به وجود آمده است بیندازیم:
:Improved Material 3 Support

مهاجرت ویجت های خاص تجربه استفاده از Material3 را بهبود بخشیده است. برخی از این ویجت ها عبارتند از Badge, Bottombar, Menus, DropdownMenu, Snackbar and TabBar.
برای استفاده از ویژگی های جدید، فقط باید فلگ useMaterial3 را در برنامه فعال کنید
برای ویجت ThemeData .
Menu Bars و Cascading Menus:
این نسخه از Flutter توانایی ایجاد نوارهای منو و منوهای زمینه آبشاری را معرفی می کند. برای macOS، توسعهدهندگان میتوانند از ویجت PlatformMenuBar برای ایجاد یک نوار منو استفاده کنند که بهجای Flutter توسط macOS به صورت بومی رندر میشود.
علاوه بر این، برای همه پلتفرمها، توسعهدهندگان میتوانند از منوی طراحی مواد استفاده کنند که نوارهای منوی آبشاری (MenuBar) یا منوهای آبشاری مستقلی را که توسط عنصر رابط کاربری دیگری (MenuAnchor) راهاندازی میشوند، ارائه میکند.
این منوها کاملا قابل تنظیم هستند و آیتم های منو می توانند ویجت های سفارشی باشند یا از ویجت های آیتم های جدید منو استفاده کنند.(MenuItemButton, SubmenuButton).
Impeller پیش نمایش :
یک موتور رندر جدید Impeller که اکنون برای پیش نمایش در iOS در کانال پایدار در دسترس است. اعتقاد بر این است که عملکرد Impeller برای اکثر برنامه ها قابل مقایسه یا بهتر از رندر Skia است و همه موارد به جز تعداد کمی از گوشه هایی که به ندرت استفاده می شوند را اجرا می کند.
اعتبار سنجی نسخه iOS:
دستور flutter build ipa اکنون شامل یک ویژگی است که تنظیمات خاصی را برای برنامههای iOS قبل از ارسال به اپ استور بررسی و تأیید میکند.
این کمک می کند تا اطمینان حاصل شود که برنامه با اطلاع دادن به توسعه دهنده از هرگونه تغییری که باید قبل از ارسال انجام شود، برای انتشار آماده است.
این ویژگی جدید چک لیستی از تنظیمات برای به روز رسانی است که به توسعه دهندگان کمک می کند تا برنامه را برای انتشار آماده کنند.
بروز رسانی DevTools :
این SDK جدید شامل چندین ویژگی ابزار جدید و بهبودهایی برای توسعه دهندگانی است که از Flutter استفاده می کنند. یکی از پیشرفتهای مهم در ابزار اشکالزدایی حافظه DevTools است که تحت بازنگری کامل قرار گرفته و شامل سه تب ویژگی جدید است: Profile، Trace و Diff. این برگهها از تمام ویژگیهای اشکالزدایی حافظه پشتیبانی شده قبلی پشتیبانی میکنند و برای سهولت اشکالزدایی، موارد بیشتری را اضافه میکنند.
ویژگی های جدید شامل توانایی تجزیه و تحلیل تخصیص حافظه فعلی برای برنامه بر اساس کلاس و نوع حافظه، بررسی مسیرهای کدی است که حافظه را برای مجموعه ای از کلاس ها در زمان اجرا تخصیص می دهند، و مقایسه عکس های فوری حافظه برای درک مدیریت حافظه بین دو نقطه در زمان..

سفارشی شدن Context Menus:
ویژگی جدید Context Menus در Flutter به توسعه دهندگان اجازه می دهد تا Context Menus سفارشی را برای بخش های مختلف برنامه خود ایجاد کنند و به آنها کنترل بیشتری به کاربر می دهد. این ویژگی با افزودن یک پارامتر contextMenuBuilder جدید به ویجتهای موجود که قبلاً Context Menus را به طور پیشفرض نشان میدهند، مانند TextField کار میکند.

توسعه دهندگان می توانند هر ویجتی را که می خواهند از contextMenuBuilder برگردانند، از جمله اصلاح context menu پیش فرض سازگار با پلتفرم. این ویژگی همچنین می تواند خارج از انتخاب متن استفاده شود، مانند ایجاد یک ویجت تصویر که با کلیک راست یا فشار طولانی، دکمه ذخیره را نشان می دهد.
ویجتهای CupertinoListSection و CupertinoListTile:
کوپرتینو دارای دو ویجت جدید CupertinoListSection و CupertinoListTile برای نمایش لیست قابل پیمایش ویجت ها در سبک iOS است. آنها نسخه های کوپرتینویی ListView و ListTile در Material هستند.
پیشرفتهای اسکرولینگ :
این تغییر به کاربران اجازه میدهد تا null را از itemBuilder برگردانند و انتهای لیست را نشان دهند و کار با ویجتهای اسکرول مانند ListView را برای آنها آسانتر میکند.

علاوه بر این، ویجتهای جدید Scrollbars و DraggableScrollableSheet گزینههای کنترل و سفارشیسازی بیشتری را برای نمایشهای پیمایشی فراهم میکنند، و مدیریت بهبود یافته برای انتخاب متن در زمینههای پیمایش انتخاب متن را در نماهای اسکرول آسانتر میکند..
Internationalization Tools and Docs:
Internationalization support has been completely revamped. The gen-l10n tool now supports:
Descriptive syntax errors.
Complex messages involving nested/multiple plurals, selects, and placeholders.
Text magnifier:
The magnifying glass that appears during text selection on Android and iOS now works in Flutter. This is enabled out of the box for all apps with text selection, but if you want to disable or customize it, see the magnifierConfiguration property.
Reduce animation lag on iOS devices:
Animation quality has greatly improved with the new version of Flutter, thanks to open source contributors.
Font asset hot reload:
Including new fonts to the pubspec.yaml file previously required the app to be rebuilt, unlike other assets which could be hot reloaded. This problem has been solved in Flutter 3.7.
Custom Shader Support Improvements:
Custom shaders can now be hot reloaded and the new Flutter SDK contains a shader compiler that is responsible to correctly compile the listed shader in pubspec.yaml to the relevant backend-specific format for the target platform.
toImageSync:
This release adds new methods, Picture.toImageSync and Scene.toImageSync, to dart:ui. These methods are similar to the asynchronous methods, Picture.toImage, and Scene.toImage, but they synchronously return a handle to an Image.
The rasterization for the Image takes place in the background and the image is kept as GPU resident when a GPU context is available, which makes it faster to draw compared to images produced by toImage.
These new toImageSync APIs are useful for quickly snapping off an expensive-to-rasterize picture for reuse across multiple frames, applying multi-pass filters to a picture, and applying custom shaders.
Support discontinuation for macOS 10.11-10.13:
Flutter has announced that it will no longer support macOS versions 10.11, 10.12, and 10.13. This decision was made after further analysis revealed that removing support for these versions would have limited additional impact, and would simplify the codebase.
This means that apps built against stable Flutter SDKs with this release and onward will no longer work on these versions, and the minimum macOS version supported by Flutter increases to 10.14 Mojave.
Consequently the OpenGL backend has been removed from both the iOS and macOS embedders which has reduced the compressed size of the Flutter engine by about 100KB.
Memory Management:
This release of Flutter includes several improvements to memory management that aim to reduce lag caused by garbage collection pauses, lower CPU utilization due to allocation velocity and background GC threads, and reduce the overall memory footprint.
One example of this is expanding the existing practice of manually deallocating native resources that back certain dart:ui Dart objects. Benchmarks of the Flutter framework migrated to this API have shown that these improvements can reduce 90%-ile frame build times by up to more than 30%, resulting in smoother animations with less jank.

Photo by Kevin Chisholm on Medium
Additionally, the Flutter engine no longer registers the size of GPU images with the Dart VM, which eliminates synchronous GC work while building frames when a widget creates GPU resident images. The Flutter Engine also does a better job of dynamically updating the Dart VM with information about Flutter application state.
Finally, for add-to-app Flutter applications, the Flutter engine now informs the Dart VM when the Flutter view is no longer displayed, this causes the Dart VM to trigger a final major GC for the Isolate associated with the view which reduces Flutter's memory footprint when no Flutter views are visible.