Quantcast
Channel: Active questions tagged listview - Stack Overflow
Viewing all articles
Browse latest Browse all 790

Scrollbar is not draggable

$
0
0

I can see the scrollbar in the ListView, and I can scroll the ListView. But the problem is that I can not use/drag the scrollbar to scroll the ListView. It just appears as an indicator and doesn't respond touches/gestures.

Is this the expected behavior of the ScrollBar or am I doing something wrong? If so, how can I achieve that natively (without using a package, or do I have to)?

import 'package:flutter/material.dart';void main() {  runApp(MyApp());}class MyApp extends StatelessWidget {  final ScrollController _scrollController = ScrollController();  @override  Widget build(BuildContext context) {    return MaterialApp(      home: Scaffold(        body: Center(          child: Scrollbar(            isAlwaysShown: true,            controller: _scrollController,            child: ListView.builder(                controller: _scrollController,                itemCount: 100,                itemBuilder: (context, index) {                  return Card(                      child: ListTile(                    title: Text("Item: ${index + 1}"),                  ));                }),          ),        ),      ),    );  }}

Viewing all articles
Browse latest Browse all 790

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>