1419 Commits

Author SHA1 Message Date
Kate Lovett
11e1c24069
SliverAppBar - Configurable overscroll stretch with callback feature & FlexibleSpaceBar support (#42250) 2019-11-04 17:10:26 -08:00
Albertus Angga Raharja
b31ca1aaca
Add more structure to errors (continuation of #34684) (#42640)
* Add structured errors in Animations, TabView, ChangeNotifier

* Add structured error on MaterialPageRoute, BoxBorder, DecorationImagePainter, TextSpan

* Add structured errors in Debug

* Fix test errors

* Add structured errors in Scaffold and Stepper

* Add structured errors in part of Rendering Layer

* Fix failing test due to FloatingPoint precision

* Fix failing tests due to precision error and not using final

* Fix failing test due to floating precision error with RegEx instead

* Add structured error in CustomLayout and increase test coverage

* Add structured error & its test in ListBody

* Add structured error in ProxyBox and increase test coverage

* Add structured error message in Viewport

* Fix styles and add more assertions on ErrorHint and DiagnosticProperty

* Add structured error in scheduler/binding and scheduler/ticker

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in AssetBundle and TextInput

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured errors in several widgets #1

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove unused import

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add assertions on hint messages

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix catch spacing

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in several widgets part 2 and increase code coverage

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in flutter_test/widget_tester

* Fix floating precision accuracy by using RegExp

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove todo to add tests in Scaffold showBottomSheet

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix reviews by indenting lines and fixing the assertion orders

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix failing tests due to renaming class

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Try skipping the NetworkBundleTest

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove leading space in material/debug error hint

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>
2019-10-28 11:00:49 -07:00
Tong Mu
1c535de7e0
Soften layer breakage (#42953)
* Replace hard break of Layer.find/All with findAllAnnotations
* Deprecate findAll
2019-10-18 16:40:42 -07:00
Jaumard
1faf6a9a89 create gesture recognizers on attach and dispose on detach to avoid leaks (#42076) 2019-10-17 15:48:20 -07:00
Greg Spencer
a7aa66164e
Re-implement hardware keyboard text selection. (#42879)
This re-implements keyboard text selection so that it will work on platforms other than Android (e.g. macOS, Linux, etc.).

Also, fixed a number of bugs in editing selection via a hardware keyboard (unable to select backwards, incorrect conversion to ASCII when cutting to clipboard, lack of support for CTRL-SHIFT-ARROW word selection, etc.).

Did not address the keyboard locale issues that remain, or add platform specific switches for the bindings. All that will need some more design work before implementing them.

Related Issues
Fixes #31951
2019-10-17 15:11:44 -07:00
Jason Simmons
fb33b7a1b8
Use placeholder dimensions that reflect the final text layout (#42558)
The _computeChildren[Width/Height]With[Min/Max]Intrinsics methods in
RenderParagraph overwrite the text painter's placeholder dimensions
in order to compute potential widths and heights for the paragraph.

The placeholder dimensions should be restored to the values computed by
_layoutChildren before painting the text.
2019-10-15 10:17:52 -07:00
Shi-Hao Hong
0821b759f5
Typo fixes (#42688) 2019-10-15 10:06:50 -07:00
Tong Mu
a71d69ba67
Add opacity control to MouseRegion. Add findAnnotations to Layer. (#37896)
* Adds a new parameter bool opaque to MouseRegion
* The same to RenderMouseRegion and AnnotatedRegionLayer
* Add findAnnotations to Layer
2019-10-10 12:46:12 -07:00
Greg Spencer
89d6c8d90b
Enables setting of semantics focused and focusable attributes within Focus widgets. (#41814)
This adds a Semantics node to the Focus and FocusScope widgets, setting the focused and focusable attributes so that the accessibility subsystem can be told when a control has the input focus.

Includes an engine roll to flutter/engine@77252d2, and the following 8 engine changes:

flutter/engine@77252d2 Greg Spencer Add missing focusable testing info (flutter/engine#13013)
flutter/engine@0e42a29 skia-flutter-.. Roll src/third_party/skia 54548626a977..e27a503a0a21 (1 commits) (flutter/engine#13024)
flutter/engine@6b56ed7 gaaclarke Refactor: FlutterDartProject (flutter/engine#13006)
flutter/engine@393480c skia-flutter-.. Roll src/third_party/skia 77dde599c98a..54548626a977 (1 commits) (flutter/engine#13023)
flutter/engine@080b89d skia-flutter-.. Roll src/third_party/skia 2b1a25a4d324..77dde599c98a (1 commits) (flutter/engine#13021)
flutter/engine@90b0f30 Ben Konyi Roll src/third_party/dart f4a72bfc64..bb04f145b2 (18 commits) (flutter/engine#13020)
flutter/engine@049fb89 skia-flutter-.. Roll fuchsia/sdk/core/linux-amd64 from q_uYX... to cknsi... (flutter/engine#13019)
flutter/engine@6925b2a skia-flutter-.. Roll fuchsia/sdk/core/mac-amd64 from wuAtw... to u0JpE... (flutter/engine#13018)

Related Issues
Addresses #40101

Landing on red in order to fix the build: it's red because of the needed engine roll.
2019-10-09 14:45:42 -07:00
Kate Lovett
1ec44a0c36
Incorporating Link Semantics (#41327) 2019-10-08 18:16:11 -07:00
Kate Lovett
6760628147
Typos & Style clean up (#42006) 2019-10-08 10:39:09 -07:00
Gary Qian
fa7340a328
Return WidgetSpans from getSpanForPosition (#40635) 2019-10-02 19:04:50 -04:00
Alexandre Ardhuin
f0553ba58e
Missing trailing commas (#41473)
* add missing trailing commas

* add more missing trailing commas

* add more and more missing trailing commas
2019-09-30 18:48:23 +02:00
LongCatIsLooong
5f9c262e66
Revert "CupertinoDatePicker & CupertinoTimerPicker dark mode (#39919)" (#41521) 2019-09-27 17:46:15 -07:00
LongCatIsLooong
97b27fafd4
CupertinoDatePicker & CupertinoTimerPicker dark mode (#39919) 2019-09-27 16:03:51 -07:00
Greg Spencer
0509791663
Fix mouse hover to not schedule a frame for every mouse move. (#41014)
This fixes the mouse hover code to not schedule frames with every mouse move.

Before this, it would schedule a post frame callback, and then schedule a frame immediately, even if there was nothing that needed to be updated. Now it will schedule checks for mouse position updates synchronously, unless there's a new annotation, and skip scheduling a new frame in all cases. It has to be async in the case of a new annotation (i.e. a new MouseRegion is added), since when the annotation is added, it hasn't yet painted, and it can't hit test against the new layer until after the paint, so in that case it schedules a post frame callback, but since it's already building a frame when it does that, it doesn't need to schedule a frame.

The code also used to do mouse position checks for all mice if only one mouse changed position. I fixed this part too, so that it will only check position for the mouse that changed.
2019-09-26 13:13:42 -07:00
chunhtai
0ca5e71f28
Implement system fonts system channel listener (#38930)
* Implement system fonts system channel listener
2019-09-24 12:29:03 -07:00
Alexandre Ardhuin
b873162194
fix some bad indentations (#41172) 2019-09-24 21:03:37 +02:00
Alexandre Ardhuin
e9965f5636
add missing trailing commas in packages/flutter (#41076) 2019-09-24 08:05:41 +02:00
chunhtai
0086243be4
Fixed Selectable text align is broken (#40709)
* Fixed Selectable text align is broken
2019-09-19 09:37:00 -07:00
Michael Goderbauer
4373a31971
Reapply "Revert "Propagate textfield character limits to semantics (#40468)" (#40767) 2019-09-18 14:55:37 -07:00
Michael Goderbauer
b4324aed59
Revert "Propagate textfield character limits to semantics (#40468)" (#40714)
This reverts commit 6ad88bd5c01897ee3c5743a99e75350f87388819.
2019-09-17 16:37:11 -07:00
Michael Goderbauer
6ad88bd5c0
Propagate textfield character limits to semantics (#40468) 2019-09-17 14:39:50 -07:00
Alexandre Ardhuin
df4bf453ab
more UI-as-code (#35516) 2019-09-17 16:23:44 +02:00
Simon Lightfoot
bf216110ff Adds relayout option to CustomMultiChildLayout. (#39252) 2019-09-16 09:22:59 -07:00
Peter Lee
423a1914f6 fix typo (#40048) 2019-09-10 08:54:18 -07:00
Michael Goderbauer
e2325600ea
Do not render any frames when just initializing Bindings (#39535) 2019-09-05 17:08:50 -07:00
chunhtai
36a7e3f0ef
fix sliverfixedextent with sliverchildbuilderdelegate does not correct calculate max scroll extent (#39142) 2019-09-03 10:27:37 -07:00
Tom Robinson
f5fc32ff8f Update docs for GrowthDirection and scrollOffset (#39286) 2019-09-03 09:45:44 -07:00
Tong Mu
4fc11db5cc
Add IterableFlagsProperty and use it on proxy box classes (#39354)
* Add FlagsSummary and implement Listener
2019-08-29 10:07:48 -07:00
Tom Robinson
6204eb6445
Change SliverGeometry.maxScrollObstructionExtent for RenderSliverFloatingPersistentHeader to match docs (#39263)
RenderSliverFloatingPersistentHeader does not pin to the leading edge of the viewport so the value of maxScrollObstructionExtent in it's SliverGeometry should be 0 per the docs at https://api.flutter.dev/flutter/rendering/SliverGeometry/maxScrollObstructionExtent.html.
2019-08-26 15:42:10 -07:00
Greg Spencer
365f577c70
Normalize assert checking of clipBehavior (#38568)
I noticed that we were pretty inconsistent with the way that we checked the value of clipBehavior in the framework, so I normalized the usages and updated docs where necessary.

This is a breaking change if you used to pass null explicitly to FlatButton, OutlineButton or RaisedButton constructors, expecting to get Clip.none. It will now assert if you do that. Existing implementations that pass null implicitly by not specifying clipBehavior won't need to change their call sites. It always implicitly defaulted to Clip.none before, and it will continue to do that, it's only places where it was explicitly set to null in order to get the implicit default that it will fail.
2019-08-23 14:08:04 -07:00
LongCatIsLooong
9aea03f4af
Implement PageView using SliverLayoutBuilder, Deprecate RenderSliverFillViewport (#37024) 2019-08-21 15:02:24 -07:00
Ian Hickson
bfd27f6bd7
Audit use of defaultTargetPlatform (#36871) 2019-08-20 13:27:13 -07:00
chunhtai
878fe20a85
fix widgetspan does not work with ellipsis in text widget (#38699) 2019-08-20 09:41:21 -07:00
Gary Qian
fb5b157098
Clamp scrollOffset to prevent textfield bouncing (#38573) 2019-08-19 12:45:52 -07:00
Yegor
34c692659e
Teach render objects to reuse engine layers (#36402)
Teach Layer and its implementations, RenderObject and its implementations, and PaintingContext to reuse engine layers. The idea is that a concrete RenderObject creates a Layer and holds on to it as long as it needs it (i.e. when it is composited, and the layer type does not change). In return, each Layer object holds on to an EngineLayer and reports it to the engine via addRetained and oldLayer. This allows the Web engine to reuse DOM elements across frames. Without it, each frame drops all previously rendered HTML and regenerates it from scratch.
2019-08-16 15:27:12 -07:00
brandondiamond
c161ac898c Fix typos / errors in doc comments (#38558) 2019-08-16 11:18:39 -07:00
Tom Robinson
1d03459fdb
Fix getOffsetToReveal for growthDirection reversed and AxisDirection down or right (#38441)
* Take growth direction into account when computing value for getOffsetForReveal in AxisDirection.right and .up conditions.

* Add alignment 1.0 test to left - reverse growth

* Add Reverse List showOnScreen test

* Formatting fix.
2019-08-16 13:38:23 -04:00
Tom Robinson
0b3f2f61a2
Change RenderObject.getTransformTo to include ancestor. (#37652)
getTransformTo now includes ancestor in the transform it returns, except
for if ancestor is the root view, ensuring that the transform remains in
logical pixel space.
2019-08-15 20:52:15 -04:00
chunhtai
7a236aed12
fix debug paint crash when axis direction inverted (#37033) 2019-08-08 14:28:18 -07:00
Tong Mu
55fd5f1561
Fix mouse region crash when using closures (#37342)
This PR fixes an issue where MouseRegion crashes when being passed with closures instead of methods.

It changes how a RenderMouseRegion handles its MouseTrackingAnnotation.

Instead of creating a new annotation every time it becomes active and destroys it when deactivated, it now creates an annotation during the constructor and holds onto it until the end of its lifecycle.
Instead of directly passing the argument callbacks to the annotation, it proxies them using methods.
2019-08-08 13:36:42 -07:00
Tong Mu
e4a909fb09
Fix mouse region double render (#37344)
Fix an issue where MouseRegion will render its children twice.
2019-08-08 13:36:03 -07:00
Michael Goderbauer
4cf1a3504b
Remove bogus code in ContainerParentDataMixin.detach (#37479) 2019-08-07 09:22:51 -07:00
Chris Yang
333c961884
Extract common PlatformView functionality: Gesture and PointerEvent (#37497) 2019-08-06 09:05:29 -07:00
Jonah Williams
2aa1b6d1ba
Dont call Platform.operatingSystem in RenderView diagnostics (#37637) 2019-08-05 22:13:21 -07:00
Ferhat
b43e3103ee
Update diagnostics to support web platform (#37634) 2019-08-05 16:09:30 -07:00
Chris Yang
9553f8daa7
Extract common PlatformView functionality: Painting and Semantics (#36955)
* painting and semantics

* more comments

* fixing ci

* review fixes

* add assert for id

* rename custom layer factory to layer builder

* review updates

* partial review fixes

* some doc updates

* more doc updates

* only expose getter for id in PlatformViewController

* doc updates/removing all the  references

* remove extra

* more doc updates

* some doc updates

* more doc fixes

* review fixes
2019-08-02 10:07:59 -07:00
chunhtai
eddcc6bb25
reland Enable selection by default for password text field and expose api to turn on and off context menu options (#37324) 2019-08-01 14:19:04 -07:00
Tong Mu
5bb8d8fcde
Split Mouse from Listener (#36217)
- Splits on{Enter,Hover,Exit} from Listener to MouseRegion. Deprecated API is kept for compatibility.
- Splits on{Enter,Hover,Exit} from RenderPointerListener to RenderMouseRegion.
2019-08-01 11:06:50 -07:00