-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
a: desktopRunning on desktopRunning on desktopf: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyr: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issueteam-linuxOwned by the Linux platform teamOwned by the Linux platform team
Description
Steps to reproduce
Run the demo on the Linux touchscreen machine;
- One finger test:
- Run the demo on the Linux touchscreen machine;
- Touch on the screen and up;
- Two fingers test:
- On the premise that one finger has already touched;
- Touch the screen with the second finger;
- Three fingers test:
- On the premise that two fingers has already touched;
- Touch the screen with the third finger;
Expected results
-
The first test expected results:
Successfully received all events, all events type are touch; -
The second test expected results:
Successfully received all events, received the new down and up, all events type are touch; -
The third test expected results:
Successfully received all events, received the new down and up, all events type are touch;
Actual results
-
The first test actual results:
Successfully received all events, but all event types are mouse; -
The second test actual results:
No new down event received, and there was no up event when the second finger was release; -
The third test actual results:
Received the zoom events: ZoomStart, ZoomUpdate, ZoomEnd, and all event types are trackpad;
Code sample
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Listener(
onPointerDown: (PointerEvent event) {
debugPrint(
"flutter-demo onPointerDown:${event} kind:${event.kind}");
},
onPointerMove: (PointerEvent event) {
debugPrint(
"flutter-demo onPointerMove:${event} kind:${event.kind}");
},
onPointerUp: (PointerEvent event) {
debugPrint(
"flutter-demo onPointerUp:${event} kind:${event.kind}");
},
onPointerCancel: (PointerEvent event) {
debugPrint(
"flutter-demo onPointerCancel:${event} kind:${event.kind}");
},
onPointerPanZoomStart: (PointerEvent event) {
debugPrint(
"flutter-demo onPointerPanZoomStart:${event} kind:${event.kind}");
},
// TODO onPointerSignal 独立分发
onPointerSignal: (PointerEvent event) {
debugPrint(
"flutter-demo onPointerSignal:${event} kind:${event.kind}");
},
onPointerHover: (PointerEvent event) {
debugPrint(
"flutter-demo onPointerHover:${event} kind:${event.kind}");
},
onPointerPanZoomEnd: (PointerEvent event) {
debugPrint(
"flutter-demo onPointerPanZoomEnd:${event} kind:${event.kind}");
},
onPointerPanZoomUpdate: (PointerEvent event) {
debugPrint(
"flutter-demo onPointerPanZoomUpdate:${event} kind:${event.kind}");
},
child: Container(
color: Colors.yellow,
),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}Logs
Logs
- The first test logs
flutter: flutter-demo onPointerDown:_TransformedPointerDownEvent#53ba5(position: Offset(208.1, 251.6)) kind:PointerDeviceKind.mouse
flutter: flutter-demo onPointerMove:_TransformedPointerMoveEvent#d62a9(position: Offset(208.6, 254.0)) kind:PointerDeviceKind.mouse
flutter: flutter-demo onPointerMove:_TransformedPointerMoveEvent#ffc41(position: Offset(211.0, 257.9)) kind:PointerDeviceKind.mouse
flutter: flutter-demo onPointerMove:_TransformedPointerMoveEvent#86f91(position: Offset(212.8, 263.0)) kind:PointerDeviceKind.mouse
flutter: flutter-demo onPointerMove:_TransformedPointerMoveEvent#ac328(position: Offset(215.2, 268.5)) kind:PointerDeviceKind.mouse
flutter: flutter-demo onPointerMove:_TransformedPointerMoveEvent#bd1bc(position: Offset(217.1, 275.9)) kind:PointerDeviceKind.mouse
flutter: flutter-demo onPointerMove:_TransformedPointerMoveEvent#5eee4(position: Offset(218.5, 282.2)) kind:PointerDeviceKind.mouse
flutter: flutter-demo onPointerMove:_TransformedPointerMoveEvent#407b4(position: Offset(219.9, 288.5)) kind:PointerDeviceKind.mouse
flutter: flutter-demo onPointerMove:_TransformedPointerMoveEvent#c94b3(position: Offset(221.3, 294.9)) kind:PointerDeviceKind.mouse
flutter: flutter-demo onPointerMove:_TransformedPointerMoveEvent#da376(position: Offset(221.3, 301.4)) kind:PointerDeviceKind.mouse
flutter: flutter-demo onPointerMove:_TransformedPointerMoveEvent#3fb59(position: Offset(222.7, 307.0)) kind:PointerDeviceKind.mouse
flutter: flutter-demo onPointerMove:_TransformedPointerMoveEvent#669cb(position: Offset(222.7, 311.7)) kind:PointerDeviceKind.mouse
flutter: flutter-demo onPointerMove:_TransformedPointerMoveEvent#7171a(position: Offset(222.7, 316.5)) kind:PointerDeviceKind.mouse
flutter: flutter-demo onPointerUp:_TransformedPointerUpEvent#c31b4(position: Offset(222.7, 316.5)) kind:PointerDeviceKind.mouse- The second test logs
no logs- The third test logs
flutter: flutter-demo onPointerPanZoomStart:_TransformedPointerPanZoomStartEvent#b2e4a(position: Offset(197.1, 299.1)) kind:PointerDeviceKind.trackpad
flutter: flutter-demo onPointerPanZoomUpdate:_TransformedPointerPanZoomUpdateEvent#506cf(position: Offset(197.1, 299.1)) kind:PointerDeviceKind.trackpad
flutter: flutter-demo onPointerPanZoomUpdate:_TransformedPointerPanZoomUpdateEvent#ffaba(position: Offset(197.1, 299.1)) kind:PointerDeviceKind.trackpad
flutter: flutter-demo onPointerPanZoomUpdate:_TransformedPointerPanZoomUpdateEvent#b5e52(position: Offset(197.1, 299.1)) kind:PointerDeviceKind.trackpad
flutter: flutter-demo onPointerPanZoomUpdate:_TransformedPointerPanZoomUpdateEvent#e6912(position: Offset(197.1, 299.1)) kind:PointerDeviceKind.trackpad
flutter: flutter-demo onPointerPanZoomUpdate:_TransformedPointerPanZoomUpdateEvent#881a8(position: Offset(197.1, 299.1)) kind:PointerDeviceKind.trackpad
flutter: flutter-demo onPointerPanZoomUpdate:_TransformedPointerPanZoomUpdateEvent#874b6(position: Offset(197.1, 299.1)) kind:PointerDeviceKind.trackpad
flutter: flutter-demo onPointerPanZoomEnd:_TransformedPointerPanZoomEndEvent#9a650(position: Offset(197.1, 299.1)) kind:PointerDeviceKind.trackpadFlutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.0, on BrilliaOS 5.10.179.ft, locale zh_CN.UTF-8)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] Connected device (2 available)
[!] Network resources
✗ A cryptographic error occurred while checking "https://pub.dev/": Connection terminated during handshake
You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware installed on your computer.
✗ A network error occurred while checking "https://maven.google.com/": Connection timed out
✗ An HTTP error occurred while checking "https://github.com/": Connection closed before full header was received
! Doctor found issues in 3 categories.Metadata
Metadata
Assignees
Labels
a: desktopRunning on desktopRunning on desktopf: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyr: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issueteam-linuxOwned by the Linux platform teamOwned by the Linux platform team