Commit Graph

870 Commits

Author SHA1 Message Date
Alexandre Ardhuin
d546e1d311
fix for upcoming lint use_named_constants (#74788) 2021-01-27 20:20:44 +01:00
Ian Hickson
37a0189773
Don't leak exceptions thrown by message channels (#74446) 2021-01-27 11:19:04 -08:00
Jia Hao
8a5ace25a5
Improve performance of Widget Tests (#70730) 2021-01-12 17:29:03 -08:00
Ian Hickson
544a41eb55
Remove an obsolete comment from pubspec.yaml (#73505) 2021-01-07 15:59:04 -08:00
creativecreatorormaybenot
508c4b4d29
Correct flutter_test flutter_test_configuration.dart documentation (#70862) 2020-11-25 13:38:05 -08:00
Michael Goderbauer
7a3a29e71f
Fixes Intrinsics for RenderParagraph and RenderWrap (#70656) 2020-11-20 17:24:58 -08:00
Greg Spencer
2d836a99b6
Remove some unnecessary casts, now that changes have rolled from the engine (#70491) 2020-11-13 16:28:06 -08:00
Michael Goderbauer
cca1215939
Properly initialize RestorationManager in the TestBinding (#70398) 2020-11-12 13:59:05 -08:00
Greg Spencer
86f9ab511e
Revert usages of the binding's platformDispatcher to use window instead (#70319)
This reverts usages of the binding's platformDispatcher to use window again temporarily, because there isn't a TestPlatformDispatcher yet, and so some tests were failing because they mocked the TestWindow to return certain things (locales) that were returning the real values instead of the test values.

Once I've created a TestPlatformDispatcher to allow fake data to be passed to it, we can go back to using the platformDispatcher in all of these places
2020-11-12 11:17:00 -08:00
Greg Spencer
0937207f5b
Fix Platform channel errors in web tests (#70252) 2020-11-12 10:24:07 -08:00
Greg Spencer
bbc0161669
Remove references to Window, and switch usages to PlatformDispatcher or SingletonFlutterWindow (#69617)
* Remove references to dart:ui.Window, and point usages to PlatformDispatcher or SingletonFlutterWindow, as appropriate

* remove new test platform dispatchers

* Amend documentation
2020-11-09 15:26:29 -08:00
Zachary Anderson
e59ab90ae1
Add Dart SDK constraint to a pubspec (#70030)
This will unblock the roll of the next Dart SDK
2020-11-07 11:42:05 -08:00
Jonah Williams
6fe800abd5
[null-safety] remove enable experiment flags (#69930) 2020-11-05 23:58:11 -08:00
Jonah Williams
0823d625bc
[null-safety] update version constraint (#69900) 2020-11-05 11:39:26 -08:00
Jonah Williams
e8efde6a54
[versions] update more null safe versions (#69892) 2020-11-05 09:09:03 -08:00
Jason Simmons
9470a7e864
Revert "[null-safety] update Dart SDK constraints (#69831)" (#69854)
This reverts commit e375651cc5.
2020-11-04 21:49:59 -08:00
Jonah Williams
e375651cc5
[null-safety] update Dart SDK constraints (#69831) 2020-11-04 16:50:24 -08:00
Jonah Williams
580cacf4bd
[versions] roll versions (#69810) 2020-11-04 15:38:58 -08:00
Greg Spencer
88809aa247
Standardize dartdoc macro names (#69445) 2020-11-02 13:28:05 -08:00
Jacob MacDonald
193fe3e980
Update null safe deps to prepare for the 2.12 sdk version (#69041)
* update pinned null safety deps

* run update-packages

* add http dep to devicelab package

* rerun update-packages
2020-10-26 14:31:13 -07:00
Alexander Brusher
099ae9b417
Re-enables tests previously failing due to new semantics flag. (#66916) 2020-10-22 15:32:03 -07:00
puelo
24d3999783
Generate RawKeyEvents for iOS 13.4+ (#65193)
* Added RawKeyEvent support for iOS

* Removed unused remnant

* added some missing keys

* Removed trailing whitespaces

* commit for build

* Added mapping names

* Made iOS keycodes generatable and collectable

* Fixed naming and formatting issues

* fixed raw_keyboard_test
2020-10-22 13:33:51 -07:00
Michael Goderbauer
42f3709a5a
Sound null safety for framework and flutter_test (#68642) 2020-10-21 10:09:11 -07:00
Greg Spencer
8c03ff8c1d
Mark keys that match a shortcut, but have no action defined as "not handled". (#67359)
- - When I added notification of key events before processing them as text, it made it so that shortcut key bindings like the spacebar would prevent spaces from being inserted into text fields, which is obviously not desirable (and so that change was reverted). At the same time, we do want to make it possible to override key events so that they can do things like intercept a tab key or arrow keys that change the focus.

This PR changes the behavior of the Shortcuts widget so that if it has a shortcut defined, but no action is bound to the intent, then instead of responding that the key is "handled", it responds as if nothing handled it. This allows the engine to continue to process the key as text entry.

This PR includes:

- Modification of the callback type for key handlers to return a KeyEventResult instead of a bool, so that we can return more information (i.e. the extra state of "stop propagation").
- Modification of the ActionDispatcher.invokeAction contract to require that Action.isEnabled return true before calling it. It will now assert if the action isn't enabled when invokeAction is called. This is to allow optimization of the number of calls to isEnabled, since the shortcuts widget now wants to know if the action was enabled before deciding to either handle the key or to return ignored.
- Modification to ShortcutManager.handleKeypress to return KeyEventResult.ignored for keys which don't have an enabled action associated with them.
- Adds an attribute to DoNothingAction that allows it to mark a key as not handled, even though it does have an action associated with it. This will allow disabling of a shortcut for a subtree.
2020-10-19 11:26:50 -07:00
Xavier Chrétien
f26fbb6bdd
Set slider semantics flag for sliders (#68019) 2020-10-19 08:12:03 -07:00
Alexandre Ardhuin
c0176c9ee5
use_is_even_rather_than_modulo (#68301) 2020-10-16 20:20:00 +02:00
Martin Kustermann
6fae89c8b5
Update package:stack_trace dependency to 1.10.0-nullsafety.4 (#68132) 2020-10-16 16:35:20 +02:00
Dan Field
12f54e17f4
reland List queue search optimization (#68214)
* Revert "Revert "Improve performance of collectAllElements (#68065)" (#68207)"

This reverts commit 46ff57d6f1.

* use fewer elements for benchmark
2020-10-15 13:46:50 -07:00
Jonah Williams
46ff57d6f1
Revert "Improve performance of collectAllElements (#68065)" (#68207)
This reverts commit 8ba5732c4c.
2020-10-15 08:04:59 -07:00
Dan Field
8ba5732c4c
Improve performance of collectAllElements (#68065) 2020-10-14 21:32:04 -07:00
Jonah Williams
bdfb07dffd
[flutter_test] export fake from flutter_test (#68032)
Fake has been moved from mockito to test to facilitate NNBD, re-export this from flutter_test
2020-10-13 11:38:00 -07:00
Sam Rawlins
23c7ee9deb
Bump meta to 1.3.0-nullsafety.4 (#67744) 2020-10-12 09:50:30 -07:00
Jonah Williams
4f2fcca6a9
Reland "[null-safety] reland: migrate app side flutter driver to null-safety" (#67570) 2020-10-08 17:42:02 -07:00
Alexandre Ardhuin
4acc790252
enable lint cast_nullable_to_non_nullable (#67629) 2020-10-08 21:05:43 +02:00
Alexandre Ardhuin
0d8d4f77aa
unnecessary null comparison (#67525) 2020-10-08 09:26:30 +02:00
Dan Field
ad49e25a6b
Revert "[null-safety] reland: migrate app side flutter driver to null-safety (#67441)" (#67561)
This reverts commit d411242468.
2020-10-07 13:57:49 -07:00
Jonah Williams
ef6c720d40
[flutter_test] handle breaking change to test main (#67425)
* [flutter_test] handle breaking change to test main . Fixes #67382
2020-10-06 16:52:23 -07:00
Jonah Williams
d411242468
[null-safety] reland: migrate app side flutter driver to null-safety (#67441)
Reland: #67155

Fixes analysis error caused by landing of material migration, and g3 error caused by moving of fuchsia lib.
2020-10-06 16:51:37 -07:00
Jonah Williams
4818537044
Revert "[null-safety] migrate app dependencies of flutter driver (#67155)" (#67433)
This reverts commit e826442ef4.
2020-10-06 10:41:45 -07:00
Jonah Williams
e826442ef4
[null-safety] migrate app dependencies of flutter driver (#67155)
Ensures all of the libraries that the application side code import are migrated to null safety. full null safety migration is blocked by json rpc 2 and a breaking change to vm service client.
2020-10-06 10:30:15 -07:00
Alexandre Ardhuin
f551178408
migrate material to nullsafety (#67166)
* migrate material to nullsafety

* address review comments

* address review comments

* fix build
2020-10-06 11:36:50 +02:00
Michael Goderbauer
8998167d0f
Make FlutterErrorDetails.exception non-nullable as documented (#67364) 2020-10-05 18:07:02 -07:00
Ming Lyu (CareF)
277a72e3fe
move resampler to handlePointerEvent and fix complex_layout_android__scroll_smoothness with PointerEvent (#66745) 2020-10-05 17:17:03 -07:00
Tong Mu
2cdf2f0059
Treat hover events as normal pointer events, and bring them back to Listener (#63834) 2020-10-05 12:12:04 -07:00
Dan Field
2cdec25877
Reland dispose images when done (#67100) (#67177)
* Reland dispose images when done (#67100)

Changes since last time:

- Test for CanvasKit image rendering
  (https://github.com/flutter/flutter/pull/67176)
- Fix CanvasKit dispose impl
  (https://github.com/flutter/engine/pull/21555)
- Update internal google3 customer with a problematic ImageStream
  Listener impl (cl/335091311, cl/335459002)

This reverts commit 473358d93d.
2020-10-05 12:03:27 -07:00
Dan Field
473358d93d
Revert dispose images when done (#67100)
* Revert "docs for image disposal (#67066)"

This reverts commit bcb2ac5a55.

* Revert "Dispose of images after using them (#66688)"

This reverts commit a7954691da.
2020-10-01 16:53:50 -07:00
Michael Goderbauer
cba170fbb2
Migrate the tests of flutter_test to null-safety (#67058) 2020-10-01 16:27:02 -07:00
Kate Lovett
d1178ae73b
Fix local gold output for flutter/flutter (#66139) 2020-10-01 11:17:03 -07:00
Jacob MacDonald
b95c3d7d56
update stack_trace dep (and others) (#67057) 2020-10-01 09:54:07 -07:00
Dan Field
a7954691da
Dispose of images after using them (#66688)
* Dispose of images after using them
Adds ImageInfo.clone, ImageInfo.dispose, and ImageInfo.isCloneOf.
Makes all stateful holders of ui.Image objects properly clone and dispose of them.
Behavior change for ImageStreamCompleter: Removing the last listener after registering at least one listener results in the object being disposed, and new listeners cannot be added, unless a keepAlive handle is created.
Makes all non-stateful holders of ui.Image (i.e. paintImage and RawImage) assert that whoever gave the image to them has not disposed it on them.
2020-10-01 09:48:54 -07:00