112 Commits

Author SHA1 Message Date
Sam Rawlins
da9b11ec24
Remove "unnecessary" imports. (#83959) 2021-06-04 10:54:05 -07:00
Alexandre Ardhuin
cfc08594d9
enable lint use_test_throws_matchers (#83943) 2021-06-03 22:14:03 -07:00
Tong Mu
e3da1bd7aa
Test WidgetTester handling test pointers (#83337)
Adds tests to the following behaviors, which have existed without tests:

- When tapping during live testing, a message is printed with widgets that contain the tap location.
- When tapping during live testing, a mark is displayed on screen on the tap location.
2021-06-02 11:50:09 -07:00
Greg Spencer
07b3e10aa4
Add a ThreePointCubic spline that combines two cubic curves (#80836)
This adds a "three point" cubic curve that combines two cubic curves into one curve, where the control points are all in the same coordinate system. It's called "three point" because it incorporates a middle point that the curve runs through, and that point is in addition to the existing implicit (0,0) and (1,1) points that a Curve already has.

I also added an example of this curve, which is just a more emphasized version of the easeInOutCubic.
2021-04-22 10:47:18 -07:00
Alexandre Ardhuin
5865c14d67
add trailing commas in flutter/test/animation (#80852) 2021-04-21 21:44:03 -07:00
Phil Quitslund
61c30c41b2
fix sort_directives violations (#80817) 2021-04-21 13:49:03 -07:00
xubaolin
aa7ab10822
BorderRadiusTween.lerp supports null begin/end values (#79860) 2021-04-16 17:24:02 -07:00
Michael Goderbauer
994a19ec5f
Clear listeners when AnimationController is disposed (#79998) 2021-04-08 15:59:03 -07:00
xubaolin
f11b47f7e6
update BorderTween nullable (#79919) 2021-04-07 09:02:11 -07:00
Michael Goderbauer
2530f4c5eb
Fix some issues flagged by unawaited_futures lint (#77844) 2021-03-11 15:55:03 -08:00
Michael Goderbauer
807bb29888
enable prefer_function_declarations_over_variables lint (#77398) 2021-03-05 18:29:04 -08:00
Sam Rawlins
31732bc67d
emove "unnecessary" imports in test/animation (#74901) 2021-01-28 18:29:03 -08:00
Alexandre Ardhuin
d546e1d311
fix for upcoming lint use_named_constants (#74788) 2021-01-27 20:20:44 +01:00
Jonah Williams
7c0300a358
[flutter] throw more specific error messages if a lerp'd type does not conform to Tween API (#74684) 2021-01-27 09:20:56 -08:00
houyushan
d12098da8a
Fix a ConstantTween's clerical error and Add some Tween testcases. (#71830) 2020-12-09 14:48:03 -08:00
houyushan
4217ce443b
Fix the duration assertion error for the _animateToInternal method and refine the error description (#71137) 2020-12-08 11:53:03 -08:00
nt4f04uNd
4a32e52460
SpringDescription parameter for the AnimationController fling method (#65057) 2020-10-17 20:32:03 -07:00
Michael Goderbauer
31a2c9d4b2
Migrate missed tests (#68241) 2020-10-15 16:03:26 -07:00
Tong Mu
5e97eed895
Migrate foundation test to nullsafety (#62616)
* Migrate
2020-10-05 00:42:50 -07:00
Chris Bracken
c0ea00ed3f
Prefer moreOrLessEquals over closeTo (#64915)
Flutter's `moreOrLessEquals` has a few advantages over `closeTo` from
the `matcher` package:

   * It emits the epsilon value in the test result on failure.
   * It uses a named parameter for epsilon, which improves readability
     at the call site.
   * It has a reasonable default for epsilon in cases where something
     more specific isn't required.

Using it also has the nice property that it aids in its own discovery
when when people go looking for such functionality in new tests.

This change also includes a couple unrelated whitespace formatting cleanups.
2020-08-30 22:20:16 -07:00
Chris Bracken
c935a44869
Prefer moreOrLessEquals to closeTo (#64914)
moreOrLessEquals is the preferred mechanism for checking that a value is
within some error bound epsilon, with default value for epsilon of
precisionErrorTolerance.

This patch replaces instances of closeTo using precisionErrorTolerance.
2020-08-30 22:19:16 -07:00
Kate Lovett
01ac509620
Skip Audit - Last Leftovers (#60940) 2020-07-09 17:01:01 -07:00
Alexandre Ardhuin
4d7525f05c
Opt out nnbd in packages/flutter (#59186)
* add language version 2.8 in packages/flutter

* enable non-nullable analyzer flag
2020-06-11 14:11:30 +02:00
Darren Austin
012cee2731
Typo fixing sweep through packages/flutter. (#59219) 2020-06-11 05:10:01 -07:00
Tong Mu
fb94d3fb78
Animation sheet recorder (#55527) 2020-05-14 14:32:03 -07:00
Alexandre Ardhuin
7d7ac7c32b
start multiline strings with newline (#50825) 2020-02-20 10:16:28 +01:00
Dan Field
8b2993337a
revert #48985 (#49572) 2020-01-27 14:36:02 -08:00
Anthony
b67d5ec6e9 [a11y] Make sure RenderFractionalTranslation updates its semantics after the translation field is set (#48985) 2020-01-17 15:13:01 -08:00
Alexandre Ardhuin
003541499b use isA<Xxx>() matcher (#48482) 2020-01-16 12:43:03 -08:00
Greg Spencer
8b132015bb
Add CatmullRomCurve and CatmullRomSpline (#47547)
This adds CatmullRomCurve animation curve, and a CatmullRomSpline, which is what it uses to do interpolation.

This allows us to create animation curves which can smoothly interpolate the values given to the curve.

Since I've introduced a 2D spline curve, I also created a Curve2D base class for such parametric curves.
2020-01-08 07:59:54 -08:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -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
Alexandre Ardhuin
b873162194
fix some bad indentations (#41172) 2019-09-24 21:03:37 +02:00
Alexandre Ardhuin
df4bf453ab
more UI-as-code (#35516) 2019-09-17 16:23:44 +02:00
Michael Goderbauer
6d3c5381c7
Fix AnimationStatus for repeat(reverse: true) and animateWith (#37739) 2019-08-20 13:31:10 -07:00
Michael Goderbauer
a9151779aa
Revert "Add equals and hasCode to Tween (#37793)" (#37895)
This reverts commit b39e315e5cb9a9c51ebdf3242a108084378a1d9b.
2019-08-08 18:15:40 -07:00
Michael Goderbauer
b39e315e5c
Add equals and hasCode to Tween (#37793) 2019-08-07 15:07:16 -07:00
Jacob Richman
38f849015c
Add more structure to errors messages. (#34684)
Breaking change to extremely rarely used ParentDataWidget.debugDescribeInvalidAncestorChain api changing the return type of the method from String to DiagnosticsNode.
2019-06-20 10:56:03 -07:00
Jonah Williams
6619ab8fea
Add web safe indirection to Platform.isPlatform getters (2) (#33780) 2019-06-03 13:16:14 -07:00
Jonah Williams
cd1d40a7c9
Revert "Add web safe indirection to Platform.isPlatform getters (#33406)" (#33776)
This reverts commit d92b3b40d2113a216bdfd7c2c69d9d0f4d905a0d.
2019-06-03 11:08:30 -07:00
Jonah Williams
d92b3b40d2
Add web safe indirection to Platform.isPlatform getters (#33406) 2019-06-03 10:55:36 -07:00
Greg Spencer
64d1097e53
Add reverseDuration to AnimationController (#32730)
This adds a reverseDuration parameter to AnimationController so that the animation has a different duration when going in reverse as it does going forward.
2019-05-16 12:55:07 -07:00
Dan Field
fe9512fa72
Re-enable const (#31600)
* Re-enable const
2019-04-29 16:02:42 -07:00
Alexandre Ardhuin
a0d1f93b07
fix block formatting (#29051) 2019-03-09 09:03:11 +01:00
Alexandre Ardhuin
440ce8fde6
Fix indentations of statements in BlockFunctionBody (#28933)
* fix indentof statements in BlockFunctionBody

* fix indentof statements in BlockFunctionBody in tests
2019-03-07 21:09:28 +01: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
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
Todd Volkert
3b47b44348
Re-apply "Ensure all curves return 0 and 1 in .transform(t) when t=0/1" (#28006)
Re-applies #27409 by reverting #27919

The analyzer issue (dart-lang/sdk#35940) has been temporarily
worked around by virtue of #27929
2019-02-15 12:29:09 -05:00
Todd Volkert
4309fe863a
Revert "Ensure all curves return 0 and 1 in .transform(t) when t=0/1 (#27409)" (#27919)
This reverts commit d8cd2ff484c7799db0a7ed01f1a448dba14e6cec.
2019-02-14 02:20:35 -05:00
Marco Scannadinari
d8cd2ff484 Ensure all curves return 0 and 1 in .transform(t) when t=0/1 (#27409) 2019-02-13 15:17:42 -08:00