15 Commits

Author SHA1 Message Date
Alexandre Ardhuin
d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Ian Hickson
686d8f8a22 Shim package:test to avoid matcher issues (#20602)
* Upgrade everything except matcher.
* Roll matcher (and test)
* Adjust tests that depend on flutter:test directly to depend on a shim
* Require use of package:test shim and remove other references to package:test
2018-08-14 20:33:58 -07:00
Jason Simmons
466d15433f
Use Dart 2 camel case constants (#15360) 2018-03-12 11:06:32 -07:00
Michael Goderbauer
72517f0a0a
Encode scrolling status into tree (#14536) 2018-02-09 18:33:50 -08:00
Alexandre Ardhuin
841d5d7bd5
prefer_const_declarations on local variables (#14358) 2018-02-01 07:51:26 +01:00
Jeff McGlynn
473d75a6e3 PageView ballistics overshoot the page on some devices (#12884)
* PageView ballistics overshoot the page on some devices

On some devices, such as Cupertino “Plus”-sized devices, scrolling left on the first page of a PageView will overshoot the first page and land on the second page.

The issue is that applyContentDimensions incorrectly detects a content size change due to a floating point comparison on certain screen sizes (18257.400000000005 vs 18257.4)

To fix this, perform a nearEqual comparison in applyContentDimensions.

* Apply style changes to nearEqual for code review feedback.
2017-11-14 14:34:43 -08:00
Brenton Simpson
58163e0c39 Rename springConstant to stiffness (#11686)
`stiffness` is the name of a spring's `k` input on [iOS](https://developer.apple.com/documentation/quartzcore/caspringanimation), [Android](https://developer.android.com/topic/libraries/support-library/preview/spring-animation.html), and the [Web](bbc0f831e2/src/index.js (L11-L22)).  To ensure the API is familiar to and easily understood by developers coming from other platforms, Flutter should follow this convention as well.

This is a minimally-breaking change.  Across [all of GitHub](https://github.com/search?l=Dart&q=springConstant&type=Code&utf8=%E2%9C%93), there are only 2 uses of the `springConstant` API (in Mondrian).  Those can be easily changed to use this name.

Closes #11684
2017-08-23 12:58:33 -07:00
Hans Muller
4ca447b61e Refactored the iOS Scrolling Simulation (#9754) 2017-05-03 15:54:17 -07:00
Chris Bracken
46291903e0 Declare locals final where not reassigned (tests) (#8566) 2017-03-03 17:43:22 -08:00
Adam Barth
90574b0478 Remove Scrollable1 (#8225)
All the clients have migrated to Scrollable2.
2017-02-16 16:41:24 -08:00
Adam Barth
2b742289d4 Fix several minor bugs and add many tests (#7506)
* MultiTapGestureRecognizer previously would assert if there was no
   competition.
 * GestureArenaTeam would always select the first recongizer as the
   winner even if a later recognizer actually accepted the pointer
   sequence.
 * debugPrintStack would fail a type check if maxFrames was non-null.
 * FractionalOffset.lerp would throw a null-pointer exception if its
   second argument was null.

Also, add a number of tests for previously untested lines of code.
2017-01-17 11:00:10 -08:00
Ian Hickson
79c8e5c7c7 Add a toString to Simulation (#7364)
Also, make hasOneLineDescription more discerning.
Also, add a test for hasOneLineDescription.
Also, add a test for GravitySimulation, to test the toString.
2017-01-05 16:33:40 -08:00
Alexandre Ardhuin
c8447c91a9 prefer_const_constructor in packages/flutter/test (#7181) 2016-12-09 15:20:27 -08:00
Hans Muller
f167efba49 Tweaked scroll simulation for iOS platform (#6334) 2016-10-14 20:09:19 -07:00
Adam Barth
cbe650a7e6 Move newton into package:flutter (#3585)
Rather that importing `package:newton/newton.dart` you can
`import package:flutter/physics.dart`.

Fixes #2441
2016-04-27 13:09:54 -07:00