Unverified Commit a8211369 authored by Tong Mu's avatar Tong Mu Committed by GitHub

Remove pressure customization from some pointer events (#30414)

* Remove pressure from PointerHoverEvent ctor
parent 316d4498
......@@ -315,7 +315,6 @@ class PointerEventConverter {
position: position,
buttons: datum.buttons,
obscured: datum.obscured,
pressure: datum.pressure,
pressureMin: datum.pressureMin,
pressureMax: datum.pressureMax,
distance: datum.distance,
......@@ -337,7 +336,6 @@ class PointerEventConverter {
position: position,
buttons: datum.buttons,
obscured: datum.obscured,
pressure: datum.pressure,
pressureMin: datum.pressureMin,
pressureMax: datum.pressureMax,
distance: datum.distance,
......@@ -364,7 +362,6 @@ class PointerEventConverter {
position: state.lastPosition, // Change position in Hover
buttons: datum.buttons,
obscured: datum.obscured,
pressure: datum.pressure,
pressureMin: datum.pressureMin,
pressureMax: datum.pressureMax,
distance: datum.distance,
......
......@@ -354,7 +354,6 @@ class PointerAddedEvent extends PointerEvent {
int device = 0,
Offset position = Offset.zero,
bool obscured = false,
double pressure = 0.0,
double pressureMin = 1.0,
double pressureMax = 1.0,
double distance = 0.0,
......@@ -369,7 +368,7 @@ class PointerAddedEvent extends PointerEvent {
device: device,
position: position,
obscured: obscured,
pressure: pressure,
pressure: 0.0,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
......@@ -394,7 +393,6 @@ class PointerRemovedEvent extends PointerEvent {
PointerDeviceKind kind = PointerDeviceKind.touch,
int device = 0,
bool obscured = false,
double pressure = 0.0,
double pressureMin = 1.0,
double pressureMax = 1.0,
double distanceMax = 0.0,
......@@ -406,7 +404,7 @@ class PointerRemovedEvent extends PointerEvent {
device: device,
position: null,
obscured: obscured,
pressure: pressure,
pressure: 0.0,
pressureMin: pressureMin,
pressureMax: pressureMax,
distanceMax: distanceMax,
......@@ -437,7 +435,6 @@ class PointerHoverEvent extends PointerEvent {
Offset delta = Offset.zero,
int buttons = 0,
bool obscured = false,
double pressure = 0.0,
double pressureMin = 1.0,
double pressureMax = 1.0,
double distance = 0.0,
......@@ -459,7 +456,7 @@ class PointerHoverEvent extends PointerEvent {
buttons: buttons,
down: false,
obscured: obscured,
pressure: pressure,
pressure: 0.0,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
......@@ -497,7 +494,6 @@ class PointerEnterEvent extends PointerEvent {
Offset delta = Offset.zero,
int buttons = 0,
bool obscured = false,
double pressure = 0.0,
double pressureMin = 1.0,
double pressureMax = 1.0,
double distance = 0.0,
......@@ -519,7 +515,7 @@ class PointerEnterEvent extends PointerEvent {
buttons: buttons,
down: false,
obscured: obscured,
pressure: pressure,
pressure: 0.0,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
......@@ -543,16 +539,14 @@ class PointerEnterEvent extends PointerEvent {
/// Creates an enter event from a [PointerEvent].
///
/// This is used by the [MouseTracker] to synthesize enter events.
PointerEnterEvent.fromMouseEvent(PointerEvent event) : super(
PointerEnterEvent.fromMouseEvent(PointerEvent event) : this(
timeStamp: event?.timeStamp,
kind: event?.kind,
device: event?.device,
position: event?.position,
delta: event?.delta,
buttons: event?.buttons,
down: event?.down,
obscured: event?.obscured,
pressure: event?.pressure,
pressureMin: event?.pressureMin,
pressureMax: event?.pressureMax,
distance: event?.distance,
......@@ -590,7 +584,6 @@ class PointerExitEvent extends PointerEvent {
Offset delta = Offset.zero,
int buttons = 0,
bool obscured = false,
double pressure = 0.0,
double pressureMin = 1.0,
double pressureMax = 1.0,
double distance = 0.0,
......@@ -612,7 +605,7 @@ class PointerExitEvent extends PointerEvent {
buttons: buttons,
down: false,
obscured: obscured,
pressure: pressure,
pressure: 0.0,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
......@@ -636,16 +629,14 @@ class PointerExitEvent extends PointerEvent {
/// Creates an exit event from a [PointerEvent].
///
/// This is used by the [MouseTracker] to synthesize exit events.
PointerExitEvent.fromMouseEvent(PointerEvent event) : super(
PointerExitEvent.fromMouseEvent(PointerEvent event) : this(
timeStamp: event?.timeStamp,
kind: event?.kind,
device: event?.device,
position: event?.position,
delta: event?.delta,
buttons: event?.buttons,
down: event?.down,
obscured: event?.obscured,
pressure: event?.pressure,
pressureMin: event?.pressureMin,
pressureMax: event?.pressureMax,
distance: event?.distance,
......@@ -782,7 +773,6 @@ class PointerUpEvent extends PointerEvent {
Offset position = Offset.zero,
int buttons = 0,
bool obscured = false,
double pressure = 0.0,
double pressureMin = 1.0,
double pressureMax = 1.0,
double distance = 0.0,
......@@ -803,7 +793,7 @@ class PointerUpEvent extends PointerEvent {
buttons: buttons,
down: false,
obscured: obscured,
pressure: pressure,
pressure: 0.0,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
......@@ -890,7 +880,6 @@ class PointerCancelEvent extends PointerEvent {
Offset position = Offset.zero,
int buttons = 0,
bool obscured = false,
double pressure = 0.0,
double pressureMin = 1.0,
double pressureMax = 1.0,
double distance = 0.0,
......@@ -911,7 +900,7 @@ class PointerCancelEvent extends PointerEvent {
buttons: buttons,
down: false,
obscured: obscured,
pressure: pressure,
pressure: 0.0,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
......
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