1. 11 Jul, 2023 1 commit
  2. 06 Jul, 2023 1 commit
  3. 30 Jun, 2023 1 commit
    • Greg Price's avatar
      Fix NetworkImage causing spurious warning in tests (#129537) · 1153371a
      Greg Price authored
      Fixes #129532.
      
      This ensures that when a test properly uses `debugNetworkImageHttpClientProvider` to tell `NetworkImage` to use a fake `HttpClient`, we don't go ahead and try to instantiate `HttpClient` anyway and generate a misleading warning.
      1153371a
  4. 23 Jun, 2023 1 commit
  5. 22 Jun, 2023 1 commit
  6. 21 Jun, 2023 1 commit
  7. 14 Jun, 2023 1 commit
  8. 09 Jun, 2023 1 commit
  9. 07 Jun, 2023 1 commit
    • Andrew Kolos's avatar
      Do not try to load main/default asset image if only higher-res variants exist (#128143) · 759ebef6
      Andrew Kolos authored
      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.
      759ebef6
  10. 30 May, 2023 1 commit
  11. 26 May, 2023 1 commit
  12. 24 May, 2023 1 commit
    • LongCatIsLooong's avatar
      Improve `TextPainter.layout` caching (#118128) · 62e78bf1
      LongCatIsLooong authored
      Improves `TextPainter.layout` caching when only the input constraints change: 
      - removes the double layout calls in `TextPainter._layoutParagraph`: now double layout is only needed when `TextAlign` is not left, and the input `maxWidth == double.infinity`.  
      - skip calls to `ui.Paragraph.layout` when it's guaranteed that there's no soft line breaks before/after the layout call.
      
      This doesn't introduce new APIs but may slightly shift text rendered on screen.
      This reduces the number of `layout` calls but since shaping results are already cached so it only skips the relatively cheap line-breaking process when possible.
      
      528 scuba failures but all of them seem reasonable.
      62e78bf1
  13. 23 May, 2023 1 commit
  14. 15 May, 2023 1 commit
    • Andrew Kolos's avatar
      rename AssetManifest.bin (#126077) · d3e0e03e
      Andrew Kolos authored
      Fixes #124883. Will require a g3fix.
      
      Renames `AssetManifest.bin` to `AssetManifest.smcbin` (madeup extension for "Standard Message Codec binary").
      d3e0e03e
  15. 03 May, 2023 1 commit
    • LongCatIsLooong's avatar
      Add `InlineSpan.visitDirectChildren` (#125656) · f704c689
      LongCatIsLooong authored
      I'd like to find out the `fontSize` of a `PlaceholderSpan`, and currently there doesn't seem to be a way to do `TextStyle` cascading in the framework:
      
       `InlineSpan.visitChildren` traverses the entire `InlineSpan` tree using a preorder traversal, and nodes that don't have "content" will be skipped (https://master-api.flutter.dev/flutter/painting/InlineSpan/visitChildren.html): 
      
      > Walks this [InlineSpan](https://master-api.flutter.dev/flutter/painting/InlineSpan-class.html) and any descendants in pre-order and calls visitor for each span that has content.
      
      which makes it impossible to do `TextStyle` cascading in the framework: 
      - `InlineSpan`s with a non-null `TextStyle` but has no content will be skipped
      - `visitChildren` doesn't directly expose the hierarchy, it only gives information about the flattened tree.
      
      This doesn't look like a breaking change, most internal customers are extending `WidgetSpan` which has a concrete implementation of the new method.
      
      Alternatively I could create a fake `ui.ParagraphBuilder` and record the `ui.TextStyle` at the top of the stack when `addPlaceholder` is called. But `ui.TextStyle` properties are not exposed to the framework.
      f704c689
  16. 25 Apr, 2023 1 commit
    • Srujan Gaddam's avatar
      Relabel JSFunction as JSExportedDartFunction (#125453) · 829a2d07
      Srujan Gaddam authored
      toDart exists on the latter, not the former.
      
      Fixing https://github.com/flutter/flutter/pull/125220.
      
      ## 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.
      829a2d07
  17. 24 Apr, 2023 1 commit
    • Srujan Gaddam's avatar
      Fix JS types in _test_http_request.dart (#125220) · aa5bb7d9
      Srujan Gaddam authored
      Types are being reified in the JS backends, so these need to be
      addressed. Fixes two issues:
      
      - @staticInterop types need to be casted to JS types
      - JS functions need to be cast to JSFunction before conversion
      
      Enables landing of https://dart-review.googlesource.com/c/sdk/+/295105.
      
      ## 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.
      aa5bb7d9
  18. 18 Apr, 2023 1 commit
    • Srujan Gaddam's avatar
      Remove package:js/dart:js_interop conflicts (#124879) · 6edbc195
      Srujan Gaddam authored
      dart:js_interop and package:js will start conflicting, since they both have an `@JS` annotation. Until we're ready to only use dart:js_interop (which will require updating the SDK constraints of every package), we should hide the `@JS` annotation from dart:js_interop. Due to shadowing, this is the behavior today, so there should be no functional change.
      
      Unblocks https://dart-review.googlesource.com/c/sdk/+/294130/8 and prevents confusing shadowing of dart:js_interop annotations like we do today.
      
      - [Mentioned CL that is unblocked] I listed at least one issue that this PR fixes in the description above.
      - [Need test-exemption] I added new tests to check the change I am making, or this PR is [test-exempt].
      - [Need to run] All existing and new tests are passing.
      6edbc195
  19. 15 Apr, 2023 1 commit
  20. 10 Apr, 2023 1 commit
  21. 07 Apr, 2023 1 commit
  22. 28 Mar, 2023 1 commit
  23. 24 Mar, 2023 2 commits
  24. 21 Mar, 2023 1 commit
  25. 16 Mar, 2023 3 commits
  26. 15 Mar, 2023 1 commit
  27. 14 Mar, 2023 1 commit
  28. 13 Mar, 2023 1 commit
    • LongCatIsLooong's avatar
      Fix Caret Height On Empty Lines (#120834) · 1306d7f1
      LongCatIsLooong authored
      * improve caret caching, fix caret for empty text/line, `getLocalRectForCaret` now reports the real rect that will be painted.
      move caret x-coordinate clamping to RenderEditable since TextPainter doesn't know about clipping.
      
      * comments
      
      * review
      1306d7f1
  29. 11 Mar, 2023 1 commit
  30. 10 Mar, 2023 1 commit
    • Casey Hillers's avatar
      Revert PRs relating to single window assumption (#122369) · 1f426123
      Casey Hillers authored
      * Revert "Remove references to BindingBase.window (#122119)"
      
      This reverts commit c7681f00.
      
      * Revert "Remove another reference to BindingBase.window (#122341)"
      
      This reverts commit 6ec44450.
      
      * Revert "Reland (2): Removes single window assumptions from `flutter_test` (#122233)"
      
      This reverts commit eb3d317e.
      
      * Revert "Remove single view assumption from TestViewConfiguration (#122352)"
      
      This reverts commit 927289fb.
      
      * Revert "Updates `flutter/test/cupertino` to no longer use `TestWindow` (#122325)"
      
      This reverts commit 67e17e45.
      
      * Revert "Updates `flutter/test/gestures` to no longer reference `TestWindow` (#122327)"
      
      This reverts commit c2a5111c.
      
      * Revert "Updates `flutter/test/rendering` to no longer use `TestWindow` (#122347)"
      
      This reverts commit 28b65e08.
      
      * Revert "Updates `flutter_localizations/test` to stop using `TestWindow` (#122321)"
      
      This reverts commit 01367d52.
      1f426123
  31. 09 Mar, 2023 2 commits
  32. 06 Mar, 2023 3 commits
  33. 23 Feb, 2023 2 commits
    • Hans Muller's avatar
    • Todd Volkert's avatar
      Add ResizeImage.policy (#121154) · 71c45709
      Todd Volkert authored
      * Add ResizeImage.policy
      
      This adds a new `ResizeImage.policy` property that controls how `ResizeImage`
      will interpret its `width` and `height` properties. The existing behavior is
      preserved via `ResizeImagePolicy.exact` (default), but there is now the option
      to use `ResizeImagePolicy.fit`, which satisfies the use case outlined in
      flutter/flutter#118543.
      
      The API doc assets were added in flutter/assets-for-api-docs#209
      
      Fixes flutter/flutter#118543
      
      * Docuemnt public member
      
      * Remove protected annotation from overrides - was failing tests
      
      * Fixed analysis of code in Dartdoc
      
      * More dartdoc code analysis fixes
      
      * One more fix
      
      * Review comments
      71c45709