-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 1.26Found to occur in 1.26Found to occur in 1.26frameworkflutter/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 onplatform-iosiOS applications specificallyiOS applications specificallyplatform-macBuilding on or for macOS specificallyBuilding on or for macOS specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
I have only tried this on a mac device, as a mac app and a web app. When using the trackpad to scroll a view, the ScrollPosition.isScrollingNotifier
returns false.
If I scroll by clicking and dragging it, the notifier returns true.
At least on macos, the default way of scrolling into views is using the two-finger gesture. If you click and drag inside a native app, this one does not scroll, but a Flutter app does.
Steps to Reproduce
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(home: MyListView()));
}
class MyListView extends StatefulWidget {
@override
_MyListViewState createState() => _MyListViewState();
}
class _MyListViewState extends State<MyListView> {
final ScrollController controller = ScrollController();
@override
void initState() {
controller.addListener(() {
// always prints "scrolling = true"
print('scrolling = ${controller.position.isScrollingNotifier.value}');
});
super.initState();
}
@override
void dispose() {
controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(body: ListView.builder(
controller: controller,
itemCount: 20,
itemBuilder: (BuildContext context, int index) {
return ListTile(
title: Text('$index'),
);
},
),
);
}
}Flutter (Channel dev, 1.26.0-12.0.pre, on macOS 11.1 20C69 darwin-x64, locale en-ES)
db-dblank and abdulmominsakib
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 1.26Found to occur in 1.26Found to occur in 1.26frameworkflutter/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 onplatform-iosiOS applications specificallyiOS applications specificallyplatform-macBuilding on or for macOS specificallyBuilding on or for macOS specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version