flutter/dev/benchmarks/platform_views_layout
Ben Konyi 3595e7dad0
[ Widget Preview ] Add support for theme and brightness properties on Preview (#167001)
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
2025-04-15 17:51:40 +00:00
..
android Convert AppLinkSettings to kotlin (#164391) 2025-03-11 17:00:17 +00:00
ios Platform view devicelab ad banner scroll list real ads (#145239) 2024-03-16 05:44:21 +00:00
lib Remove redundant useMaterial3: true (#163376) 2025-03-14 17:50:20 +00:00
test_driver [Android] add HCPP platform views benchmark and integration test. (#163018) 2025-02-11 02:12:49 +00:00
pubspec.yaml [ Widget Preview ] Add support for theme and brightness properties on Preview (#167001) 2025-04-15 17:51:40 +00:00
README.md Added missing code block language in docs (#147481) 2024-05-01 14:44:27 +00:00

platform_views_layout

Scrolling benchmark

To run the scrolling benchmark on a device:

flutter drive --profile test_driver/scroll_perf.dart

Results should be in the file build/platform_views_scroll_perf.timeline_summary.json.

More detailed logs should be in build/platform_views_scroll_perf.timeline.json.

Startup benchmark

To measure startup time on a device:

flutter run --profile --trace-startup

The results should be in the logs.

Additional results should be in the file build/start_up_info.json.