1. 17 Sep, 2020 1 commit
    • Jonah Williams's avatar
      Deprecate VelocityTracker default constructor and added... · b1d17c91
      Jonah Williams authored
      Deprecate VelocityTracker default constructor and added VelocityTracker.withKind constructor (#66043)
      
      We've gotten feedback that the VelocityTracker change was disruptive, though it did not break any of the flutter framework or customer tests. In order to make the change non-breaking, PointerDeviceKind parameter can be made optional.
      
      Nevertheless, this parameter should be provided so that the existing touch handlers can use more accurate gestures on mouse/stylus inputs, so we can encourage this by deprecating the default constructor and pointing users towards the VelocityTracker.withKind constructor that takes a non-optional parameter
      b1d17c91
  2. 08 Sep, 2020 1 commit
    • Jonah Williams's avatar
      [framework] make hit slop based on device pointer kind for drag/pan/scale gestures (#64267) · 29898812
      Jonah Williams authored
      Currently the framework uses fairly large "hit slop" values to disambiguate taps from drags/pans. This makes sense on touch devices where the interaction is not very precise, on mice however it can feel as if the UI is lagging. This is immediately noticeable on our infra dashboard, where it takes almost half of a grid square of drag before the actual drag kicks in.
      
      One potential solution is to always use smaller constants depending on whether the interaction is mouse or touch based. The only reasonable choice is to use the pointer device kind and not target platform - same platform can have different input sources. This requires exposing the pointer device kind in a few new places in several of the gesture detectors, and using the enum to compute the correct hit slop from an expanded set of constants.
      
      This almost works, however there are a few places (notably ListViews) which uses the touch hit slop as a default value in scroll physics. It does not seem like it will be easy to disambiguate a user provided scroll physics constant from the default and/or adjust it somehow - this might require significant changes to scroll physics which I have left out of this PR.
      
      This PR does not adjust:
      
      kTouchSlop used in scroll_physics.dart's minFlingDistance
      kTouchSlop used in PrimaryPointerGestureRecognizer/LongPressGestureRecognizer
      29898812
  3. 28 Jul, 2020 1 commit
  4. 11 Jun, 2020 1 commit
  5. 18 May, 2020 1 commit
  6. 27 Nov, 2019 1 commit
    • Ian Hickson's avatar
      License update (#45373) · 449f4a66
      Ian Hickson authored
      * 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
      449f4a66
  7. 24 Sep, 2019 1 commit
  8. 01 Mar, 2019 1 commit
  9. 29 Jan, 2019 1 commit
  10. 14 Sep, 2018 1 commit
  11. 12 Sep, 2018 1 commit
  12. 13 Jun, 2018 1 commit
    • Chris Bracken's avatar
      Revert elimination of Dart 1 (#18460) · 2ae48845
      Chris Bracken authored
      fuchsia_tester.dart still assumes Dart 1. Previously, it ran tests directly
      from source, flutter_platform.dart automatically runs a kernel compile when
      operating in Dart 2 mode, but this assumes a functional Dart SDK is available
      in the artifacts directly, and fuchsia_tester.dart mocks out the artifacts
      directory with an empty temp dir.
      
      Remaining work is:
      1. Get the frontend server building as a dependency on Fuchsia.
      2. Patch fuchsia_tester.dart to use a valid Dart SDK and frontend server.
      
      This also reverts migration to Dart 2 typedef syntax.
      
      This reverts commit 6c56bb24. (#18362)
      This reverts commit 3daebd05. (#18316)
      2ae48845
  13. 11 Jun, 2018 1 commit
    • Greg Spencer's avatar
      Update typedef syntax to use Function notation and turn on lint for old notation. (#18362) · 6c56bb24
      Greg Spencer authored
      Now that Dart 1 is turned off, reapplying my change to turn on the prefer_generic_function_type_aliases analysis option, and fix all the typedefs to Dart 2 preferred syntax.
      
      Also eliminated the unused analysis_options_repo.yaml file and turned on public_member_api_docs in analysys_options.yaml.
      
      No logic changes, just changing the typedef syntax for all typedefs, and updating analysis options.
      6c56bb24
  14. 05 Jun, 2018 1 commit
  15. 30 May, 2018 2 commits
  16. 17 Nov, 2017 1 commit
    • Greg Spencer's avatar
      Fix spelling errors in all the dartdocs. (#13061) · 0259be90
      Greg Spencer authored
      I got tired of drive-by spelling fixes, so I figured I'd just take care of them all at once.
      
      This only corrects errors in the dartdocs, not regular comments, and I skipped any sample code in the dartdocs. It doesn't touch any identifiers in the dartdocs either. No code changes, just comments.
      0259be90
  17. 25 Oct, 2017 1 commit
  18. 21 Sep, 2017 1 commit
  19. 20 Sep, 2017 1 commit
  20. 10 Aug, 2017 1 commit
  21. 03 Aug, 2017 1 commit
  22. 27 Jul, 2017 1 commit
    • Ian Hickson's avatar
      Increase the touch slop. (#11419) · 87445e59
      Ian Hickson authored
      It was 8.0. It's now arbitrarily 18.0.
      
      Changing this required adjusting some tests. Adjusting the tests
      required debugging the tests. Debugging the tests required some tools
      to help debugging gesture recognizers and gesture arenas, so I added
      some. It also required updating some toString() methods which resulted
      in some changes to the tree diagnostics logic.
      
      Also I cleaned up some docs while I was at it.
      87445e59
  23. 12 Jun, 2017 1 commit
    • Ian Hickson's avatar
      More documentation (#10606) · a9f1cb8c
      Ian Hickson authored
      - How do you handle a tap on text?
      - Why is AnimatedOpacity expensive?
      - Why would you use a gesture arena team?
      ...and other minor fixes
      a9f1cb8c
  24. 05 Jun, 2017 1 commit
  25. 25 Apr, 2017 1 commit
  26. 21 Apr, 2017 1 commit
    • Ian Hickson's avatar
      Reorganise the drag related gesture files. (#9487) · a591628c
      Ian Hickson authored
      Move the Drag*Details classes into drag_details.dart.
      Move the one-gesture drag recognizers into monodrag.dart.
      Move Drag into drag.dart.
      
      Adjust the comments to claim that Drag is used by other things than
      MultiDragGestureRecognizer. (Right now this is a lie but it will
      hopefully be true soon.)
      a591628c
  27. 12 Apr, 2017 1 commit
    • Ian Hickson's avatar
      Move Point to Offset (#9277) · bf017b79
      Ian Hickson authored
      * Manually fix every use of Point.x and Point.y
      
      Some of these were moved to dx/dy, but not all.
      
      * Manually convert uses of the old gradient API
      
      * Remove old reference to Point.
      
      * Mechanical changes
      
      I applied the following at the root of the Flutter repository:
      
      git ls-files -z | xargs -0 sed -i 's/\bPoint[.]origin\b/Offset.zero/g'
      git ls-files -z | xargs -0 sed -i 's/\bPoint[.]lerp\b/Offset.lerp/g'
      git ls-files -z | xargs -0 sed -i 's/\bnew Point\b/new Offset/g'
      git ls-files -z | xargs -0 sed -i 's/\bconst Point\b/const Offset/g'
      git ls-files -z | xargs -0 sed -i 's/\bstatic Point /static Offset /g'
      git ls-files -z | xargs -0 sed -i 's/\bfinal Point /final Offset /g'
      git ls-files -z | xargs -0 sed -i 's/^\( *\)Point /\1Offset /g'
      git ls-files -z | xargs -0 sed -i 's/ui[.]Point\b/ui.Offset/g'
      git ls-files -z | xargs -0 sed -i 's/(Point\b/(Offset/g'
      git ls-files -z | xargs -0 sed -i 's/\([[{,]\) Point\b/\1 Offset/g'
      git ls-files -z | xargs -0 sed -i 's/@required Point\b/@required Offset/g'
      git ls-files -z | xargs -0 sed -i 's/<Point>/<Offset>/g'
      git ls-files -z | xargs -0 sed -i 's/[.]toOffset()//g'
      git ls-files -z | xargs -0 sed -i 's/[.]toPoint()//g'
      git ls-files -z | xargs -0 sed -i 's/\bshow Point, /show /g'
      git ls-files -z | xargs -0 sed -i 's/\bshow Point;/show Offset;/g'
      
      * Mechanical changes - dartdocs
      
      I applied the following at the root of the Flutter repository:
      
      git ls-files -z | xargs -0 sed -i 's/\ba \[Point\]/an [Offset]/g'
      git ls-files -z | xargs -0 sed -i 's/\[Point\]/[Offset]/g'
      
      * Further improvements and a test
      
      * Fix minor errors from rebasing...
      
      * Roll engine
      bf017b79
  28. 04 Mar, 2017 1 commit
  29. 22 Jan, 2017 1 commit
  30. 06 Jan, 2017 1 commit
    • Ian Hickson's avatar
      Changes to the drag gesture detectors and the velocity tracker (#7363) · 11d1d54c
      Ian Hickson authored
      - more dartdocs for the drag typedefs
      
      - more toStrings to aid debugging
      
      - require the position for DragUpdateDetails since we were omitting it
        in some places
      
      - add the primaryVelocity to DragEndDetails so that consumers don't
        have to themselves track the axis in question
      
      - fix the velocity tracker so that it doesn't walk the null data.
        Previously, near time t=0 (which pretty much only matters in tests,
        but it does matter there) we would walk the velocity data and then
        also walk missing data, treating it as Point.zero with t=0.
      
      - simplify some of the velocity tracker; e.g. instead of trying (and
        failing?) to clear the velocity tracker when the pointer stalls,
        just drop the data before a stall during the velocity estimation
        (where we redundantly had another bigger horizon anyway).
      11d1d54c
  31. 19 Nov, 2016 1 commit
  32. 28 Oct, 2016 1 commit
  33. 17 Oct, 2016 1 commit
    • Adam Barth's avatar
      Tap above LongPressDraggable should work (#6348) · 61240fe8
      Adam Barth authored
      Previously, we were nulling out the ArenaEntry in MultiDragPointerState
      too early, which was prevent MultiDragPointerState from rejecting the
      gesture in `dispose` if we hadn't accepted by the time the pointer went
      up. Now we properly reject the gesture, which causes the tap gesture to
      win during `sweep` in the arena.
      
      Also, add a bunch of docs and annotations based on information I learned
      while studying this issue. Finally, rename a private member of tap
      recognizer to a name that would have confused me less in my
      investigation.
      
      Fixes #1186
      61240fe8
  34. 16 Oct, 2016 1 commit
  35. 15 Oct, 2016 1 commit
    • Adam Barth's avatar
      Ensure delayed multidrag timer is stopped (#6340) · 034d2fcd
      Adam Barth authored
      Previously we were relying on the gesture arena to call us back to
      cancel our timer. However, in the case where we've already been
      accepted, asking the gesture arena to reject us doesn't lead to a
      callback and we fail to stop the timer (and hence trigger an assert).
      
      Fixes #6156
      034d2fcd
  36. 07 Jul, 2016 1 commit
  37. 27 Jun, 2016 1 commit
  38. 20 Jun, 2016 1 commit
    • Adam Barth's avatar
      Fix asserts in Draggable dismounting (#4644) · b3780ebc
      Adam Barth authored
      In writing a test for #1927, I found a number of bugs in how Draggable shuts
      down. Previously it would leak its recongizer. Now it disposes its recognizer
      and the recognizer knows how to be disposed cleanly.
      
      Fixes #1927
      b3780ebc
  39. 07 Jun, 2016 1 commit