emirşah erden
emirşah erden

Reputation: 53

I want the SingleChildScrollView to stay fixed

I used SingleChildScrollView in the table I created friends. I want SingleChildScrollView to stay on the screen all the time, how can I do this (i.e. I don't want it to be shown only when I come with the mouse)

my code enter link description here

I want the scrollbar to stay fixed enter image description here

Upvotes: 0

Views: 86

Answers (1)

Nirmalkumar
Nirmalkumar

Reputation: 66

wrap your List with ScrollBar. set isAlwaysShown = true

Scrollbar(
    isAlwaysShown: true,
    child: GridView.builder(
      itemCount: 10,
      gridDelegate:
        const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3),
      itemBuilder: (BuildContext context, int index) {
        return Center(
          child: Text('item $index'),
        );
      },
    ),
  );

Upvotes: 1

Related Questions