Commit graph

3759 commits

Author SHA1 Message Date
auto-submit[bot] 70e9b4185e
Reverts "Add tests for form_text_field.1.dart (#150481)" (#150696)
Reverts: flutter/flutter#150481
Initiated by: cbracken
Reason for reverting: Surprisingly, the following test seems to be consistently failing on Windows after the addition of this test:
```
flutter/packages/flutter/test/widgets/sliver_tree_test.dart: .toggleNodeWith, onNodeToggle
```
Original PR Author: ValentinVignal

Reviewed By: {TahaTesser, bleroux}

This change reverts the following previous change:
Contributes to https://github.com/flutter/flutter/issues/130459

It adds a test for
- `examples/api/lib/material/text_form_field/text_form_field.1.dart`
2024-06-24 12:35:26 +00:00
Valentin Vignal 27b961673a
Add tests for form_text_field.1.dart (#150481)
Contributes to https://github.com/flutter/flutter/issues/130459

It adds a test for
- `examples/api/lib/material/text_form_field/text_form_field.1.dart`
2024-06-24 06:16:13 +00:00
Gray Mackall 4a84fb0fea
Remove discontinued device_info and connectivity plugins from flutter_gallery, roll pub packages (#150585)
Removes these two discontinued plugins from `dev/integration_tests/flutter_gallery`

[`device_info`](https://pub.dev/packages/device_info):
Apparently the video playback doesn't work on iOS simulators (I wasn't able to verify this, as I don't have an iOS simulator installed). I removed the guard against running on those simulators, and replaced with a note in the README.

[`connectivity`](https://pub.dev/packages/connectivity):
This plugin was used to play the bee video from the network. I changed the demo so that the bee video is instead also played from an asset (like its friend the butterfly), and then removed the use of the plugin.

Unblocks the re-land of https://github.com/flutter/engine/pull/53462 (itself a reland 🙂), because of https://github.com/flutter/flutter/pull/150465#issuecomment-2181403712.
2024-06-21 23:10:24 +00:00
Parker Lougheed c63339866d
Update flutter.dev links from misc packages to more permanent destinations (#150532)
Contributes to https://github.com/flutter/website/issues/10363
2024-06-20 23:09:08 +00:00
Valentin Vignal b3dc24ccc6
Add test for inherited_notifier.0.dart (#150344)
Contributes to https://github.com/flutter/flutter/issues/130459

It adds a test for
- `examples/api/lib/widgets/inherited_notifier/inherited_notifier.0.dart`
2024-06-20 17:55:07 +00:00
derdilla 0674f46e9f
Test InputDecoration API examples (#148560)
Add tests for `InputDecoration` API example as part of #130459. Updates examples that use the deprecated MaterialState to use WidgetState. Tests files: `input_decoration.0.dart`, `input_decoration.1.dart`, `input_decoration.2.dart`, `input_decoration.3.dart`, `input_decoration.widget_state.0.dart`, `input_decoration.widget_state.1.dart`, `input_decoration.prefix_icon_constraints.0.dart`, `input_decoration.suffix_icon_constraints.0.dart`, and `input_decoration.label.0.dart`
2024-06-20 16:02:07 +00:00
Valentin Vignal 71ac7f55b3
Add tests for about_list_tile.0.dart (#150181)
Contributes to https://github.com/flutter/flutter/issues/130459

It adds a test for
- `examples/api/lib/material/about/about_list_tile.0.dart`
2024-06-19 07:40:31 +00:00
Hasan M. Hallak f54dfcd27d
add forceErrorText to FormField & TextFormField. (#132903)
Introducing the `forceErrorText` property to both `FormField` and `TextFormField`. With this addition, we gain the capability to trigger an error state and provide an error message without invoking the `validator` method.

While the idea of making the `Validator` method work asynchronously may be appealing, it could introduce significant complexity to our current form field implementation. Additionally, this approach might not be suitable for all developers, as discussed by @justinmc  in this [comment](https://github.com/flutter/flutter/issues/56414#issuecomment-624960263).

This PR try to address this issue by adding `forceErrorText` property allowing us to force the error to the `FormField` or `TextFormField` at our own base making it possible to preform some async operations without the need for any hacks while keep the ability to check for errors if we call `formKey.currentState!.validate()`.

Here is an example:

<details> <summary>Code Example</summary>  

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(
    const MaterialApp(home: MyHomePage()),
  );
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({
    super.key,
  });

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final key = GlobalKey<FormState>();
  String? forcedErrorText;

  Future<void> handleValidation() async {
    // simulate some async work..
    await Future.delayed(const Duration(seconds: 3));

    setState(() {
      forcedErrorText = 'this username is not available.';
    });

    // wait for build to run and then check.
    //
    // this is not required though, as the error would already be showing.
    WidgetsBinding.instance.addPostFrameCallback((_) {
      print(key.currentState!.validate());
    });
  }

  @override
  Widget build(BuildContext context) {
    print('build');
    return Scaffold(
      floatingActionButton: FloatingActionButton(onPressed: handleValidation),
      body: Form(
        key: key,
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Padding(
                padding: const EdgeInsets.symmetric(horizontal: 30),
                child: TextFormField(
                  forceErrorText: forcedErrorText,
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
```
</details>

Related to #9688 & #56414.

Happy to hear your thoughts on this.
2024-06-18 17:52:21 +00:00
Valentin Vignal f2c48afbb1
Add test for icon_button.3.dart (#149988)
Contributes to https://github.com/flutter/flutter/issues/130459

It adds a test for
- `examples/api/lib/material/icon_button/icon_button.3.dart`
2024-06-18 15:03:59 +00:00
Kate Lovett 9b6813f4da
Reland TreeSliver (#149839)
Reland of https://github.com/flutter/flutter/pull/147171

It was reverted for a failing unit test that had passed in presubmit. Hopefully this sticks better.
Also fixed leaks in 37b10adc90
2024-06-17 19:49:05 +00:00
flutter-pub-roller-bot e110fdd1c9
Roll pub packages (#150267)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-06-14 18:19:41 +00:00
Valentin Vignal 349ec7183c
Add tests for navigator.0.dart (#150034)
Contributes to https://github.com/flutter/flutter/issues/130459

It adds a test for
- `examples/api/lib/widgets/navigator/navigator.0.dart`
2024-06-14 06:39:14 +00:00
Taha Tesser f56e0c2845
[Reland] Introduce ChipAnimationStyle to override default chips animations durations (#149876)
Reland - https://github.com/flutter/flutter/pull/149245

---

fixes [Custom backgroundColor on Chip makes it flicker between state transitions](https://github.com/flutter/flutter/issues/146730)

### Example preview
![Screenshot 2024-05-28 at 17 40 00](https://github.com/flutter/flutter/assets/48603081/b9117ed2-5afa-4d65-93ae-aa866772ffa1)

https://github.com/flutter/flutter/assets/48603081/a4949ce7-f38b-4251-8201-ecc570ec447c
2024-06-13 19:28:21 +00:00
Valentin Vignal 9b3c936eb3
Reland "Add tests for scaffold drawer and end drawer" (#150045) (#150047)
This relands commit 14df7be3f9.

Contributes to https://github.com/flutter/flutter/issues/130459

Needs https://github.com/flutter/flutter/issues/149851 to be fixed before getting merged
2024-06-12 14:55:17 +00:00
flutter-pub-roller-bot ad462e2783
Roll pub packages (#150070)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-06-12 05:40:31 +00:00
Michael Goderbauer 962ae8a334
Remove double MaterialApp wrap from api samples (#150055)
The widget under test already contains a MaterialApp, so there's no need to wrap it again with one in the test. In fact, the additional MaterialApp could hide problems in the widget under test.
2024-06-12 05:22:23 +00:00
Greg Spencer 966d2b9223
Fix ColorScheme example and tests (#150018)
## Description

This fixes the `ColorScheme` example to actually work.  The test had wrapped the app in an additional `MaterialApp`, which allowed the tests to work, but the real problem was using a `context` that was outside the `MaterialApp` to open the bottom sheet, which caused an exception when you actually try to run it interactively.

This fixes the example and the test.

## Tests
 - Fixed the test to not artificially add a second `MaterialApp`.
2024-06-12 05:07:23 +00:00
yaakovschectman 14df7be3f9
Revert "Add tests for scaffold drawer and end drawer" (#150045)
Reverts flutter/flutter#149383 as it caused failure for mac
framework_tests_impeller.
2024-06-11 11:14:54 -04:00
Valentin Vignal aad70e5cdb
Add tests for scaffold drawer and end drawer (#149383)
Contributes to https://github.com/flutter/flutter/issues/130459

It adds a test for
- `examples/api/lib/material/scaffold/scaffold.drawer.0.dart`
- `examples/api/lib/material/scaffold/scaffold.end_drawer.0.dart`
2024-06-11 07:06:24 +00:00
Hans Muller 9ce0a9e510
PinnedHeaderSliver (#143196)
A sliver that remains “pinned” to the top of the scroll view. Subsequent slivers scroll behind it. Typically the sliver is created as the first item in the list however it can be inserted anywhere and it will always stop at the top of the scroll view. When the scrolling axis is vertical, the PinnedHeaderSliver’s height is defined by its widget child. Multiple PinnedHeaderSlivers will layout one after the other, once they've scrolled to the top.

This sliver is preferable to the general purpose SliverPersistentHeader - for its relatively narrow use case - because there's no need to create a [SliverPersistentHeaderDelegate] or to predict the header's size.

Here's a [working demo in DartPad](https://dartpad.dev/?id=3b3f24c14fa201f752407a21ca9c9456).

https://github.com/flutter/flutter/assets/1377460/943f2e02-8e73-48b7-90be-61168978ff71

Related sliver utility PRs: https://github.com/flutter/flutter/pull/143538, https://github.com/flutter/flutter/pull/143325, https://github.com/flutter/flutter/pull/127340.
2024-06-07 21:27:06 +00:00
Valentin Vignal dcc5361126
Add test for dropdown_menu.1.dart (#149547)
Contributes to https://github.com/flutter/flutter/issues/130459

It adds a test for
- `examples/api/lib/material/dropdown_menu/dropdown_menu.1.dart`
2024-06-07 07:13:02 +00:00
Valentin Vignal ad56b54b63
Add test for standard_fab_location.0.dart (#149225)
Contributes to https://github.com/flutter/flutter/issues/130459

It adds a test for
- `examples/api/lib/material/floating_action_button_location/standard_fab_location.0.dart`
2024-06-07 07:08:53 +00:00
flutter-pub-roller-bot 27972ebb48
Roll pub packages (#149852)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-06-06 22:35:15 +00:00
Hans Muller 7e3e30929a
SliverResizingHeader (#143325)
A sliver that is pinned to the start of its `CustomScrollView` and reacts to scrolling by resizing between the intrinsic sizes of its min and max extent prototypes.

The minimum and maximum sizes of this sliver are defined by `minExtentPrototype` and `maxExtentPrototype`, a pair of widgets that are laid out once. You can use `SizedBox` widgets to define the size limits.

This sliver is preferable to the general purpose `SliverPersistentHeader` for its relatively narrow use case because there's no need to create a `SliverPersistentHeaderDelegate` or to predict the header's minimum or maximum size.

The sample shows how this sliver's two extent prototype properties can be used to create a resizing header whose minimum and maximum sizes match small and large configurations of the same header widget.

https://github.com/flutter/flutter/assets/1377460/fa7ced98-9d92-4d13-b093-50392118c213

Related sliver utility PRs: https://github.com/flutter/flutter/pull/143538, https://github.com/flutter/flutter/pull/143196, https://github.com/flutter/flutter/pull/127340.
2024-06-06 22:35:12 +00:00
auto-submit[bot] 6f2d0be6b5
Reverts "Introduce ChipAnimationStyle to override default chips animations durations (#149245)" (#149847)
Reverts: flutter/flutter#149245
Initiated by: QuncCccccc
Reason for reverting: the newly-added unit test might cause the red tree
Original PR Author: TahaTesser

Reviewed By: {bleroux, Piinks}

This change reverts the following previous change:
fixes [Custom backgroundColor on Chip makes it flicker between state transitions](https://github.com/flutter/flutter/issues/146730)

### Example preview
![Screenshot 2024-05-28 at 17 40 00](https://github.com/flutter/flutter/assets/48603081/b9117ed2-5afa-4d65-93ae-aa866772ffa1)

https://github.com/flutter/flutter/assets/48603081/a4949ce7-f38b-4251-8201-ecc570ec447c
2024-06-06 20:35:18 +00:00
Taha Tesser 0a546705b4
Introduce ChipAnimationStyle to override default chips animations durations (#149245)
fixes [Custom backgroundColor on Chip makes it flicker between state transitions](https://github.com/flutter/flutter/issues/146730)

### Example preview
![Screenshot 2024-05-28 at 17 40 00](https://github.com/flutter/flutter/assets/48603081/b9117ed2-5afa-4d65-93ae-aa866772ffa1)

https://github.com/flutter/flutter/assets/48603081/a4949ce7-f38b-4251-8201-ecc570ec447c
2024-06-06 19:39:49 +00:00
Qun Cheng 3ed3f31ba6
Add contrastLevel parameter to ColorScheme.fromSeed (#149705)
This PR is to add a parameter `contrastLevel` to `ColorScheme.fromSeed` so that we can construct high contrast `ColorScheme`.

https://github.com/flutter/flutter/assets/36861262/c609c996-5dfe-4c6c-800c-349a99de4256

Related to https://github.com/flutter/flutter/issues/149683
2024-06-05 22:16:08 +00:00
Qun Cheng 6e5f39b5d9
Create CarouselView widget - Part 1 (#148094)
This PR is to create an ["uncontained" Carousel](https://m3.material.io/components/carousel/specs#477de3a1-c9df-4742-baf3-bcd5eeb3764c).

https://github.com/flutter/flutter/assets/36861262/947e6b2c-219f-4c8b-aba1-4a1a010221a7

The rest of the layouts can be achieved by using `Carousel.weighted`: https://github.com/QuncCccccc/flutter/pull/2. The branch of `Caorusel.weighted` PR is based on this PR for relatively easer review. Will request reviews for the part 2 PR once this one is successfully merged in master.
2024-06-05 21:03:21 +00:00
auto-submit[bot] 27e06569a1
Reverts "TreeSliver & associated classes (#147171)" (#149754)
Reverts: flutter/flutter#147171
Initiated by: QuncCccccc
Reason for reverting: tree is red due to a test in this PR
Original PR Author: Piinks

Reviewed By: {QuncCccccc, TahaTesser, bleroux}

This change reverts the following previous change:
**FYI for Reviewers:** Much of the API surface matches that of the 2D TreeView in https://github.com/flutter/packages/pull/6592. If it changes here, it should change there, and vice versa.

📜  [Design Document](https://docs.google.com/document/d/1-aFI7VjkF9yMkWpP94J8T_JREDS-M3bOak26PVehUYg/edit?usp=sharing)

This adds classes and associated callbacks and controllers for TreeSliver. Core components:
- TreeSliver
- RenderTreeSliver
- TreeSliverNode
- TreeSliverController
- TreeSliverStateMixin
- TreeSliverIndentationType

Fixes https://github.com/flutter/flutter/issues/114299

https://github.com/flutter/flutter/assets/16964204/3facd095-7262-4068-aa33-d713e2deca99

https://github.com/flutter/flutter/assets/16964204/f851ae30-8e71-45c7-82a4-9606986a5872
2024-06-05 17:17:19 +00:00
Peter Trost 39472d9b61
Feature: Add AnimatedList with separators (#144899)
This PR adds `AnimatedList.separated`. A widget like an AnimatedList with animated separators. `animated_list_separated.0.dart` extends `animated_list.0.dart` to work with `AnimatedList.separated`

Related issue: https://github.com/flutter/flutter/issues/48226
2024-06-05 15:20:07 +00:00
Kate Lovett b50eb97b7d
TreeSliver & associated classes (#147171)
**FYI for Reviewers:** Much of the API surface matches that of the 2D TreeView in https://github.com/flutter/packages/pull/6592. If it changes here, it should change there, and vice versa.

📜  [Design Document](https://docs.google.com/document/d/1-aFI7VjkF9yMkWpP94J8T_JREDS-M3bOak26PVehUYg/edit?usp=sharing)

This adds classes and associated callbacks and controllers for TreeSliver. Core components:
- TreeSliver
- RenderTreeSliver
- TreeSliverNode
- TreeSliverController
- TreeSliverStateMixin
- TreeSliverIndentationType

Fixes https://github.com/flutter/flutter/issues/114299

https://github.com/flutter/flutter/assets/16964204/3facd095-7262-4068-aa33-d713e2deca99

https://github.com/flutter/flutter/assets/16964204/f851ae30-8e71-45c7-82a4-9606986a5872
2024-06-04 22:50:06 +00:00
Hans Muller 92f8455ff8
Scrollbar thumb drag gestures now produce one start and one end scroll notification (#146654)
The scroll notification events reported for a press-drag-release gesture within a scrollable on a touch screen device begin with a `ScrollStartNotification`, followed by a series of `ScrollUpdateNotifications`, and conclude with a `ScrollEndNotification`. This protocol can be used to defer work until an interactive scroll gesture ends. For example, you might defer updating a scrollable's contents via network requests until the scroll has ended, or you might want to automatically auto-scroll at that time. 

In the example that follows the CustomScrollView automatically scrolls so that the last partially visible fixed-height item is completely visible when the scroll gesture ends. Many iOS applications do this kind of thing. It only makes sense to auto-scroll when the user isn't actively dragging the scrollable around.

It's easy enough to do this by reacting to a ScrollEndNotifcation by auto-scrolling to align the last fixed-height list item ([source code](https://gist.github.com/HansMuller/13e2a7adadc9afb3803ba7848b20c410)).

https://github.com/flutter/flutter/assets/1377460/a6e6fc77-6742-4f98-81ba-446536535f73

Dragging the scrollbar thumb in a desktop application is a similar user gesture. Currently it's not possible to defer work or auto-scroll (or whatever) while the scrollable is actively being dragged via the scrollbar thumb because each scrollbar thumb motion is mapped to a scroll start - scroll update - scroll end series of notifications.  On a desktop platform, the same code behaves quite differently when the scrollbar thumb is dragged.

https://github.com/flutter/flutter/assets/1377460/2593d8a3-639c-407f-80c1-6e6f67fb8c5f

The stream of scroll-end events triggers auto-scrolling every time the thumb moves. From the user's perspective this feels like a losing struggle.

One can also detect the beginning and end of a touch-drag by listening to the value of a ScrollPosition's `isScrollingNotifier`. This approach suffers from a similar problem: during a scrollbar thumb-drag, the `isScrollingNotifier` value isn't updated at all.

This PR refactors the RawScrollbar implementation to effectively use a ScrollDragController to manage scrolls caused by dragging the scrollbar's thumb. Doing so means that dragging the thumb will produce the same notifications as dragging the scrollable on a touch device.

Now desktop applications can choose to respond to scrollbar thumb drags in the same that they respond to drag scrolling on a touch screen. With the changes included here, the desktop or web version of the app works as expected, whether you're listing to scroll notifications or the scroll position's `isScrollingNotifier`.

https://github.com/flutter/flutter/assets/1377460/67435c40-a866-4735-a19b-e3d68eac8139

This PR also makes the second [ScrollPosition API doc example](https://api.flutter.dev/flutter/widgets/ScrollPosition-class.html#cupertino.ScrollPosition.2) work as expected when used with the DartPad that's  part of API doc page.

Desktop applications also see scroll start-update-end notifications due to the mouse wheel.  There is no touch screen analog for the mouse wheel, so an application that wanted to enable this kind of auto-scrolling alignment would have to include a heuristic that dealt with the sequence of small scrolls triggered by the mouse wheel. Here's an example of that: [source code](https://gist.github.com/HansMuller/ce5c474a458f5f4bcc07b0d621843165). This version of the app does not auto-align in response to small changes, wether they're triggered by dragging the scrollbar thumb of the mouse wheel.

Related sliver utility PRs: https://github.com/flutter/flutter/pull/143538,  https://github.com/flutter/flutter/pull/143196, https://github.com/flutter/flutter/pull/143325.
2024-06-04 22:02:12 +00:00
flutter-pub-roller-bot 99cf2b6e5a
Roll pub packages (#149617)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-06-03 22:15:41 +00:00
Aditya Dwivedi 0e7295fd18
Add a simplified SimpleCascadingMenuApp example (#149147)
The current MenuAnchor example in the API Docs is comprehensive and complicated for beginners. I have added a simple bare bone example without shortcuts, enums, etc in examples/api/lib/material/menu_anchor/ as `menu_anchor.3.dart`. The example is contributed by @mafreud

Fixes https://github.com/flutter/flutter/issues/148104
2024-06-03 17:11:36 +00:00
engine-flutter-autoroll 86321ed229
Manual roll Flutter Engine from e19d7cde4686 to fa3065875564 (2 revisions) (#149436)
Manual roll requested by jacksongardner@google.com

e19d7cde46...fa30658755

2024-05-31 skia-flutter-autoroll@skia.org Manual roll Dart SDK from ef405fbe3917 to 2976c1694eed (6 revisions) (flutter/engine#53149)
2024-05-31 skia-flutter-autoroll@skia.org Roll Skia from b1e59e25696a to ce975ddfd9fb (1 revision) (flutter/engine#53147)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-05-31 20:59:53 +00:00
Gray Mackall d89ae48520
Manual pub roll w/ gradle lockfile regeneration (#149342)
Manual recreation of https://github.com/flutter/flutter/pull/148911

Entire PR is just the output of 
```
flutter update-packages --force-upgrade
```
followed by (run from the root of the flutter repo)
```
find . -type d -name 'android' | dart dev/tools/bin/generate_gradle_lockfiles.dart --no-gradle-generation --no-exclusion
```
2024-05-30 23:04:08 +00:00
Kostia Sokolovskyi 488fb09582
Add tests for tween_animation_builder.0.dart API example. (#148902)
This PR contributes to https://github.com/flutter/flutter/issues/130459

### Description
- Adds tests for `examples/api/lib/widgets/tween_animation_builder/tween_animation_builder.0.dart`
2024-05-30 20:17:04 +00:00
engine-flutter-autoroll 697d99fae8
Manual roll Flutter Engine from 60968ee3bde7 to 8d5d14a1db95 (1 revision) (#149263)
Manual roll requested by jacksongardner@google.com

60968ee3bd...8d5d14a1db

2024-05-29 skia-flutter-autoroll@skia.org Manual roll Dart SDK from 641d61332238 to ef405fbe3917 (12 revisions) (flutter/engine#53089)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
2024-05-30 00:53:23 +00:00
Valentin Vignal bc097c619a
Add test for inherited_theme.0.dart (#149120)
Contributes to https://github.com/flutter/flutter/issues/130459

It adds a test for
- `examples/api/lib/widgets/inherited_theme/inherited_theme.0_test.dart`
2024-05-29 20:05:25 +00:00
Valentin Vignal 2e275032d5
Add test for radio.toggleable.0.dart (#149153)
Contributes to https://github.com/flutter/flutter/issues/130459

It adds a test for
- `examples/api/lib/material/radio/radio.toggleable.0.dart`
2024-05-29 18:30:57 +00:00
Kostia Sokolovskyi 60d32e4534
Add tests for animated_switcher.0.dart API example. (#149180)
This PR contributes to https://github.com/flutter/flutter/issues/130459

### Description
- Adds tests for `examples/api/lib/widgets/animated_switcher/animated_switcher.0.dart`
2024-05-29 12:10:34 +00:00
Valentin Vignal 1efca65408
Add test for future_builder.0.dart (#148453)
Contributes to https://github.com/flutter/flutter/issues/130459

It adds a test for
- `examples/api/lib/widgets/async/future_builder.0.dart`
2024-05-27 07:12:56 +00:00
Kostia Sokolovskyi 7be97ab781
Add tests for editable_text.on_changed.0.dart API example. (#148874)
This PR contributes to https://github.com/flutter/flutter/issues/130459

### Description
- Adds tests for `examples/api/lib/widgets/editable_text/editable_text.on_changed.0.dart`
2024-05-24 19:21:12 +00:00
Kostia Sokolovskyi 6a20a5b19c
Add test for text_editing_controller.0.dart API example. (#148872)
This PR contributes to https://github.com/flutter/flutter/issues/130459

### Description
- Adds test for `examples/api/lib/widgets/editable_text/text_editing_controller.0.dart`
2024-05-24 17:50:00 +00:00
derdilla 7fb7192304
Test remaining transitions api examples (#148302)
Adds tests for `relative_positioned_transition`, `positioned_transition`, `sliver_fade_transition`, `align_transition`, `animated_builder`, `rotation_transition`, `animated_widget`, `slide_transition`, `listenable_builder`, `scale_transition`, `default_text_style_transition`, `decorated_box_transition`, `size_transition` api examples. Makes double type in the `align_transition` example explicit.

A test for `fade_transition` is already in currently open #148178.

Part of #130459.
2024-05-23 18:57:14 +00:00
derdilla aaa4d336f6
Test snack bar examples (#147774)
Adds tests to the last two Snack Bar examples as part of #130459. Makes the [last example](https://api.flutter.dev/flutter/material/SnackBar-class.html#material.SnackBar.3) more usable through the use of standard widgets and visual hierarchy. Constraints on options that are not required by the SnackBar contract have been removed (Overflow threshold works on fixed SnackBars).
2024-05-23 18:54:11 +00:00
derdilla 1c1516c35e
Add tests for material banner example (#147733)
Part of https://github.com/flutter/flutter/issues/130459.
2024-05-23 18:48:09 +00:00
huycozy e467289fb8
Fix DecoratedSliver sample code to reflect the description (#148621)
### Demo screenshot

![Screenshot 2024-05-19 at 05 42 35](https://github.com/flutter/flutter/assets/104349824/6b4aec1f-32ab-496e-ab20-458c2051055d)

### Related issue

- Fixes https://github.com/flutter/flutter/issues/145935
- Add test for `examples/api/test/widgets/sliver/decorated_sliver.0_test.dart` as a part of https://github.com/flutter/flutter/issues/130459.
2024-05-23 08:52:15 +00:00
derdilla abad37204e
Test raw autocomplete api examples (#148234)
Part of #130459.
2024-05-23 08:52:13 +00:00
Valentin Vignal 84876e58ce
Add test for scaffold.0.dart and scaffold.2.dart (#148166)
Contributes to https://github.com/flutter/flutter/issues/130459

It adds test for
- `examples/api/lib/material/scaffold/scaffold.0.dart`
- `examples/api/lib/material/scaffold/scaffold.2.dart`

It also modifies the `scaffold.1_test.dart` because the only difference with scaffold 0 is the background color, so I figured the test should include it
2024-05-23 08:50:18 +00:00