Commit Graph

18842 Commits

Author SHA1 Message Date
gaaclarke
41c6063356 Sped up Element._sort (#104103) 2022-05-23 11:53:07 -07:00
Tong Mu
baac9a8aef [Keyboard, Windows] Fix that IME events are still dispatched to FocusNode.onKey (#104244) 2022-05-20 22:08:08 -07:00
Chris Sells
4c66e304d1 fixes 103234 to enable debugging Flutter apps on VR headset (#104135) 2022-05-20 21:58:09 -07:00
Pierre-Louis
1e1f4bcfb5 Mention that NavigationBar is a new widget (#104264) 2022-05-21 01:25:17 +02:00
Dan Field
1c852cedaa Do not assert callbacks contains key if disposed (#104292) 2022-05-20 14:51:14 -07:00
Darren Austin
b08b88ce6c Add support for Material 3 medium and large top app bars. (#103962)
* Add support for M3 AppBar 'Medium' and 'Large' types.

* Updates from review feedback.

* Updated from review feedback.
2022-05-20 14:02:25 -07:00
Casey Hillers
da105b2b24 Revert "[framework] inline AbstractNode into RenderObject" (#104257) 2022-05-20 11:43:11 -07:00
Loïc Sharma
52e19ef7ec Refactor vswhere.exe integration (#104133)
`VisualStudio` calls `vswhere.exe` to find Visual Studio installations and determine if they satisfy Flutter's requirements. Previously, `VisualStudio` stored the JSON output from `vswhere.exe` as `Map`s, resulting in duplicated logic to read the JSON output (once to validate values, second to expose values). Also, `VisualStudio` stored two copies of the JSON output (the latest valid installation as well as the latest VS installation).

This change simplifies `VisualStudio` by introducing a new `VswhereDetails`. This type contains the logic to read `vswhere.exe`'s JSON output, and, understand whether an installation is usable by Flutter. In the future, this `VswhereDetails` type will be used to make Flutter doctor resilient to bad UTF-8 output from `vswhere.exe`.

Part of https://github.com/flutter/flutter/issues/102451.
2022-05-20 10:12:25 -07:00
Zachary Anderson
ab7f6e5cfe Pass --verbosity=error to the Dart front-end (#104020) 2022-05-20 09:10:31 -07:00
Bruno Leroux
afdfc56bbb Fix tooltips don't dismiss when using TooltipTriggerMode.tap (#103960) 2022-05-20 04:58:06 -07:00
Bruno Leroux
5c6f65ee99 Add Tooltip onTriggered callback (#104237)
Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com>
2022-05-20 11:23:32 +02:00
Taha Tesser
43c81ff1f7 CupertinoColors: Add diagrams (#103280) 2022-05-20 01:13:09 -07:00
Renzo Olivares
b876f78ea5 Desktop platforms should not collapse selection on copy (#104209)
* Add tests

* fix tests

* updates

Co-authored-by: Renzo Olivares <roliv@google.com>
2022-05-19 20:52:50 -07:00
Tong Mu
23bc3d64eb [Mouse] Remove all pointers at the end of tests (#102694) 2022-05-19 17:48:10 -07:00
Will Lockwood
4c0b0be2da Add ability for ModalRoutes to ignore pointers during transitions and do so on Cupertino routes (#95757) 2022-05-19 15:33:12 -07:00
Emmanuel Garcia
0052566c7e Show custom error message when Kotlin or Gradle bump is required (#102421) 2022-05-19 14:38:13 -07:00
Kate Lovett
e8f8a82a7b Revert "Fix DropdownButton menu clip" (#104203) 2022-05-19 14:33:12 -07:00
Jonah Williams
24bd28f696 [framework] inline AbstractNode into RenderObject (#103832) 2022-05-19 14:28:09 -07:00
Christopher Fujino
586b15cbcb [flutter_tools] Upgrade only from flutter update-packages (#103924) 2022-05-19 13:33:11 -07:00
Greg Spencer
f6c3ee310f Add ShortcutsRegistry (#103456)
This adds a ShortcutsRegistry for ShortcutActivator to Intent mappings that can be modified from its descendants.

This is so that descendants can make shortcuts dynamically available to a larger portion of the app than just their descendants. This is a precursor needed by the new MenuBar, for instance, so that the menu bar itself can be placed where it likes, but the shortcuts it defines can be in effect for most, if not all, of the UI surface in the app. For example, the "Ctrl-Q" quit binding would need to work even if the focused widget wasn't a child of the MenuBar.

This just provides the shortcut to intent mapping, the actions activated by the intent are described in the context where they make sense. For example, defining a "Ctrl-C" shortcut mapped to a "CopyIntent" should perform different functions if it happens while a TextField has focus vs when a drawing has focus, so those different areas would need to define different actions mapped to "CopyIntent". A hypothetical "QuitIntent" would probably be active for the entire app, so would be mapped in an Actions widget near the top of the hierarchy.
2022-05-19 13:17:42 -07:00
Liam Appelbe
d2ba83d421 Use libraryFilters flag to speed up coverage collection (#104122)
* Use libraryFilters flag to speed up coverage collection

* Allow libraryNames to be null

* Unconditionally enable the reportLines flag

* Fix analysis errors
2022-05-19 12:19:52 -07:00
Darren Austin
17e2fce1cf Add const MaterialStatePropertyAll class. (#104127) 2022-05-19 09:35:33 -07:00
David Miguel Lozano
b1f10cebbe Define ColorSwatch.lerp() function (#103701) 2022-05-19 09:28:08 -07:00
Bernardo Ferrari
440e0e2c4e Add StrokeAlign to Border (#102112) 2022-05-19 09:18:10 -07:00
Pierre-Louis
9a35b569b9 Use correct time separator for Indonesian locale (#104070)
* Update material_id.arb

* Update README.md

* Update generated_material_localizations.dart

* Update README.md

* remove trailing whitespace
2022-05-19 11:24:19 +02:00
Taha Tesser
3f5bd7d89e Add Material 3 AppBar example (#102823) 2022-05-19 00:13:09 -07:00
xubaolin
93211a48d7 [Scrollbar]Skip the ScrollPosition check if the bar was unmounted (#103948) 2022-05-18 20:12:10 -07:00
Gary Qian
350a7618eb Remove extraneous org.jetbrains.kotlin:kotlin-stdlib-jdk7 gradle dep (#104028) 2022-05-18 17:52:13 -07:00
Dan Field
d50b5a0749 Stop recommending "shrinkWrap" (#104008) 2022-05-18 17:47:15 -07:00
Bruno Leroux
4b67827169 Add Tooltip default vertical padding (#103395) 2022-05-18 17:42:15 -07:00
Justin McCandless
384800b5e7 Fix right clicking a field to focus (#103228) 2022-05-18 17:37:11 -07:00
Justin McCandless
715fcaac72 Can't drag the cursor with the mouse (#103002) 2022-05-18 17:32:12 -07:00
Bruno Leroux
8afaf7b58e Fix documentation for filterQuality fields (#104056) 2022-05-18 14:42:10 -07:00
Justin McCandless
8f7e41a94c Some MacOS control key shortcuts (#103936) 2022-05-18 13:37:12 -07:00
gaaclarke
64a0c19652 switched to a double variant of clamp to avoid boxing (#103559) 2022-05-18 13:26:08 -07:00
Taha Tesser
32157e3fcb AppBar: Fix nested scroll view doesn't update AppBar elevation for Material 3 (#103899) 2022-05-18 13:22:09 -07:00
Casey Hillers
a4a8e73bce Revert "Fix Backbutton is not displayed when there is a endDrawer (#102093)" (#104039)
This reverts commit f8f438730d.
2022-05-18 09:53:28 -07:00
Greg Spencer
08496712b0 Reorder Theme fields and arguments to be consistently alphabetical within sections. (#104011) 2022-05-17 20:57:08 -07:00
Jonah Williams
851c9521c7 [flutter_tools] pass --compact-async to frontend_server (#104026) 2022-05-17 19:52:10 -07:00
Jenn Magder
52ddc9d174 Handle null values during yaml metadata parsing validation (#104022) 2022-05-17 18:32:09 -07:00
Chris Bracken
9d9e272e70 [tool] Add tests for FakeProcess (#104013)
Because this class has some subtle behaviour with regards to control of
exit timing and when and how it streams data to stderr and stdout, it's
worth adding unit tests for this class directly, as well as (in a
followup patch) for FakeProcessManager.

This is additional testing relating to refactoring landed in:
https://github.com/flutter/flutter/pull/103947

Issue: https://github.com/flutter/flutter/issues/102451
2022-05-17 16:54:08 -07:00
Christopher Fujino
0116b2e77d [flutter_tools] fix RangeError in flutter channel command (#103766) 2022-05-17 16:22:12 -07:00
Jonah Williams
2ad7ced916 [flutter_tools] pass --enable-impeller to android (#104014) 2022-05-17 15:52:09 -07:00
Michael Goderbauer
2cbad4b3ae Final chapter: migrate api doc samples to super-parameters (#104007) 2022-05-17 15:35:07 -07:00
Aman Verma
8fbf89b9f2 [flutter_tools] throw error when argResults is null (#103827) 2022-05-17 12:37:08 -07:00
Dan Field
1662a14bc8 More missing clipBehavior respects (#103931) 2022-05-17 11:32:11 -07:00
Lau Ching Jun
a633f3df32 Add ability for PrebuiltWindowsApp to accept a zip archive. (#103918) 2022-05-17 11:27:11 -07:00
Dan Field
d54cdf9e18 Add a mechanism to observe layer tree composition. (#103378) 2022-05-17 11:22:11 -07:00
Chris Bracken
928bb1229b [tool] Consistent FakeProcessManager.run/runSync (#103947)
`FakeProcessManager` is a test-oriented implementation of `ProcessManager`
that simulates launching processes and returning `ProcessResult` objects
whose `exitCode`, `stdout`, `stderr` can be used to write platform-portable,
hermetic tests that don't rely on actually launching processes from
executables on disk. Its `run` and `runSync` methods provide asynchronous and
synchronous variants of this functionality.

Previously, the behaviour of `run` and `runSync` were inconsistent with
regards to the treatment of the `stdoutEncoding` (similarly,
`stderrEncoding`) parameters:

`run`:
* if the encoding was null, `ProcessResult.stdout` was returned as a
  String in UTF-8 encoding. This was incorrect. The behaviour as
  specified in `ProcessResult.stdout` is that in this case, a raw
  `List<int>` should be returned.
* If the encoding was unspecified, `ProcessResult.stdout` was returned as
  a `String` in the `io.systemEncoding` encoding. This was correct.
* If the encoding was non-null, `ProcessResult.stdout` was returned as a
  `String` in the specified encoding. This was correct.

`runSync`:
* if the encoding was null, `ProcessResult.stdout` was returned as a
  `List<int>` in UTF-8 encoding. This was incorrect. The behaviour as
  specified in `ProcessResult.stdout` is that in this case, a raw
  `List<int>` should be returned.
* If the encoding was unspecified, `ProcessResult.stdout` was returned as
  `List<int>` in UTF-8 encoding. This was incorrect. The behaviour as
  specified in `ProcessResult.stdout` is that in this case, a String a
  `String` in the `io.systemEncoding` encoding should be returned.
* if the encoding was non-null, `ProcessResult.stdout` was returned as a
  `String` in unknown (but probably UTF-8) encoding. This was incorrect.
  The behaviour as specified in `ProcessResult.stdout` is that in this
  case, a `String` in the specified encoding should be returned.

`_FakeProcess`, from which we obtain the fake stdout and stderr values now
holds these fields as raw `List<int>` of bytes rather than as `String`s. It
is up to the user to supply values that can be decoded with the encoding
passed to `run`/`runAsync`.

`run` and `runAsync` have been updated to set stdout (likewise, stderr) as
specified in the `ProcessResult` documentation.

This is pre-factoring for #102451, in which the tool throws an exception
when processing the JSON output from stdout of the `vswhere.exe` tool,
whose output was found to include the `U+FFFD` Unicode replacement
character during UTF-8 decoding, which triggers a `toolExit` exception
when decoded using our [Utf8Decoder][decoder] configured with `reportErrors` =
true. Because `FakeProcessManager.runAsync` did not previously invoke
`utf8.decode` on its output (behaviour which differs from the non-fake
implementation), it was impossible to write tests to verify the fix.

Ref: https://api.flutter.dev/flutter/dart-io/ProcessResult/stdout.html

Issue: https://github.com/flutter/flutter/issues/102451

[decoder]: fd312f1ccf/packages/flutter_tools/lib/src/convert.dart (L51-L60)
2022-05-17 11:15:54 -07:00
Greg Spencer
1994027986 Add VoidCallbackAction and VoidCallbackIntent (#103518)
This adds a simple VoidCallbackAction and VoidCallbackIntent that allows configuring an intent that will invoke a void callback when the intent is sent to the action subsystem. This allows binding a shortcut directly to a void callback in a Shortcuts widget.

I also added an instance of VoidCallbackAction to the default actions so that simply binding a shortcut to a VoidCallbackIntent works anywhere in the app, and you don't need to add a VoidCallbackAction at the top of your app to make it work.
2022-05-17 11:11:41 -07:00