Open allComputableThings opened 4 years ago
For flutter web, should it be possible to drag the scrollbar? When I mouse-down on it, the labelText is shown, but the tab cannot be dragged.
The code works as expected in the Android emulator (can drag the scrollbar).
import 'package:flutter/material.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { MyApp({Key key}) : super(key: key); @override Widget build(BuildContext context) { final scrollController = ScrollController(); Widget child = ListView.builder( physics: ScrollPhysics(), controller: scrollController, itemCount: 500, itemBuilder: rowContent, ); if (true) { // Add scrollbar child = DraggableScrollbar.arrows( controller: scrollController, alwaysVisibleScrollThumb: true, //alwaysVisibleScrollThumb, labelTextBuilder: (double offset) => Text("${offset ~/ 100}"), child: child, ); } return MaterialApp( debugShowCheckedModeBanner: false, title: 'MyApp', home: Container( color: Colors.blue, child: child)); } } final textStyle = TextStyle( color: Colors.black, decoration: TextDecoration.none, fontSize: 12, fontStyle: FontStyle.normal); Widget rowContent(BuildContext context, int i, [int j = 0]) { return Text( "$i: $j: abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef", style: textStyle); }
Hmm... perhaps is related to this:
https://github.com/flutter/flutter/issues/47758
... scrollviews don't seem to get drag events in general.
For flutter web, should it be possible to drag the scrollbar? When I mouse-down on it, the labelText is shown, but the tab cannot be dragged.
The code works as expected in the Android emulator (can drag the scrollbar).