-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.3Found to occur in 3.3Found to occur in 3.3found in release: 3.4Found to occur in 3.4Found to occur in 3.4frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Steps to Reproduce
- Execute
flutter runon the code sample - Slide ListView
- Tap
FloatingActionButton - Slide ListView
Expected results: Unable to slide
Actual results: Successful slide
Code sample
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyWidget());
}
class MyWidget extends StatefulWidget {
const MyWidget({super.key});
@override
State<StatefulWidget> createState() => MyWidgetState();
}
class MyWidgetState extends State<StatefulWidget> {
/// ❗ Try to enable the code to observe whether PointerDeviceKind can affect the behavior of RawGestureDetector after setState
// Set<PointerDeviceKind> pointerDeviceKinds = {
// };
Set<PointerDeviceKind> pointerDeviceKinds = {
PointerDeviceKind.mouse,
PointerDeviceKind.touch,
};
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: ScrollConfiguration(
behavior: ScrollConfiguration.of(context).copyWith(
dragDevices: pointerDeviceKinds,
// dragDevices: UnmodifiableSetView((pointerDeviceKindAll()..remove(PointerDeviceKind.stylus)).toSet()),
),
child: ListView.builder(itemBuilder: (context, index) {
return ListTile(
title: Text(index.toString()),
);
}),
),
/// ❗ Tap FloatingActionButton
/// Observe whether there is a log
floatingActionButton: FloatingActionButton(
onPressed: () {
onSwitch();
},
child: const Icon(Icons.add),
),
),
);
}
void onSwitch() {
if (pointerDeviceKinds.isNotEmpty) {
pointerDeviceKinds = {};
} else {
pointerDeviceKinds = {
PointerDeviceKind.mouse,
PointerDeviceKind.touch,
};
}
setState(() {});
}
}
flutter doctor -v
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[√] Flutter (Channel master, 3.4.0-19.0.pre.156, on Microsoft Windows [版本 10.0.22000.978], locale zh-CN)
• Flutter version 3.4.0-19.0.pre.156 on channel master at D:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 857116da40 (7 days ago), 2022-09-09 00:37:25 -0400
• Engine revision 6610f3f2a9
• Dart version 2.19.0 (build 2.19.0-177.0.dev)
• DevTools version 2.17.0
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
[X] Windows Version (Unable to confirm if installed Windows version is 10 or greater)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at D:\AndroidSDK
• Platform android-33, build-tools 32.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.6)
• Visual Studio at D:\VSSDK\IDE
• Visual Studio Community 2022 version 17.1.32421.90
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2021.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
[√] IntelliJ IDEA Ultimate Edition (version 2021.2)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.1
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
[√] VS Code (version 1.71.1)
• VS Code at C:\Users\autop\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.48.0
[√] VS Code (version 1.72.0-insider)
• VS Code at C:\Users\autop\AppData\Local\Programs\Microsoft VS Code Insiders
• Flutter extension can be installed from:
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [版本 10.0.22000.978]
• Chrome (web) • chrome • web-javascript • Google Chrome 105.0.5195.126
• Edge (web) • edge • web-javascript • Microsoft Edge 105.0.1343.33
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.3Found to occur in 3.3Found to occur in 3.3found in release: 3.4Found to occur in 3.4Found to occur in 3.4frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version