This error can occur in a release app (for example, if the text comes from user input that is not valid UTF-16). In that case, TextSpan will replace the invalid text with a placeholder character.
This PR introduces `AnimationStyle`, it is used to override default animation curves and durations in several widgets.
fixes [Add the ability to customize MaterialApp theme animation duration](https://github.com/flutter/flutter/issues/78372)
fixes [Allow customization of showMenu transition animation curves and duration](https://github.com/flutter/flutter/issues/135638)
Here is an example where popup menu curve and transition duration is overriden:
```dart
popUpAnimationStyle: AnimationStyle(
curve: Easing.emphasizedAccelerate,
duration: Durations.medium4,
),
```
Set `AnimationStyle.noAnimation` to disable animation.
```dart
return MaterialApp(
themeAnimationStyle: AnimationStyle.noAnimation,
```
This was easy to implement. I like the result, I think `borderRadius.zero` -> `borderRadius.circular` makes a nice transition, and many places (like macOS) use an effect similar to this PR, while Google doesn't use anywhere (yet). I'm curious if it is going to break goldens or google testing.
<img width="954" alt="ttt" src="https://user-images.githubusercontent.com/351125/229918871-9f2ab851-6b41-44f5-80b9-c7928a8c0014.png">
What do you think? cc @HansMuller @gspencergoog. Is this something you want, should I ask the community, or do you prefer the current one?
Side effects:
- This makes strokeAlign work with `UnderlineInputBorder` (TODO: fix `drawLine` when borderRadius is zero).
- This is faster than the current implementation (clip is slow on Skia). ð
- We could just call `BoxBorder._paintNonUniformBorder` (if it weren't private). Single LOC implementation.
- Web does this by default:

- Apparently no tests fail and most usages around (via code search) seem to be without a borderRadius.
This version is needed so that dart:js_interop can move to extension
types. Also adds some code to handle some breaking changes:
- Body -> Response. Body was an IDL interface mixin type we exposed in
dart:html. Going forward, users should either use Request or Response.
- Casts to JSAny. These are temporary until we move package:web types to
extension types. Currently, package:web types can't implement JSObject
as JSObject will move to be an extension type itself.
Co-authored-by: Kevin Moore <kevmoo@users.noreply.github.com>
Reverts flutter/flutter#137381
Initiated by: Piinks
This change reverts the following previous change:
Original Description:
This updates the implementation to use the stopwatch from the Clock object and piping it through to the TestWidgetsFlutterBinding so it will be kept in sync with FakeAsync.
Relands #132291
Fixes https://github.com/flutter/flutter/issues/97761
The change was reverted due to flakiness it introduced in tests that use fling gestures.
* https://github.com/flutter/flutter/issues/135728
Skipping the test due to
https://github.com/flutter/flutter/issues/137669. It's not clear which
PR started it, so we can't revert anything, and the fix is not yet clear
either. However, the flakiness is very high and is disruptive to the
Flutter team.
Adopted from https://github.com/flutter/flutter/pull/133750
That PR was abandoned. This finishes it up so we can land it.
Fixes https://github.com/flutter/flutter/issues/133529
Moves the `PanGestureRecognizer` used to drag the content along both axis to the outer vertical `Scrollable` subclass instead of the inner horizontal `Scrollable` subclass.
- This solves the issue of the inner `Scrollable` gestures being disabled while the outer `Scrollable` is scrolling
- Enables the user to stop the scroll movement by dragging the content again
Part of tracker issue:
- https://github.com/flutter/flutter/issues/128251
This migrates the event being sent when the "--analyze-size" is used in a flutter invocation
The only file that had this event being sent from is `packages/flutter_tools/lib/src/base/analyze_size.dart`
ð«¡
This was terribly outdated and has long been superseded by `package:flutter_lints`. Also, as of c033718da0 support for this was removed from the analyzer and this file is now even more useless, if that's even possible.
Fixes https://github.com/flutter/flutter/issues/82948.
### Description
This PR intends to update `DraggableScrollableSheet` docs for Web and Desktop platforms. On these platforms, the vertical dragging gesture does not provide natural behavior similar to other desktop applications.
By adding a note before the sample code so users are aware that the sample code will not work as expected on Desktop and Web. Also, refer to the instructions if they still want to implement it on these platforms.
### Related issue
Fixes https://github.com/flutter/flutter/issues/111372
## Description
This cleans up how synonyms are calculated, and adds a reverse mapping from pseudo keys to the real keys they are synonyms of.
Updates the `layout_goals.json` to include the "Space" key, since that was added in the engine without updating the generation configuration.
Related to tracker issue:
- https://github.com/flutter/flutter/issues/128251
This event was only called from one file (`flutter_command.dart`). With the previous implementation, we actually sent 2 events, one for the result of the `commandPath` and another containing the `maxRss` value from `ProcessInfo`.
I have consolidated this down to just one event and used a function to safely get the `maxRss` value, or return null when if there was an error getting that integer value
Touch events were being ignored by Google Maps because we were always setting
the event source to UNKNOWN. This PR maps our PointerDeviceKind to
Android's InputDevice.SOURCE_* enums.
Manually tested with Google Maps.
https://github.com/flutter/flutter/issues/128925
Fixes issues:
- https://github.com/flutter/flutter/issues/138035
Similar to GA3, we will now record the host running the flutter tool, such as VSCode, stored in the `FLUTTER_HOST` env variable
This changes fixes text selection gestures on the search field when using `SearchAnchor`.
Before this change text selection gestures did not work due to an `IgnorePointer` in the widget tree.
This change:
* Removes the `IgnorePointer` so the underlying `TextField` can receive pointer events.
* Introduces `TextField.onTapAlwaysCalled` and `TextSelectionGestureDetector.onUserTapAlwaysCalled`, so a user provided on tap callback can be called on consecutive taps. This is so that the user provided on tap callback for `SearchAnchor/SearchBar` that was previously only handled by `InkWell` will still work if a tap occurs in the `TextField`s hit box. The `TextField`s default behavior is maintained outside of the context of `SearchAnchor/SearchBar`.
Fixes https://github.com/flutter/flutter/issues/128332 and #134965
Fixes#130687 and #132915
This PR is to add two properties: `viewOnChanged` and `viewOnSubmitted` to `SearchAnchor` and `SearchAnchor.bar` so we can control the search bar on the search view.
Fixes#135402
Add fallback logic for a different format of java version output and handle no patch versions.
Add tests for new logic output to prevent regressions.
Fixes https://github.com/flutter/flutter/issues/137924
Fixes https://github.com/flutter/flutter/issues/136885
The framework defaults to keeping the widget tree alive and ready to render regardless of application lifecycle events such as showing or hiding a view controller.
Add-to-app developers may be surprised by this, and tend to file bugs asking why `dispose` isn't called when the view is dismissed (or why memory usage is higher than expected after dismissing Flutter UI).
Adds documentation to explain the limitation and what to do instead.
/cc @zanderso @chinmaygarde @jonahwilliams @jason-simmons since we were discussing this in triage.