12316 Commits

Author SHA1 Message Date
Ian Hickson
34f39a208e
ContextAction.isEnabled needs a context (#127721)
...and lots of things that fall out from that
2023-06-14 22:47:06 +00:00
LouiseHsu
4effd9c46f
Remove temporary default case for PointerSignalKind (#128900)
This PR cleans up some prep that was added as part of
https://github.com/flutter/flutter/pull/120731 which was done to unblock
https://github.com/flutter/engine/pull/39637
Since the work done in that PR was reverted, this should be removed.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.
2023-06-14 14:50:37 -07:00
Polina Cherkasova
d520b64c8c
Respect allowlisted count of leaks. (#128823)
Contributes to https://github.com/dart-lang/leak_tracker/issues/59
2023-06-14 14:34:56 -07:00
Mouad Debbar
95be76ab7e
[web] Migrate framework away from dart:html and package:js (#128580)
Use `package:web` and `dart:js_interop` instead.

Part of https://github.com/flutter/flutter/issues/127030
2023-06-14 17:43:39 +00:00
cruiser-baxter
52c4db8d33
Fixed slider value indicator not disappearing after a bit on desktop platform when slider is clicked not dragged (#128137)
In slider.dart within the _startInteraction method and within the below conditional.

"if (!_active && !hasFocus &&
_state.valueIndicatorController.status == AnimationStatus.completed)"

**Changed to:**

"f (!_active &&
_state.valueIndicatorController.status == AnimationStatus.completed)"
This allows the value indicator to disappear after a bit when clicked instead of dragged on Desktop platform. 

I also added a test in slider_test.dart to detect the bug if it ever returns.

Fixes https://github.com/flutter/flutter/issues/123313
2023-06-14 17:11:08 +00:00
Michael Goderbauer
16e6be8b39
Inline AbstractNode into SemanticsNode and Layer (#128467) 2023-06-14 09:36:41 -07:00
Qun Cheng
a5f8b64ef9
Update unit tests in material library for Material 3 (#128725)
Updates most of the unit tests in the packages/flutter/test/material folder so that they'll pass if ThemeData.useMaterial3 defaults to true.

All of the tests have wired useMaterial3 to false and will need to be updated with a M3 version.

related to #127064
2023-06-13 21:21:13 +00:00
Kate Lovett
a0bfde9bfb
Fix ensureVisible and default focus traversal for reversed scrollables (#128756)
Fixes https://github.com/flutter/flutter/issues/128749

The ScrollPositionAlignmentPolicy does not account for AxisDirection, which meant default focus traversal of reversed scrollables did not work. The policy doesn't know about the axis direction, so this is corrected in the ScrollPosition where all the information is available before calling on the viewport for the new target scroll offset.

This fixes that by flipping the policy (unless explicit) so that focus traversal works.
2023-06-13 16:51:22 +00:00
Qun Cheng
130749e4ba
Update rest of the unit tests in material library for Material 3 (#128747) 2023-06-13 09:01:05 -07:00
Qun Cheng
cea728afa6
Update tests in material library for Material 3 by default (#128300) 2023-06-13 08:58:11 -07:00
Kate Lovett
9e0ad4c63f
Fix paint offset in reverse for 2D (#128724)
Fixes https://github.com/flutter/flutter/issues/128723

The paint offset was incorrectly being computed when one or both axis was in the reverse direction. Instead of using the paint extent, the child's size should be used.
2023-06-12 23:28:15 +00:00
Hans Muller
c5a81d1b35
Update button tests for Material 3 by default (#128628) 2023-06-12 09:11:34 -07:00
nt4f04uNd
ad8c997817
Fix RangeSlider notifies start and end twice when participates in gesture arena (#128674)
Fixes https://github.com/flutter/flutter/issues/128433

This PR applies the same fix as we did for Slider https://github.com/flutter/flutter/pull/82152
2023-06-12 15:20:11 +00:00
Polina Cherkasova
05d1cde0dd
Address leak tracker breaking changes. (#128623) 2023-06-12 11:11:35 -04:00
Taha Tesser
ca5aa2329a
Update ListTile text defaults to use ColorScheme (#128581)
fixes https://github.com/flutter/flutter/issues/128569

<details> 
<summary>code sample</summary> 

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

void main() {
  runApp(const ListTileApp());
}

class ListTileApp extends StatelessWidget {
  const ListTileApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        useMaterial3: true,
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.red).copyWith(
          onSurface: Colors.yellow,
          onSurfaceVariant: Colors.green,
        ),
      ),
      home: const Scaffold(
        body: Center(
          child: ListTile(
            title: Text('title'),
            subtitle: Text('subtitle'),
          ),
        ),
      ),
    );
  }
}

``` 
	
</details>

# Description
M3 ListTile couldn't be customized using `ColorScheme` colors. 

- This PR updates the list tile text defaults to `ColorScheme` text color tokens.
- Improved the `ListTile` template to use the token group.
- Update docs and tests.

```dart
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.red).copyWith(
          onSurface: Colors.yellow,
          onSurfaceVariant: Colors.green,
        ),
```

### Before

![Screenshot 2023-06-09 at 17 47 04](https://github.com/flutter/flutter/assets/48603081/c0130371-3c7c-428c-bb57-504822cf64b5)

### After

![Screenshot 2023-06-09 at 17 46 17](https://github.com/flutter/flutter/assets/48603081/3b4d6f8c-7fdd-4546-a6f0-00dd34cb5a96)
2023-06-12 14:52:06 +00:00
LongCatIsLooong
e1fdb1aa74
migrate Tooltip to use OverlayPortal (#127728)
https://github.com/flutter/flutter/issues/7151 isn't a problem with OverlayPortal so the test is removed.
Also removed some `mounted` checks since they're no longer needed.
2023-06-10 20:54:37 +00:00
ZhulanovAA
65e1cb1988
Remove unnecessary parentheses (#128620)
Fix unnecessary parentheses introduced in #128501

@chunhtai @HansMuller
2023-06-10 18:02:14 +00:00
Andrew Kolos
cfe4fedca2
rename generated asset manifest file back to AssetManifest.bin (from AssetManifest.smcbin) (#128529)
Closes https://github.com/flutter/flutter/issues/128456, which is now linked to in a code comment in this change.
Reopens https://github.com/flutter/flutter/issues/124883.

This effectively reverts https://github.com/flutter/flutter/pull/126077 and is intended to be cherry-picked into stable.
2023-06-09 21:20:50 +00:00
hangyu
af7a8f6bd9
Add Selected semantics to IconButton (#128547)
fixes: #127145

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat

---------

Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
2023-06-09 14:16:50 -07:00
chunhtai
cc6f86e6e1
Clarifies semantics long press and semantics on tap documentation (#128599)
fixes https://github.com/flutter/flutter/issues/35112
2023-06-09 19:49:02 +00:00
Hans Muller
d5a8fa6271
Revert "Update chip.dart to use set of MaterialState" (#128607)
Reverts flutter/flutter#128507

This PR caused some internal failures (Google internal link b/286503764). Will need to investigate before we can re-land these changes.
2023-06-09 18:52:14 +00:00
ZhulanovAA
e84fa2ce47
Add tooltips for SegmentedButton (#128501) 2023-06-09 11:06:21 -07:00
Devin
5047690b53
ExpansionPanel isExpanded callback parameter (Ticket 74114) (#128082)
Fixes https://github.com/flutter/flutter/issues/74114

This PR addresses the issue detailed here: https://github.com/flutter/flutter/issues/74114 . The boolean isExpanded returned by the expansion panel callback now reflects the state of the panel that the user is seeing. If it's expanded on screen then the callback returns true. When you close the panel the callback returns false. When another panel is open and you open a different one, the callback executes twice. It returns isExpanded == false for the panel you are closing and true for the panel that is being opened.
I had to change the code in a couple existing tests because some tests are using the old behavior of the callback. This PR addresses feedback listed in closed PR -> https://github.com/flutter/flutter/pull/127876 . The reasone the original PR is closed is that I was having some struggles with git. A couple of the commits in this PR are just reverts of commits I meant not to happen.
Pre-launch Checklist

    [ X] I read the [Contributor Guide](https://github.com/flutter/flutter/wiki/Tree-hygiene#overview) and followed the process outlined there for submitting PRs.
    [ X] I read the [Tree Hygiene](https://github.com/flutter/flutter/wiki/Tree-hygiene) wiki page, which explains my responsibilities.
    [ X] I read and followed the [Flutter Style Guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo), including [Features we expect every widget to implement](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement).
    [ X] I signed the [CLA](https://cla.developers.google.com/).
    [ X] I listed at least one issue that this PR fixes in the description above.
    I updated/added relevant documentation (doc comments with ///).
    [ X] I added new tests to check the change I am making, or this PR is [test-exempt](https://github.com/flutter/flutter/wiki/Tree-hygiene#tests).
    [ X] All existing and new tests are passing.
2023-06-09 17:47:59 +00:00
hangyu
63f4174638
Paint SelectableFragments before text (#128375)
fixes: #104703
2023-06-09 17:00:14 +00:00
Hans Muller
da127f15ad
Updated material button theme tests for Material3 (#128543) 2023-06-09 06:57:21 -07:00
Pierre-Louis
66cda5917d
Improve defaults generation with logging, stats, and token validation (#128244)
## Description

This improves defaults generation with logging, stats, and token validation. 

This PR includes these changes:
* introduce `TokenLogger`, with a verbose mode
  * prints versions and tokens usage to the console
  * outputs `generated/used_tokens.csv`, a list of all used tokens, for use by Google
* find token files in `data` automatically
* hide tokens `Map`
  * tokens can be obtained using existing resolvers (e.g. `color`, `shape`), or directly through `getToken`.
  * tokens can be checked for existence with `tokenAvailable`
* remove version from template, since the tokens are aggregated and multiple versions are possible (as is the case currently), it does not make sense to attribute a single version
* improve documentation

## Related Issues
 - Fixes https://github.com/flutter/flutter/issues/122602

## Tests
 - Added tests for `TokenLogger`
 - Regenerated tokens, no-op except version removal

## Future work
A future PR should replace or remove the following invalid tokens usages

<img width="578" alt="image" src="https://github.com/flutter/flutter/assets/6655696/b6f9e5a7-523f-4f72-94f9-1b0bf4cc9f00">
2023-06-09 11:28:18 +00:00
Taha Tesser
192b06405b
Replace MaterialButton from test classes (#128466)
fixes https://github.com/flutter/flutter/issues/128465
2023-06-09 08:04:07 +00:00
Taha Tesser
8600eb129c
Fix showBottomSheet doesn't remove scrim when draggable sheet is dismissed (#128455)
fixes https://github.com/flutter/flutter/issues/128367

<details> 
<summary>code sample</summary> 

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

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(useMaterial3: true),
      home: Scaffold(
        floatingActionButton: Builder(
          builder: (BuildContext context) => FloatingActionButton(
            child: const Icon(Icons.add),
            onPressed: () {
              Scaffold.of(context).showBottomSheet<void>(
                (_) {
                  return DraggableScrollableSheet(
                    expand: false,
                    builder: (_, ScrollController scrollController) =>
                        ListView.builder(
                      controller: scrollController,
                      itemCount: 25,
                      itemBuilder: (BuildContext context, int index) {
                        return ListTile(
                          title: Text('Item $index - tap to close'),
                          onTap: () {
                            Navigator.of(context).pop();
                          },
                        );
                      },
                    ),
                  );
                },
              );
            },
          ),
        ),
      ),
    );
  }
}
``` 
	
</details>

### Before

https://github.com/flutter/flutter/assets/48603081/fa87feb9-54f2-4e50-bf71-c81d9e54ff61

### After 

https://github.com/flutter/flutter/assets/48603081/7d192059-7600-4d65-ae84-6321f3598133
2023-06-09 07:06:49 +00:00
Tong Mu
ab3c5bfc7b
Remove single view assumption from MouseTracker, and unify its hit testing code flow (#127060)
This is a refactor to make `MouseTracker` use the same callback for both kinds of device update. Instead of using two different callbacks for the two device updating methods, `MouseTracker` now receives a hit testing callback at construction, which is the same hit testing method as the one used for other gestures.

This PR not only makes the code cleaner, but also removes the single view assumption from `MouseTracker`, whose code no longer refers to `RendererBinding.renderView`. In the future, we only need to modify `hitTest` (which we will have to do to support gestures for multi-view anyway) to make mouse tracker support multi-view.
2023-06-09 01:51:26 +00:00
Leigha Jarett
574a71817e
Adding migration guide for Material 3 colors (#128429)
Fixes: https://github.com/flutter/flutter/issues/127228
2023-06-08 23:00:41 +00:00
Greg Spencer
a280346193
Add AppLifecycleListener, with support for application exit handling (#123274)
## Description

This adds `AppLifecycleListener`, a class for listening to changes in the application lifecycle, and responding to requests to exit the application.

It depends on changes in the Engine that add new lifecycle states: https://github.com/flutter/engine/pull/42418

Here's a diagram for the lifecycle states. I'll add a similar diagram to the documentation for these classes.

![Application Lifecycle Diagram](https://github.com/flutter/flutter/assets/8867023/f6937002-cb93-4ab9-a221-25de2c45cf0e)

## Related Issues
 - https://github.com/flutter/flutter/issues/30735

## Tests
- Added tests for new lifecycle value, as well as for the `AppLifecycleListener` itself.
2023-06-08 22:57:19 +00:00
Tae Hyung Kim
f2351f61d4
Sliver Main Axis Group (#126596)
This widget implements the ability to place slivers one after another in
a single ScrollView in a way that all child slivers are drawn within the
bounds of the group itself (i.e. SliverPersistentHeaders aren't drawn
outside of the scroll extent provided by all of the child slivers). The
design document for SliverMainAxisGroup can be found
[here](https://docs.google.com/document/d/1e2bdLSYV_Dq2h8aHpF8mda67aOmZocPiMyjCcTTZhTg/edit?resourcekey=0-Xj2X2XA3CAFae22Sv3hAiA).

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

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat

---------

Co-authored-by: Kate Lovett <katelovett@google.com>
2023-06-08 15:54:09 -07:00
Leigha Jarett
0b8fe01738
Advise developers to use OverflowBar instead of ButtonBar (#128437)
Fixes https://github.com/flutter/flutter/issues/128430
2023-06-08 22:28:10 +00:00
Jackson Gardner
7c15a26eab
Reland "Migrate benchmarks to package:web" (#128266)
This attempts to reland https://github.com/flutter/flutter/pull/126848

This was reverted because it made some unexpected changes to our perf measurements. After landing https://github.com/flutter/flutter/pull/127900, we have much less noise in our benchmarks, so I'd like to reland this and see if there is still a significant measurement difference.
2023-06-08 22:25:40 +00:00
Mahdi Bagheri
4e9869b925
Navigator.pop before PopupMenuItem onTap call (#127446)
*The order of calling Navigator.pop and PopupMenuItem.onTap has been changed so before calling PopupMenuItem onTap method, PopupMenuBotton onSelect method is going to be called.*

*Solves #127443*

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2023-06-08 22:25:38 +00:00
Bruno Leroux
ceeaf98e64
Fix navigation rail with long labels misplaced highlights (#128324) 2023-06-08 13:32:27 -07:00
Taha Tesser
ddfe8a358c
Update chip.dart to use set of MaterialState (#128507) 2023-06-08 13:27:09 -07:00
Janice Collins
29c858adc7
Update flutter to dartdoc 6.3.0 and hide Icons implementation from doc pages (#128442)
This updates dartdoc to 6.3.0.  Release notes are available, here:

https://github.com/dart-lang/dartdoc/releases/tag/v6.3.0

Most important for Flutter are the reduction in the size of generated HTML files (dart-lang/dartdoc#3384) and a new dartdoc directive to hide constant implementations from indicated classes (dart-lang/dartdoc#3398), which fixes the longstanding issue (dart-lang/dartdoc#2657).

I've also added the api documentation zip to `.gitignore` and the `{@hideConstantImplementations}` dartdoc directive to the motivating example.  A screenshot:

![Screenshot 2023-06-07 at 9 54 58 AM](https://github.com/flutter/flutter/assets/14116827/1ad9c1f0-b224-462f-a8e3-706d9858f0d8)

I assert that this change to icons.dart should be test-exempt as existing tests cover whether or not dartdoc directives are recognized or are leaking into HTML, and the impact of adding the directive was tested in dart-lang/dartdoc#3398.
2023-06-08 20:14:23 +00:00
LongCatIsLooong
37f20c268b
Disable blinking cursor when EditableText.showCursor is false (#127562)
Fixes https://github.com/flutter/flutter/issues/108187
2023-06-08 20:07:23 +00:00
hellohuanlin
9707001c02
[floating_cursor_selection]add more comments on the tricky part (#127227)
Many parts of the floating cursor selection feature is pretty tricky. Some took me a while to figure out. So I added some comments to explain a bit for future readers.

*List which issues are fixed by this PR. You must list at least one issue.*

https://github.com/flutter/flutter/issues/30476

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2023-06-08 20:03:49 +00:00
Michael Goderbauer
83af943351
Move RenderObjectElement.updateChildren to Element (#128458)
This method lived on RenderObjectElement because traditionally, it would be the only one that had to deal with multiple children. The method itself has nothing RenderObjectElement specific, though, and can also be used by any other Element subclass that has multiple children. We are introducing one of those in the near future to handle multiple top-level views.

This is a straight up copy&paste move, no changes have been applied to the code itself.
2023-06-08 19:44:45 +00:00
Michael Goderbauer
1a6174365c
Fix PointerEventConverter doc (#128452)
Follow-up to https://github.com/flutter/flutter/pull/128287.
2023-06-08 19:36:55 +00:00
Zachary Anderson
c8bcff4161
Revert "Redo make inspector weakly referencing the inspected objects." (#128506)
Reverts flutter/flutter#128471

It looks like one of the tests modified by this PR is still failing: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20framework_tests_widgets/11385/overview
2023-06-08 13:28:04 +00:00
Polina Cherkasova
1bd1b5014c
Redo make inspector weakly referencing the inspected objects. (#128471) 2023-06-07 18:16:30 -07:00
Bruno Leroux
f18cb2d064
Fix typos 'wether' -> 'whether' (#128392)
## Description

Fix two typos where 'wether' was used instead of 'whether'.

## Tests

Documentation only.
2023-06-07 20:16:53 +00:00
fzyzcjy
8a5c22e282
Super tiny MediaQuery doc update (#127904)
Just now I see some good news: https://www.reddit.com/r/FlutterDev/comments/13vo5a2/the_most_important_flutter_310_feature_that/ (ignore the title though...). It was a performance problem in the old days, so it was great that the problem disappears. However, it seems that the doc is not updated yet, so everyone reading MediaQuery page will still use the old way. Thus I create this super-tiny PR :)
2023-06-07 17:04:03 +00:00
Jackson Gardner
2830f0734d
Revert "Make inspector weakly referencing the inspected objects." (#128436)
Reverts flutter/flutter#128095

We have a tree closure related to the `widget_inspector_test.dart`. I'd
like to see if reverting this resolves the issue.
2023-06-07 09:38:42 -07:00
Leigha Jarett
6848110ff3
Update menu API docs to help developers migrate to m3 (#128351)
Fixes: https://github.com/flutter/flutter/issues/127215
2023-06-07 13:21:12 +00:00
Andrew Kolos
759ebef689
Do not try to load main/default asset image if only higher-res variants exist (#128143)
Fixes https://github.com/flutter/flutter/issues/127090.

https://github.com/flutter/flutter/pull/122505 did a few things to speed up the first asset load that a flutter app performs. One of those things was to not include the main asset in its own list of variants in the asset manifest. The idea was that we know that the main asset always exists, so including it in its list of variants is a waste of storage space and loading time (even if the cost was tiny).

However, the assumption that the main asset always exists is wrong. From [Declaring resolution-aware image assets](https://docs.flutter.dev/ui/assets-and-images#resolution-aware), which predates https://github.com/flutter/flutter/pull/122505:

> Each entry in the asset section of the pubspec.yaml should correspond to a real file, with the exception of the main asset entry. If the main asset entry doesn’t correspond to a real file, then the asset with the lowest resolution is used as the fallback for devices with device pixel ratios below that resolution. The entry should still be included in the pubspec.yaml manifest, however.

For example, it's valid to declare `assets/image.png` as an asset even if only `assets/3x/image.png` exists on disk.

This fix restores older behavior of including a main asset as a variant of itself in the manifest if it exists.

This fix also includes a non-user-visible behavior change:
* `"dpr"` is no longer a required field in the asset manifest's underlying structure. For the main asset entry, we do not include `"dpr"`. It makes less sense for the tool to decide what the default target dpr for an image should be. This should be left to the framework.
2023-06-07 03:19:15 +00:00
Alex Fischer
19f85935ca
Addressed Ambiguity in transform.scale constructor docs (#128182)
This PR updates the docs for Transform.Scale constructor by clearing up some ambiguity regarding how the scaling factor is affected by the omission of a value given you provide scaleX and scaleY as arguments as opposed to just scale

addresses bug [126822](https://github.com/flutter/flutter/issues/126822)

- [X ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [X ] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [ X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
- [X ] I signed the [CLA].
- [X ] I listed at least one issue that this PR fixes in the description above.
- [ X] I updated/added relevant documentation (doc comments with `///`).
- [ X] I added new tests to check the change I am making, or this PR is [test-exempt].
- [X ] All existing and new tests are passing.
2023-06-07 03:11:48 +00:00