Made the showMenu() position parameter required as it doesn't make sense to show a menu without indicating where it should be shown. Also added a test to verify this.
* Embedding new diarams for API docs: Container, ListView, Align.
* Moving the diagrams to be enclosed within the snippet windows.
* Fixed wording for the alt image text.
Documentation that explains a common use case seen in Github issues where users were surprised by TextFormField growth to accommodate validation messages.
Remove the additional top padding from CupertinoPageScaffold's MediaQuery when the navigation bar is opaque (as the padding was already consumed by the navigation bar).
Related Issue: #29136
The UserAccountsDrawerHeader had a bug with the arrow rotating whenever setState was called on its parent. This change makes sure that we check that the state actually changed before allowing the animation to trigger.
Fixes#25801
This PR limits the framework generated semantic node IDs to be smaller than 2^16, this allows to safely generate semantic node in the engine with IDs >= 2^16 avoiding ID collision (which is done in flutter/engine#8250).
* have tests that log error messages use a FakePlatform that does not support Ansi color, to fix tests started from color terminals
* add the override to the other tests too, in case someone copy & pastes them in the future for a test involving an error message
* Use source list from the compiler to track invalidated files.
* Revert accidental change
* Fix first-time-seen-the-file logic
* Fix/simplify invalidate logic now that we can rely on compiler to let us know what is the cut-off point for invalidation.
* Update devfs mock to accommodate for new fields
* Fix deleted files case
* Analyzer found missing final
Adds a FloatingActionButtonThemeData so that FABs can be themed at the Theme level and independently. The properties that are now on the theme must be defaulted at the build level, in order to respect any contributing theme properties. Because of this, some tests had to be modified to look at properties after they are built. Also, since default behaviors are now tested in the FAB Theme test, some default tests in the FAB test no longer applied and were removed.
The themable properties are:
-backgroundColor
-foregroundColor
-elevation
-disabledElevation
-highlightElevation
-shape
* some space formattings
* always use blocks in if-else if a block is used
* format spaces in for and while
* allow multiline if conditions
* fix missing space
The current documentation for `AnimatedWidgetBaseState.forEachTween` is exhaustive but a little hard to grok. This dartdoc example provides some clarity.
* No shrinking for BackdropFilter's cull rect
This will be a breaking change. Our old behavior may generate confusions
for a sample app like our added golden test: Skia will shrink the cull
rect (and thus the filtered area) to the text. The new behavior will
fill the BackdropFilter to its parent/ancestor clip. This is more
in align with our clip behaviors (no clip by default).
If this breaks your app, wrap the BackdropFilter with a ClipRect.
[wip] The golden images are not uploaded yet. I'll wait for the initial
round of review to approve the golden test before uploading them.
* Statically define the callback
* Add TODO to remind the hacking code removal
* Nit fix
* Update goldens
Adds the `minLines` and `expands` parameters for controlling text height. The original PR was reverted, so this one contains a few extra fixes for the tests that were broken.
31b289f27 Fix indexing error in dart:ui TextStyle.toString (flutter/engine#8143)
fc2e6b61c Typo "fast an inline" to "fast and inline" (flutter/engine#8142)
0f19b2de0 Reland PerformanceOverlayLayer golden test (flutter/engine#8140)
073aadde1 Fix TextStyle decode misalignment (flutter/engine#8141)
d87d29054 Roll src/third_party/skia 406b068942f0..2eecc3ea3d71 (11 commits) (flutter/engine#8138)
5cef4a022 Use final state passed to dart before initialization as the initial lifecycleState. (flutter/engine#8124)
ffef51be6 Roll src/third_party/skia 665bc64a2dc4..406b068942f0 (8 commits) (flutter/engine#8137)
48efd0fb7 Roll src/third_party/skia 762ddd7e4352..665bc64a2dc4 (2 commits) (flutter/engine#8129)
f666adbbd Roll src/third_party/skia 2932a458957d..762ddd7e4352 (3 commits) (flutter/engine#8128)
8b0df6ded Bugfix #29203: NPE in getAccessibilityProvider in old FlutterView. (flutter/engine#8126)
8f7b18345 Roll src/third_party/skia c6d8781c4036..2932a458957d (2 commits) (flutter/engine#8125)
52b67fdd5 Expose decorationThickness to dart:ui (flutter/engine#8008)
* No image shader caching in default shader warm-up
It turns out that no matter how small the image is, too much memory will
be used. Hence remove the image shader caching and let the client
implement itself based on needs.
Fixes https://github.com/flutter/flutter/issues/29172
* Fix
* Updated ListView Sample code with more examples for different constructors and also to match asset diagrams.
* Fixed MIA semicolons.
* Code cleanup.
* Added context for ListView.builder example.
* Analyzer does not like const and static usages.
* Replaced the const declarations with final. The analyzer does not like the use of const here, at all.
* Fixed parameterized declarations.
* Fix MouseTracker annotation leak
Map's remove method is typed `remove(Object key)`, which can cause bugs.
Modified the existing test to check if the annotation has been removed
from MouseTracker.
Adds support for discrete scroll events, such as those sent by a scroll wheel.
Includes the plumbing to convert, dispatch, and handle these events, as well as
Scrollable support for consuming them.
* Updating sample code for container to match forthcoming diagrams in assets-for-api-docs.
* Analyzer unhappy with Colors, fixing.
* Resolving push conflict (hopefully)
* Analyzer fix.
* Corrected color to match brand gallery
* Fixing wrap and indentation.
* Create new TextField attribute to control maxLength behaviour
* Create test case for maxLinesIncrementalHeight
* fix maxLinesIncrementalHeight set method
* fix editable_test.dart
* Just introducing some proposed API additions, renaming to expands
* Pass minLines and expands through to child widgets and validate
* minLines can't be null, and expands can't be true when maxLines is 1
* Implement minLines and maxLines height sizing logic
* Simplify minLines validation logic
* expands parameter proof of concept
* min/max mixup bug fix, and tests work with expands false
* Test expands=true cases, and fix textPainter.height being out of date
* Test all behavior matrix cases
* min/max assertion more strict, can't be equal
* Tests work that were missing expands serialization
* Action sheet tests no longer fail due to rounding error
* TextFieldFocus test no longer mysteriously fails
* TODOs for making expands nullable. Will depend on how Expanded wrapping works
* Expanded growth happens when expanded is true and maxLines is null
* Test Expanded wrapper
* No more overflow when wrapped in Expanded
* Docs improvements
* expands can be null
* Simplify error cases to support existing behavior
* Docs examples and other docs cleanup
* Expansion up to perfectly meet the parent size
* Fix analyze null error
* Fix test after move to nullable expands
* minLines defaults to null
* expands is now exclusively for expanding to parent height and not growth between min and max
* _layout rewritten to handle max height. Need to fix prefix tests and
reenable expands
* Tests for textfield overflowing parent
* layoutLineBox is documented and private
* expands works in new _layout
* _layout return numbers seem to perfectly match original _layout
* inputWidth comment after trying it out and failing tests
* Fix analyze errors
* WIP prefix/suffix do affect height
* Prefix/suffix and icons affect height, tests pass, but I'm still visually verifying identical to original
* Tall prefix test that verifies pixel perfect layout
* Fix overflowing edge case and test it
* Clean up comments, old code, and todos
* Changing _expands causes relayout. Wasnt able to figure out how to test though...
* Clean up code review comments
* Fix misalignment when tall prefix and border, and clean up related test
* Simple code review cleanup
* Bring back inputWidth to _layout method
* Fix rounding errors showing up in mac tests
* Fix flake by reordering tests. Without this, the dreaded intrinsicwidth flake is reproducible 50% of the time on my machine.
* Fix more rounding error mac tests
In anticipation of changing a lot of the focus code, I'm adding some tests for the FocusScope.
As a result, I was able to find and fix a bug where there was an incorrect assert.
I also added some more documentation.
Several of the tests enforce what I think is incorrect behavior related to passing focus off when the widget tree gets rebuilt without focus nodes that were previously there, but I'm not going to change that behavior in this PR.
I also renamed focus_test.dart to focus_scope_test.dart to be more in line with our naming conventions.
When running git update-packages, if the goldens repo is dirty, the
flutter tool currently crashes and logs the failure from git pull.
This adds a check for a dirty git client and emits a friendlier error
message in the case where it's not clean, and avoid the crash by
catching the NonZeroExitCode exception and rethrowing as toolExit
instead.
Fixes: https://github.com/flutter/flutter/issues/28915
When a touch event that is in the bounds of a RenderUiKitView is absorbed by another render object,
the RenderUiKitView's handleEvent is not called for that object. On the platform side, the touch event hits the FlutterTouchInterceptingView which is waiting for a framework decision that never arrived on whether to reject or accept the gesture.
This change fixes the issue by having RenderUiKitView register a global PointerRoute, that is used to reject absorbed touch events.
This change permits
(1) a relative --flutter-shell
(2) relative (source, dill) entries within the test JSON file
and enables portability in the invocation scripts produced by fuchsia's
dart test GN template.
* add trailing commas on list/map/parameters
* add trailing commas on Invocation with nb of arg>1
* add commas for widget containing widgets
* add trailing commas if instantiation contains trailing comma
* revert bad change
## Description
This moves another 15-20ms from the animation jank of one of our important client to the startup latency. Unfortunately, this is probably not captured in our current benchmarks (presumably some other bottlenecks overshadow this shader compilation in the worst_frame benchmark). Considering that drawing images is such a common operation, maybe we should add one in the future to benchmark this.
We need this PR to land soon for our client because this changes the API to return Future.
## Related Issues
https://github.com/flutter/flutter/issues/813
One of our important client's SKP shows that this could improve one of
their janky frame by 20ms. This also improves our
flutter_gallery__transition_perf's worst frame time by ~20ms.
On the other hand, 15ms has been added to the start-up latency. I guess
it's a little faster to compile the shader on the start-up because we're
compiling a lot of shaders there and the CPU cache must be hot.
## Related Issues
https://github.com/flutter/flutter/issues/813