flutter/packages/flutter_tools/test
Ben Konyi f25b4b77ff
[ Widget Previews ] Add support for detecting previews and generating code (#161911)
`flutter widget-preview start` will now look for functions annotated
with `@Preview()` within the developer's project. These functions will
be used to generate
`.dart_tool/widget_preview_scaffold/lib/generated_preview.dart`, which
inserts the returned value from each preview function into a
`List<WidgetPreview>` returned from a `previews()` method that is
invoked by the widget preview scaffold root.

**Example generated_preview.dart:**

```dart
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:foo/foo.dart' as _i1;
import 'package:foo/src/bar.dart' as _i2;
import 'package:widget_preview/widget_preview.dart';

List<WidgetPreview> previews() => [_i1.preview(), _i2.barPreview1(), _i2.barPreview2()];
```
2025-01-28 17:59:57 +00:00
..
android_java11_integration.shard Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_preview_integration.shard Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
commands.shard [ Widget Previews ] Add support for detecting previews and generating code (#161911) 2025-01-28 17:59:57 +00:00
data make asset_test.dart tests not dependent on context (#141331) 2024-01-11 18:08:07 +00:00
general.shard [ Widget Previews ] Add support for detecting previews and generating code (#161911) 2025-01-28 17:59:57 +00:00
host_cross_arch.shard Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
integration.shard remove dependency on Usage from Pub class (#162279) 2025-01-28 17:32:27 +00:00
src 🔊 [tool] Add a wirelessly connected device name as displayName (#160497) 2025-01-10 20:51:34 +00:00
web.shard [web] Remove HTML renderer from framework tests (#162038) 2025-01-24 21:33:27 +00:00