Unverified Commit 2e9e1772 authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Fix for VelocityTracker deprecation (#75649)

parent a74a26c6
...@@ -11,6 +11,33 @@ ...@@ -11,6 +11,33 @@
version: 1 version: 1
transforms: transforms:
# Changes made in https://github.com/flutter/flutter/pull/66043
- title: "Use withKind"
date: 2020-09-17
element:
uris: [ 'gestures.dart' ]
constructor: ''
inClass: 'VelocityTracker'
oneOf:
- if: "pointerDeviceKind == ''"
changes:
- kind: 'rename'
newName: 'withKind'
- kind: 'addParameter'
index: 0
name: 'kind'
style: required_positional
argumentValue:
expression: 'PointerDeviceKind.touch'
- if: "pointerDeviceKind != ''"
changes:
- kind: 'rename'
newName: 'withKind'
variables:
pointerDeviceKind:
kind: 'fragment'
value: 'arguments[0]'
# Changes made in https://github.com/flutter/flutter/pull/72043 # Changes made in https://github.com/flutter/flutter/pull/72043
- title: "Migrate to 'maxLengthEnforcement'" - title: "Migrate to 'maxLengthEnforcement'"
date: 2020-12-13 date: 2020-12-13
......
...@@ -10,4 +10,8 @@ void main() { ...@@ -10,4 +10,8 @@ void main() {
// Change made in https://github.com/flutter/flutter/pull/28602 // Change made in https://github.com/flutter/flutter/pull/28602
final PointerExitEvent exitEvent = PointerExitEvent.fromHoverEvent(PointerHoverEvent()); final PointerExitEvent exitEvent = PointerExitEvent.fromHoverEvent(PointerHoverEvent());
// Changes made in https://github.com/flutter/flutter/pull/66043
VelocityTracker tracker = VelocityTracker();
tracker = VelocityTracker(PointerDeviceKind.mouse);
} }
...@@ -10,4 +10,8 @@ void main() { ...@@ -10,4 +10,8 @@ void main() {
// Change made in https://github.com/flutter/flutter/pull/28602 // Change made in https://github.com/flutter/flutter/pull/28602
final PointerExitEvent exitEvent = PointerExitEvent.fromMouseEvent(PointerHoverEvent()); final PointerExitEvent exitEvent = PointerExitEvent.fromMouseEvent(PointerHoverEvent());
// Changes made in https://github.com/flutter/flutter/pull/66043
VelocityTracker tracker = VelocityTracker.withKind(PointerDeviceKind.touch);
tracker = VelocityTracker.withKind(PointerDeviceKind.mouse);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment