mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This change adds a new `localizations` property to the `Preview` annotation, which takes a callback that returns a `PreviewLocalizationsData` object. This class contains the same localization properties that can be provided to `WidgetsApp` and other similar widgets. This change also refactors much of the localization resolution logic into a shared `LocalizationsResolver` class to allow for localization resolution to be done in the widget preview scaffold on a per-preview basis. Fixes https://github.com/flutter/flutter/issues/166433
Flutter
Flutter is a new way to build high-performance, cross-platform mobile, web, and desktop apps. Flutter is optimized for today's — and tomorrow's — mobile and desktop devices. We are focused on low-latency input and high frame rates on all platforms.
See the getting started guide for information about using Flutter.