- 11 Jan, 2024 1 commit
-
-
Taha Tesser authored
fixes [`ListWheelScrollView` Throws Unexpected Error Inside `AnimatedContainer`](https://github.com/flutter/flutter/issues/140780) fixes [`CupertinoDatePicker` throw exception when parent height is 0](https://github.com/flutter/flutter/issues/55630) ### Code sample <details> <summary>expand to view the 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, home: Scaffold( body: AnimatedContainer( height: 0, duration: Duration.zero, child: ListWheelScrollView( itemExtent: 20.0, children: <Widget>[ for (int i = 0; i < 20; i++) Container(), ], ), ), ), ); } } ``` </details>
-
- 09 Jan, 2024 1 commit
-
-
Michael Goderbauer authored
This reverts commit https://github.com/flutter/flutter/commit/d24c01bd0c41331bd17165e0173b24c5d05d7c0a. The original change was reverted because it caused some apps to get stuck on the splash screen on some phones. An investigation determined that this was due to a rounding error. Example: The device reports a physical size of 1008.0 x 2198.0 with a dpr of 1.912500023841858. Flutter would translate that to a logical size of 527.0588169589221 x 1149.2810314243163 and use that as the input for its layout algorithm. Since the constraints here are tight, the layout algorithm would determine that the resulting logical size of the root render object must be 527.0588169589221 x 1149.2810314243163. Translating this back to physical pixels by applying the dpr resulted in a physical size of 1007.9999999999999 x 2198.0 for the frame. Android now rejected that frame because it didn't match the expected size of 1008.0 x 2198.0 and since no frame had been rendered would never take down the splash screen. Prior to dynamically sized views, this wasn't an issue because we would hard-code the frame size to whatever the requested size was. Changes in this PR over the original PR: * The issue has been fixed now by constraining the calculated physical size to the input physical constraints which makes sure that we always end up with a size that is acceptable to the operating system. * The `ViewConfiguration` was refactored to use the slightly more convenient `BoxConstraints` over the `ViewConstraints` to represent constraints. Both essentially represent the same thing, but `BoxConstraints` are more powerful and we avoid a couple of translations between the two by translating the` ViewConstraints` from the `FlutterView` to `BoxConstraints` directly when the `ViewConfiguration` is created. All changes over the original PR are contained in the second commit of this PR. Fixes b/316813075 Part of https://github.com/flutter/flutter/issues/134501.
-
- 03 Jan, 2024 1 commit
-
-
yim authored
This PR changes the regular cursor to a floating cursor when a long press occurs. This is a new feature. Fixes #89228
-
- 02 Jan, 2024 2 commits
-
-
LongCatIsLooong authored
Fixes https://github.com/flutter/flutter/issues/131435, https://github.com/flutter/flutter/issues/104594, https://github.com/flutter/flutter/issues/43400 Currently the method we use for text span hit testing `TextPainter.getPositionForOffset` always returns the closest `TextPosition`, even when the given offset is far away from the text. The new TextPaintes method tells you the layout bounds `(width = letterspacing / 2 + x_advance + letterspacing / 2, height = font ascent + font descent)` of a character, the PR changes the hit testing implementation such that a TextSpan is only considered hit if the point-down event landed in one of its character's layout bounds. Potential issues: In theory since the text is baseline aligned, we should use the max ascent and max descent of each character to calculate the height of the text span's hit-test region, in case some characters in the span have to fall back to a different font, but that will be slower and it typically doesn't make a huge difference. This is a breaking change.
-
Polina Cherkasova authored
Contributes to https://github.com/flutter/flutter/issues/140622
-
- 28 Dec, 2023 1 commit
-
-
hhh authored
I want to build a widget that adds some extra functionality when the inner text overflow. So the problem occurred, I can't find an elegant way to determine if the text is overflowing. So i expose `didExceedMaxLines` from `RenderParagraph`, I think it can make sense. Have there some advice?
-
- 20 Dec, 2023 3 commits
-
-
Michael Goderbauer authored
These were not ignoring anything (anymore).
-
auto-submit[bot] authored
Reverts flutter/flutter#139717 Initiated by: LongCatIsLooong This change reverts the following previous change: Original Description: Fixes https://github.com/flutter/flutter/issues/131435, #104594, #43400 Needs https://github.com/flutter/engine/pull/48774 (to fix the web test failure). Currently the method we use for text span hit testing `TextPainter.getPositionForOffset` always returns the closest `TextPosition`, even when the given offset is far away from the text. The new TextPaintes method tells you the layout bounds (`width = letterspacing / 2 + x_advance + letterspacing / 2`, `height = font ascent + font descent`) of a character, the PR changes the hit testing implementation such that a TextSpan is only considered hit if the point-down event landed in one of it's character's layout bounds. Potential issues: 1. In theory since the text is baseline aligned, we should use the max ascent and max descent of each character to calculate the height of the text span's hit-test region, in case some characters in the span have to fall back to a different font, but that will be slower and it typically doesn't make a huge difference. This is a breaking change. It also introduces a new finder and a new method `WidgetTester.tapOnText`: `await tester.tapOnText('string to match')` for ease of migration.
-
LongCatIsLooong authored
Fixes https://github.com/flutter/flutter/issues/131435, #104594, #43400 Needs https://github.com/flutter/engine/pull/48774 (to fix the web test failure). Currently the method we use for text span hit testing `TextPainter.getPositionForOffset` always returns the closest `TextPosition`, even when the given offset is far away from the text. The new TextPaintes method tells you the layout bounds (`width = letterspacing / 2 + x_advance + letterspacing / 2`, `height = font ascent + font descent`) of a character, the PR changes the hit testing implementation such that a TextSpan is only considered hit if the point-down event landed in one of it's character's layout bounds. Potential issues: 1. In theory since the text is baseline aligned, we should use the max ascent and max descent of each character to calculate the height of the text span's hit-test region, in case some characters in the span have to fall back to a different font, but that will be slower and it typically doesn't make a huge difference. This is a breaking change. It also introduces a new finder and a new method `WidgetTester.tapOnText`: `await tester.tapOnText('string to match')` for ease of migration.
-
- 19 Dec, 2023 1 commit
-
-
Fedor Blagodyr authored
close #106439
-
- 14 Dec, 2023 2 commits
-
-
Lau Ching Jun authored
Reverts flutter/flutter#138648 This caused the app to be stuck in the splash screen on certain phone models. Context: b/316244317
-
hgraceb authored
## Description Similar to #119877, but with more cases that I could find in `packages/flutter`. Although there is already a [proposal](https://github.com/dart-lang/linter/issues/4102), it is uncertain how long it will take to be implemented. ![[image-20200711205959042](https://user-images.githubusercontent.com/72788825/216486897-b56453d2-b309-47ea-885b-b0ec6ed1b648.png)](https://user-images.githubusercontent.com/72788825/216486897-b56453d2-b309-47ea-885b-b0ec6ed1b648.png)
-
- 11 Dec, 2023 3 commits
-
-
Renzo Olivares authored
This change fixes issues with screen order comparison logic when rects are encompassed within each other. This was causing issues when trying to select text that includes inline `WidgetSpan`s inside of a `SelectionArea`. * Adds `boundingBoxes` to `Selectable` for a more precise hit testing region. Fixes #132821 Fixes updating selection edge by word boundary when widget spans are involved. Fixes crash when sending select word selection event to an unselectable element.
-
LongCatIsLooong authored
Extacted from #130101, dropped the `@_debugAssert` stuff from that PR so it's easier to review.
-
Bartek Pacia authored
This PR adds `String? identifier` to `Semantics` and `SemanticsProperties`. The `identifier` will be exposed on Android as `resource-id` and on iOS as `accessibilityIdentifier`. Mainly targeted at #17988 Initial Engine PR with Android support: https://github.com/flutter/engine/pull/47961 iOS Engine PR: https://github.com/flutter/engine/pull/48858 ### Migration This change breaks the SemanticsUpdateBuilder API which is on the Framework<-->Engine border. For more details see [engine PR](https://github.com/flutter/engine/pull/47961). Steps: part 1: [engine] add `SemanticsUpdateBuilderNew` https://github.com/flutter/engine/pull/47961 **part 2: [flutter] use `SemanticsUpdateBuilderNew`** <-- we are here part 3: [engine] update `SemanticsUpdateBuilder` to be the same as `SemanticsUpdateBuilderNew`* part 4: [flutter] use (now updated) `SemanticsUpdateBuilder` again. part 5: [engine] remove `SemanticsBuilderNew`
-
- 29 Nov, 2023 1 commit
-
-
Michael Goderbauer authored
Towards https://github.com/flutter/flutter/issues/134501. This change is based on https://github.com/flutter/engine/pull/48090. It changes the `RenderView` to be dynamically sized based on its content if the `FlutterView` it is configured with allows it (i.e. the `FlutterView` has loose `FlutterView.physicalConstraints`). For that, it uses those `physicalConstraints` as input to the layout algorithm by passing them on to its child (after translating them to logical constraints via the device pixel ratio). The resulting `Size` that the `RenderView` would like to be is then communicated back to the engine by passing it to the `FlutterView.render` call. Tests will fail until https://github.com/flutter/engine/pull/48090 has rolled into the framework.
-
- 28 Nov, 2023 1 commit
-
-
Gabriel Tavares authored
**What has been done?** ---------------------- Added new enumeration in `TableCellVerticalAlignment`, which sets the cell size to the same as the topmost cell. There are no noticeable problems in using it in all cells together, as there are in `TableCellVerticalAlignment.fill` which is made not to be used in all cells together because it has another purpose. **Explanation of the logic** ---------------------- An assignment was made (which already existed in `TableCellVerticalAlignment.top; middle and bottom`) that assigns `rowHeight` the maximum double between the initialized height and the height of its child. ![image](https://github.com/flutter/flutter/assets/69699209/0fc9c168-5638-494b-aa0c-c579d0494c5e) Basically, defining a minimum cell height based on its child, and letting each table row have its own height stipulated from the largest element, creating an `IntrinsicHeight` for TableCell automatically. ![image](https://github.com/flutter/flutter/assets/69699209/488b258a-3d25-4655-a9a0-381680468dec) As the `TableCellVerticalAlignment` logic already provides for the use of the height of the largest cell in the row, it was possible to reuse this logic, and just not make the break statement that exists to fill in the calculation for `intrinsicHeight`. Real example in an Android application after added enumeration ---------------------- ![image](https://github.com/flutter/flutter/assets/69699209/51dce88d-f0f5-4644-942a-11ad218ffca0) Opened issue ---------------------- FIX: #130261
-
- 23 Nov, 2023 1 commit
-
-
chunhtai authored
The code doesn't consider indices of children may not be continuous after rebuild. fixes https://github.com/flutter/flutter/issues/138749
-
- 16 Nov, 2023 1 commit
-
-
Fedor Blagodyr authored
Added animation status check at showOnScreen method to prevent broken animation of expanding SliverAppBar when focusing EditableText close #137901
-
- 10 Nov, 2023 1 commit
-
-
Kostia Sokolovskyi authored
-
- 06 Nov, 2023 2 commits
-
-
Kostia Sokolovskyi authored
-
Kostia Sokolovskyi authored
-
- 02 Nov, 2023 1 commit
-
-
Binni Goel authored
-
- 28 Oct, 2023 1 commit
-
-
Kostia Sokolovskyi authored
-
- 27 Oct, 2023 1 commit
-
-
LongCatIsLooong authored
Fixes https://github.com/flutter/flutter/issues/54665
-
- 25 Oct, 2023 1 commit
-
-
fzyzcjy authored
Close https://github.com/flutter/flutter/issues/129094 I have demonstrated how this PR fixes the problem using tests in #129094. I will further add tests in this PR if the PR looks roughly acceptable :)
-
- 24 Oct, 2023 1 commit
-
-
cui fliter authored
*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.* fix some typos *List which issues are fixed by this PR. You must list at least one issue.* *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
-
- 23 Oct, 2023 2 commits
-
-
Ross Llewallyn authored
Just a documentation typo, I think. #137080
-
LongCatIsLooong authored
`OverlayPortal.overlayChild` contributes semantics to `OverlayPortal` instead of `Overlay` (#134921) Fixes https://github.com/flutter/flutter/issues/134456
-
- 22 Oct, 2023 1 commit
-
-
Todd Volkert authored
Before this change, long-running post-frame callbacks wouldn't show up in the timeline at all. This adds a timeline event for post-frame callbacks, with a debug flag that will add timeline events for each individual callback. #testexempt -- we have no way to test calls to the timeline.
-
- 20 Oct, 2023 1 commit
-
-
LongCatIsLooong authored
Update the `RenderEditable` implementation to match `RenderParagraph`. Fixes https://github.com/flutter/flutter/issues/136596
-
- 18 Oct, 2023 1 commit
-
-
Greg Spencer authored
## Description This converts the `MenuAnchor` class to use `OverlayPortal` instead of directly using the overlay. ## Related Issues - Fixes https://github.com/flutter/flutter/issues/124830 ## Tests - No tests yet (hence it is a draft)
-
- 15 Oct, 2023 1 commit
-
-
Binni Goel authored
-
- 13 Oct, 2023 1 commit
-
-
Todd Volkert authored
Some render box subclasses have a specific layout contract that is tightly coupled with other render box subclasses (e.g. two private classes in a local project file). In these cases, it is also possible that they use a constraints object that is a subclass of `BoxConstraints`. To allow for this, this change makes the `constraints` argument to `RenderBox.computeDryLayout()` a covariant argument. For completeness' sake, this updates the other render objects in the rendering package to also use the covariant keyword for this argument.
-
- 11 Oct, 2023 1 commit
-
-
Maximilian Fischer authored
This PR includes the `widthFactor` and `heightFactor` when computing the intrinsic size of a `RenderPositionedBox`. <details><summary>Code sample</summary> Red should have a height of 100, blue one of 200. ```dart import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( title: 'Intrinsic Bug', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), home: Scaffold( body: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( child: IntrinsicHeight( child: Align( heightFactor: 0.5, child: Container( height: 200, color: Colors.red, ), ), ), ), Expanded( child: Container( height: 200, color: Colors.blue, ), ), ], ), ), ); } } ``` </details> Before: ![grafik](https://github.com/flutter/flutter/assets/45403027/447d8b9b-e7f3-482a-900d-53e436830321) After: ![grafik](https://github.com/flutter/flutter/assets/45403027/6d1a104b-3327-47e2-8b36-798ed0136793) Fix #135822
-
- 10 Oct, 2023 1 commit
-
-
Kostia Sokolovskyi authored
-
- 09 Oct, 2023 1 commit
-
-
Greg Spencer authored
## Description This updates the documentation for `MediaQuery` and `Overlay` to include the following: - That `MediaQueryData.size` is set asynchronously, and doesn't necessarily reflect the size of the current frame. - That the specific `MediaQuery.sizeOf` and related methods are preferred over the more generic `MediaQuery.of`. - That the size of the `Overlay` isn't necessarily the size returned by `MediaQueryData.size` As well as adding some symbol links, and fixing some error in documentation. ## Tests - Documentation only
-
- 06 Oct, 2023 2 commits
-
-
LongCatIsLooong authored
Fixes https://github.com/flutter/flutter/issues/134656 `_skipMarkNeesLayout` was meant to only skip `markNeedsLayout` calls. Re-painting is still needed when a child gets added/removed from the `Overlay`.
-
Polina Cherkasova authored
-
- 29 Sep, 2023 1 commit
-
-
Kostia Sokolovskyi authored
-