Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

[Bug] Scrollbars not visible since PlutoGridPlus 8.4.4 #141

Description

@aley2003

Steps to reproduce the bug

  1. Create a PlutoGrid with more rows than fit on one page
  2. Hover over scroll region or scroll grid with scroll wheel

Expected results

Scrollbar should be displayed

Actual results

No scrollbar is visible. Not in Windows, Chrome, Edge, Firefox.
Scrollbars were ok in PlutoGridPlus 8.4.3. The problem exists since 8.4.4.

Code sample

import 'package:flutter/material.dart';
import 'package:pluto_grid_plus/pluto_grid_plus.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'PlutoGridPlus Scrollbar Test',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final List<PlutoColumn> columns = <PlutoColumn>[
    PlutoColumn(
      title: 'Id',
      field: 'id',
      type: PlutoColumnType.text(),
    ),
    PlutoColumn(
      title: 'Name',
      field: 'name',
      type: PlutoColumnType.text(),
    ),
  ];

  final List<PlutoRow> rows = List.generate(100, (index) =>
    PlutoRow(
      cells: {
      'id': PlutoCell(value: index),
      'name': PlutoCell(value: 'Row $index'),
      },
    ));

  late final PlutoGridStateManager stateManager;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: PlutoGrid(
          columns: columns,
          rows: rows,
          onLoaded: (PlutoGridOnLoadedEvent event) {
            stateManager = event.stateManager;
          },
          configuration: const PlutoGridConfiguration(
            scrollbar: PlutoGridScrollbarConfig(
              isAlwaysShown: true,
              draggableScrollbar: true,
              scrollbarThickness: 15,
              scrollbarThicknessWhileDragging: 15,
            ),
          ),
        ),
      ),
    );
  }
} 

Execution Environment

Flutter version
Flutter version is 3.27.1

PlutoGrid version
PlutoGrid version is 8.4.4

OS
Windows 11

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions