mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
![]() The `theme` parameter of `Preview(...)` allows for developers to provide a callback that returns a `PreviewThemeData` instance which can contain theming data for Material and Cupertino widgets in both light and dark modes. The provided theme data will be injected into the widget tree and applied to the previewed widget. The `brightness` parameter allows for developers to specify an initial brightness setting (e.g., light vs dark mode) for the previewed widget. If not provided, the current system default is used. A new button has also been added to each widget preview card that allows for toggling between light and dark mode for individual previews. **Demo:** https://github.com/user-attachments/assets/f0a4a3bc-25d2-49b0-a5f6-9149eccfc1d4 Fixes https://github.com/flutter/flutter/issues/166436 Fixes https://github.com/flutter/flutter/issues/166275 Fixes https://github.com/flutter/flutter/issues/166279 Fixes https://github.com/flutter/flutter/issues/166437 |
||
---|---|---|
.. | ||
lib | ||
test | ||
pubspec.yaml | ||
README.md |
Android Extensions for Flutter Driver
This a minimal library on top of flutter_driver
that provides extensions for
interacting with the native Android platform, to otherwise perform actions that
are not possible purely through Flutter Driver, and would want to run as an
external test (run on the host, not on the device):
- Take a screenshot, including of native widgets (platform views, textures)
- Tap on a native widget
- Rotate the device
- Background an app and send a "trim memory" signal to the device
Note
While this library runs on Flutter's own CI, and is used to test Flutter's Platform Views, it is not officially supported as an external API, and may change or be removed at any time. We recommend you use existing testing infrastructure, such as: