5781 Commits

Author SHA1 Message Date
Kate Lovett
9b01d8a578
Expanded Snippet for API Docs (#28681)
* Added code snippet for Expanded class. ref:#21136

* Changed the code samples into snippet application samples.
2019-03-01 15:46:58 -08:00
Tong Mu
2a046aa42e
Add animation curve slowMiddle (#28540)
* Add curve fastInFastOut

* Rename it to slowCenter

* Rename to slowMiddle

* Add continuous test
2019-03-01 14:41:21 -08:00
Mouad Debbar
b94bf87c70
Text selection via mouse (#28290) 2019-03-01 13:57:10 -08:00
ocavue
1df28e8b7a Fix ink highlight effect of RawChip (#28653) 2019-03-01 10:33:58 -08:00
Dan Field
be083da9c6
improve error messages on Text constructors (#28709) 2019-03-01 10:20:08 -08:00
Hans Muller
4f185ecde6
Update TabController.indexIsChanging doc (#28663) 2019-03-01 08:03:01 -08:00
Alexandre Ardhuin
387f885481
Add missing trailing commas (#28673)
* 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
2019-03-01 08:17:55 +01:00
liyuqian
c63dcf3bcd
Make shader warm-up async so it can handle image (#28687)
## 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
2019-02-28 20:07:55 -08:00
liyuqian
98739667ae
Shader warm-up doc fixes (#28679)
See https://github.com/flutter/flutter/pull/28614#discussion_r261422778
and https://github.com/flutter/flutter/pull/28614#pullrequestreview-209359908
2019-02-28 20:06:28 -08:00
Jonah Williams
ec93468a14
Add capability to run build_runner tests for engine (#28684) 2019-02-28 20:06:14 -08:00
Michael Goderbauer
d6c0f3388f
Drive-by fix for TODO (#28669) 2019-02-28 15:51:54 -08:00
Greg Spencer
ccdd50578c
Fix spelling errors. (#28657)
Fix the spelling errors in the dartdocs for the framework.

There are no functionality changes here, just documentation fixes.
2019-02-28 15:37:19 -08:00
liyuqian
f776cc1961
Add convex path and non-AA paint to shader warm-up (#28614)
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
2019-02-28 15:14:35 -08:00
Shivam Bhasin
47c835fb2b Add Sample code for FlatButton #21136 (#27751)
* Update flat_button.dart

* Added smaple code for Flat Button

* Update flat_button.dart

* Revert "Update flat_button.dart"

This reverts commit c8f00dff39e18b267295890bd0c5a86979b58c24.

* Revert "Added smaple code for Flat Button"

This reverts commit adc4234bc7956293a5b56f39701c6967fe3e919a.

* Update flat_button.dart

* Update flat_button.dart

* Update flat_button.dart

* remove white spaces

* remove white spaces

* add two different samples

* Update flat_button.dart
2019-02-28 11:29:32 -08:00
Hans Muller
9f35f6c3a6
Add warnings and an example to the TextEditingController docs (#28604) 2019-02-27 17:24:06 -08:00
Kate Lovett
8539dea1ef
TextField Snippet for API Docs (#28598)
* Added code snippet for TextField class. ref:#21136

* Errant semicolon
2019-02-27 14:59:31 -08:00
Michael Goderbauer
137ec45da1
Call onTapCancel when down pointer gets cancelled (#28546) 2019-02-27 14:58:59 -08:00
Moein Porkamel
90d090e366 Fix typo (#28558) 2019-02-27 09:45:19 -08:00
liyuqian
19a6a6f431
Reland "Shader warm up (#27660)" (#28537)
This reverts commit adc8e159a548121a45ff7a45b4e556aff998d4bd.

This should be safe to land once https://github.com/flutter/flutter/pull/28530 gets merged

Merge on yellow doc test because the doc test is actually green.
2019-02-27 09:33:08 -08:00
liyuqian
dd5559a5b8
Add LICENSE test to presubmit checks (#28369)
## Description

Also update the existing dart files with missing licenses.

Without the fix, we'll emit the following error message
```
License headers cannot be found at the beginning of the following files.

/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/lib/src/animation/tween_sequence.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/material/raw_material_button_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/async_lifecycle_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/sliver_constraints_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/app_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/test_border.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/physical_model_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/inherited_model.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter_tools/lib/src/base/user_messages.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter_tools/test/src/pubspec_schema.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter_tools/test/ios/simulators_test.dart
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```

## Related Issues

Fixes https://github.com/flutter/flutter/issues/28368

## Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (`[x]`). This will ensure a smooth and quick review process.

- [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [x] My PR includes tests for *all* changed/updated/fixed behaviors (See [Test Coverage]).
- [x] All existing and new tests are passing.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] The analyzer (`flutter analyze --flutter-repo`) does not report any problems on my PR.
- [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I am willing to follow-up on review comments in a timely manner.

## Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

- [ ] Yes, this is a breaking change (Please read [Handling breaking changes]).
- [x] No, this is *not* a breaking change.

<!-- Links -->
[issue database]: https://github.com/flutter/flutter/issues
[Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Test Coverage]: https://github.com/flutter/flutter/wiki/Test-coverage-for-package%3Aflutter
[Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[Handling breaking changes]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
2019-02-26 17:38:21 -08:00
Sander Kersten
d27f53904b Add lerping between Gradients with arbitrary number of colors and stops (#27435) 2019-02-26 15:16:59 -08:00
Anthony
70c8b63e15
[Material] Unit test for skipping Slider tick mark due to overdensity (#28013)
Added a unit test to check that the tick marks are skipped over when the divisions are set to a number that makes them less than 6dp away from each other.
2019-02-26 17:39:48 -05:00
xster
b09e64e142
Support iOS devices reporting pressure data of 0 (#28478) 2019-02-26 14:16:25 -08:00
Michael Goderbauer
1e5992a3c5
Fuschia -> Fuchsia (#28482) 2019-02-25 22:19:47 -08:00
lsaudon
6cc6e7e1f7 Add shapeBorder option on App Bar (#21834) 2019-02-25 16:03:32 -08:00
xster
ec00e974d0
Add long-press-move support for text fields 2 (#28242) 2019-02-25 14:34:54 -08:00
jslavitz
47724f97fa
Breaks the moveBy call from drag and dragFrom into two separate calls and changes the default behavior of DragStartBehavior to DragStartBehavior.start (#26438)
* Breaking change which sets the default DragStartBehavior to DragStartBehavior.start and changes WidgetTester.drag and WidgetTester.dragFrom by breaking the moveBy function call into multiple pieces.
2019-02-25 14:15:31 -08:00
stuartmorgan
62e55a45d4
Convert PointerEvent's toString to Diagnosticable (#27904)
Rather than building a description string by hand, use Diagnosticable
properties. Simplifies output, since many fields have uninteresting
default values in many cases, and makes it easier to add more loggable
properties in subclasses.

Issue #28014
2019-02-25 11:42:50 -08:00
Hans Muller
751f119c93
Ensure that the DropdownButton menu respects its parents bounds (#28371) 2019-02-25 10:58:17 -08:00
rami-a
fc6079a24f
[Material] Add the ability to theme trailing app bar actions independently from leading (#28214)
* Allow app bar actions to be themed independently if needed

* Update SliverAppBar docs that were out of date

* Clarify fallback behavior in a comment

* Analyzer

* Address PR feedback

* Address PR feedback

* Put back checks on actions icon theme

* Address PR feedback

* Retrigger CI
2019-02-25 13:47:05 -05:00
Brandon Rodriguez
c26a69e9cf [Typo] Update 'use' to 'user' (#28245) 2019-02-25 10:32:23 -08:00
Michael Goderbauer
b7f29f2b32
Add more docs to BackdropFilter (#28017) 2019-02-25 10:27:20 -08:00
Dan Field
ad68ba303b
fix red build for analysis (#28398) 2019-02-23 09:39:36 -08:00
Gary Qian
7b5a769b31
Force line height in TextFields with strut (#27612) 2019-02-23 03:35:37 -08:00
liyuqian
adc8e159a5
Revert "Shader warm up (#27660)" (#28376)
This reverts commit a44f174efc218ac1b4b94b9d77dafdb5dfea1432.

Reason: start_up tests become flaky.

See https://github.com/flutter/flutter/issues/28374

TBR: xster

Merge on red to fix the tree
2019-02-22 17:32:37 -08:00
liyuqian
a44f174efc
Shader warm up (#27660)
This patch adds a default shader warm up process which moves shader compilation from the animation time to the startup time. This also provides an extension for `runApp` so developers can customize the warm up process.

This should reduce our worst_frame_rasterizer_time_millis from ~100ms to ~20-30ms for both flutter_gallery and complex_layout benchmarks. Besides, this should also have a significant improvement on 90th and 99th percentile time (50%-100% speedup in some cases, but I haven't tested them thoroughly; I'll let our device lab collect the data afterwards).

The tradeoff the is the startup time (time to first frame). Our `flutter run --profile --trace-startup` seems to be a little noisy and I see about 100ms-200ms increase in that measurement for complex_layout and flutter_gallery. Note that this only happens on the first run after install or data wipe. Later the Skia persistent cache will remove the overhead.

This also adds a cubic_bezier benchmark to test the custom shader warm up process.

This should fix https://github.com/flutter/flutter/issues/813 (either by `defaultShaderWarmUp`, or a `customShaderWarmUp`).
2019-02-22 15:37:02 -08:00
rami-a
b73dd0e81e
[Material] Add ability to set shadow color and selected shadow color for chips and for chip themes (#28163)
* Add ability to set shadow color for chips and for chip themes

* Add selected shadow color as a property as well

* Update phrasing of documentation

* Address PR feedback
2019-02-22 15:50:39 -05:00
ocavue
0f218e427c Make extended FAB's icon optional (#27711) 2019-02-22 12:47:52 -08:00
xster
d749e0b573
Add some more CupertinoPicker doc (#28166) 2019-02-21 22:16:29 -08:00
Stanislav Baranov
3837ec9e96
Reland #27754, now that bsdiff has moved to flutter/packages. (#28291) 2019-02-21 21:59:41 -08:00
xster
98455df459
Add slight clarification to debugDeterministicCursor (#27898) 2019-02-21 16:18:42 -08:00
Hans Muller
617ca62709
[Material] Expand BottomNavigationBar API (reprise) (#28159) 2019-02-21 16:05:36 -08:00
Michael Goderbauer
b96ae03b42
Add backgroundColor argument to TextStyle for convenience (#28172) 2019-02-21 15:58:30 -08:00
Alexandre Ardhuin
5169ab5974
format parameter list (#27261) 2019-02-21 09:27:07 +01:00
jslavitz
2c558fdb21
Adds fix for NAN value and pressure values outside of device reported min and max (#26659)
* Fix for nan pressure values and values outside min and max pressure ranges
2019-02-20 16:15:53 -08:00
jslavitz
a5820011b3
Adds media query check in editable_text (#27955)
* media query check
2019-02-20 16:14:48 -08:00
Matt Sullivan
088b6062fd
Added sample code to AnimatedWidget (#27803)
* Added sample to AnimatedWidget

* Updated AnimatedWidget example to use listenable from parent

* Made progress private and changed widget name
2019-02-20 15:50:34 -08:00
Ali EP
307848953f Fixes crossAxisSpacing overflow in RTL (#27945) 2019-02-20 15:43:01 -08:00
Sander Kersten
d1136e3109 Fix issue where SliverPersistentHeader that is both floating and pinned would scroll down when scrolling past the beginning of the ScrollView (#27433) 2019-02-20 15:42:15 -08:00
Michael Goderbauer
655800260a
Add TextOverflow.visible (#28182) 2019-02-20 15:40:25 -08:00