PlutoGrid is a dataGrid that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS.

Overview

PlutoGrid for flutter - v2.5.0

codecov


PlutoGrid is a dataGrid that can be controlled by the keyboard on desktop and web.
Of course, it works well on Android and IOS.


Demo Web

You can try out various functions and usage methods right away.
All features provide example code.


Pub.Dev

Check out how to install from the official distribution site.


Documentation

The documentation has more details.


ChangeLog

Please note the changes when changing the version of PlutoGrid you are using.


Issue

Report any questions or errors.


Screenshots

Frozen columns on the left and right.

PlutoGrid Nomal


Popup for select list type columns.

PlutoGrid Select Popup


Popup for select date type columns.

PlutoGrid Select Date


Cell renderer.

PlutoGrid Cell renderer


Multi select. (Cells or Rows)

PlutoGrid Multi select


Dual grid. (Moving between grids.)

PlutoGrid Dual grid


A Dark mode.

PlutoGrid Dual grid


Example

Generate the data to be used in the grid.

List<PlutoColumn> columns = [
  /// Text Column definition
  PlutoColumn(
    title: 'text column',
    field: 'text_field',
    type: PlutoColumnType.text(),
  ),
  /// Number Column definition
  PlutoColumn(
    title: 'number column',
    field: 'number_field',
    type: PlutoColumnType.number(),
  ),
  /// Select Column definition
  PlutoColumn(
    title: 'select column',
    field: 'select_field',
    type: PlutoColumnType.select(['item1', 'item2', 'item3']),
  ),
  /// Datetime Column definition
  PlutoColumn(
    title: 'date column',
    field: 'date_field',
    type: PlutoColumnType.date(),
  ),
  /// Time Column definition
  PlutoColumn(
    title: 'time column',
    field: 'time_field',
    type: PlutoColumnType.time(),
  ),
];

List<PlutoRow> rows = [
  PlutoRow(
    cells: {
      'text_field': PlutoCell(value: 'Text cell value1'),
      'number_field': PlutoCell(value: 2020),
      'select_field': PlutoCell(value: 'item1'),
      'date_field': PlutoCell(value: '2020-08-06'),
      'time_field': PlutoCell(value: '12:30'),
    },
  ),
  PlutoRow(
    cells: {
      'text_field': PlutoCell(value: 'Text cell value2'),
      'number_field': PlutoCell(value: 2021),
      'select_field': PlutoCell(value: 'item2'),
      'date_field': PlutoCell(value: '2020-08-07'),
      'time_field': PlutoCell(value: '18:45'),
    },
  ),
  PlutoRow(
    cells: {
      'text_field': PlutoCell(value: 'Text cell value3'),
      'number_field': PlutoCell(value: 2022),
      'select_field': PlutoCell(value: 'item3'),
      'date_field': PlutoCell(value: '2020-08-08'),
      'time_field': PlutoCell(value: '23:59'),
    },
  ),
];

Create a grid with the data created above.

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('PlutoGrid Demo'),
      ),
      body: Container(
        padding: const EdgeInsets.all(30),
        child: PlutoGrid(
          columns: columns,
          rows: rows,
          onChanged: (PlutoGridOnChangedEvent event) {
            print(event);
          },
          onLoaded: (PlutoGridOnLoadedEvent event) {
            print(event);
          }
        ),
      ),
    );
  }

Pluto series

develop packages that make it easy to develop admin pages or CMS with Flutter.


Support

Buy me a coffee


License

MIT

Comments
  • External barcode scanner issue

    External barcode scanner issue

    the scanned characters is not binding properly in editable column, scanning barcode using external barcode scanner

    original barcode value: 99585858585888 in editable column: 85858585888

    same thing is working fine in flutter textbox widget

    bug 
    opened by selvam920 29
  • how to update the footer record when new row added into table

    how to update the footer record when new row added into table

    Hi,

    Question: 1 I am able to add the new row into table every time when user do some action but i have created footer record as below where i want to update the total count (number of rows), total amount (there is column in each row called amt and i want to sum up this amt column and show in footer). it seems to be footer is called only once (first time). whenever i add new row, how to update the footer record?

    class TableFooter extends StatelessWidget {
      final EventAttendeeRegistrationController eventAttendeeRegistrationController;
      const TableFooter({
        Key? key,
        required this.eventAttendeeRegistrationController,
      }) : super(key: key);
    
      String totalCount() {
        return eventAttendeeRegistrationController.attendeeDataTableList.length
            .toString();
      }
    
      String totalAmt() {
        double totAmount = 0;
        for (var element
            in eventAttendeeRegistrationController.attendeeDataTableList) {
          totAmount = totAmount + num.parse(element.amt.toString());
        }
        return totAmount.toString();
      }
    
      @override
      Widget build(BuildContext context) {
        return Container(
          color: const Color(0xFFE3F2FC),
          height: 45,
          child: Row(mainAxisAlignment: MainAxisAlignment.end, children: [
            const VerticalDivider(),
            const Text('Total count:  ',
                style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15)),
            Text(totalCount(),
                style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 15)),
            const SizedBox(width: 50),
            const VerticalDivider(),
            const SizedBox(width: 20),
            const Text('Total Amt:  ',
                style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15)),
            Text(totalAmt(),
                style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 15)),
            const SizedBox(width: 150)
          ]),
        );
      }
    }
    

    Question:2 lets say i have only one row where i want to edit some column. i am able to edit it but if i press enter its not saved. i have to give tab to make this save but tab takes me to next cell in edit mode. i basically want to update the cell when hit enter. how to do it? this is happening when i have only one row or last row.

    enterKeyAction: PlutoGridEnterKeyAction.editingAndMoveDown

    i see this option but it takes me to next row when i hit enter but in my case, what if i have only one row or if i want to edit last row?

    Question:3 is there a way to hide the entire column header row alone? i am able to hide the specific column but i want to hide the entire column header as i want to show only the rows and i dont want to show any column headers. is it possible?

    Question: 4 how to auto size the row height? i see the row height parameter but i want to auto size the row height based on the content available in the cell? kind of text wrap. as of now i am using text overflow parameter in text widget to hide some of the additional data that goes beyond the cell size. but i want to show entire data in the cell by wrapping the text so that it can take multiple lines within the cell and row height also needs to adjusted accordingly. is there a way to do this?

    also, is there a way to auto fit the column size according to the cell content size?

    Question:5

    is there a way to hide the menu icon for the one specific column?

    Question:6

    is there a way to give background color to the entire column header row? as of now i am giving column background color for each column.

    Question: 7

    what does mean rowRef? why are we reducing the length-1 here? this works fine but i dont understand the rowRef usage here?

        stateManager.appendRows([buildPlutoRow(widget.currentAttendee!)]);
          stateManager.moveScrollByRow(
            PlutoMoveDirection.down,
            stateManager.refRows.length - 1,
          );
    

    Question:8

    I am raising all these questions here so that others can make use of it in future. Is there a place where i can find out the good documentation for this package? as of now i am referring the demo example and go to code/debug to understand the usage. Atleast for me, its really hard to understand each functionality. it would be really helpful if its documented well so that it will be useful for junior developers like me. Package is really awesome but understanding the functionality and usage of it without documentation is really hard and need to spend lot of time to do research etc. Not many posts in google or any other forum about this package and related questions. i am sharing these information in a positive note.

    Appreciate your response!.. Thanks.

    stale 
    opened by techttiru 27
  • Support RTL and add Arabic locale

    Support RTL and add Arabic locale

    This fixes #260

    My friend here, Mohamed, fixed a bug that appears when resizing a column in a RTL app. also there was a problem with aligning the columns icon, it supported right/left only, they supported start/end too. and moving cells using arrows now works properly

    Farouk added Arabic locale to the grid too.

    Also, They've coded a way to allow users of the grid to save the order of columns (so it's restored when the app is restarted), that's convenient to the end-user. I know it shouldn't be on this pull request, so we can revert it, or refactor it to be more clean, whatever convenient.

    opened by MajedDH 21
  • Number column keyboard without decimal point (IOS)

    Number column keyboard without decimal point (IOS)

    Steps to reproduce the bug

    Edit a cell that contains number with decimals on IPhone

    Try opening https://weblaze.dev/pluto_grid/build/web/#feature/number-type-column on IPhone or in emulator.

    Expected results

    When soft keyboard opens on IOS it should contain decimal point button.

    Actual results

    Only 0 - 9 available.

    Code sample

    PlutoColumn(
              enableContextMenu: false,
              title: 'Price',
              field: 'price',
              formatter: (str) => f.formatAmount(str, 'DKK'),
              type: PlutoColumnType.number(negative: false, format: '#,###.########')),
    

    Execution Environment

    Flutter version Flutter version is 3.0.5

    PlutoGrid version PlutoGrid version is 5.0.4

    OS IOS 15.6.1

    Skærmbillede 2022-08-27 kl  16 15 51 bug stale 
    opened by bastaware 19
  • How to re-render data in grid?

    How to re-render data in grid?

    Is it possibble to rerender data in datagrid? Im using provider with Consumer. Consumer is running but data doesn't change.

    Consumer is embracing complete Plutogrid widget.

    question stale 
    opened by ZdenekKrcal 18
  • Cannot typing on table

    Cannot typing on table

    hi, after i upgrade flutter to version 1.26.0-17.3.pre i cannot typing anything inside table. and i try to open your documentation and cannot typing anything inside table. this link https://weblaze.dev/pluto_grid/build/web/#feature/number-type-column

    can you help me?

    opened by BangPei 18
  • Unhandled Exception when selecting row

    Unhandled Exception when selecting row

    I just got an Unhandled Exception when selecting a row, keep selecting a row but different columns it will keep giving the same exception.

    [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: LateInitializationError: Field '_column@454200100' has not been initialized. #0 PlutoCell._column (package:pluto_grid/src/model/pluto_cell.dart) #1 PlutoCell.column (package:pluto_grid/src/model/pluto_cell.dart:44:29) #2 ColumnState.currentColumn (package:pluto_grid/src/manager/state/column_state.dart:318:54) #3 EditingState.autoEditing (package:pluto_grid/src/manager/state/editing_state.dart:54:23) #4 CellState.setCurrentCell (package:pluto_grid/src/manager/state/cell_state.dart:213:16) #5 PlutoGridCellGestureEvent._selectMode (package:pluto_grid/src/manager/event/pluto_grid_cell_gesture_event.dart:142:20) #6 PlutoGridCellGestureEvent._onTapUp (package:pluto_grid/src/manager/event/pluto_grid_cell_gesture_event.dart:52:7) #7 PlutoGridCellGestureEvent.handler (package:pluto_grid/src/manager/event/pluto_grid_cell_gesture_event.dart:24:9) #8 PlutoGridEventManager._handler (package:pluto_grid/src/manager/pluto_grid_event_manager.dart:77:11)

    NOTE: the application don't quit. and the debugger can't catch anything.

    PlutoGrid version PlutoGrid version is 5.0.1

    OS Windows 10

    bug 
    opened by hamzaj9 17
  • Can this package create an excel like sheet that can scroll programatically?

    Can this package create an excel like sheet that can scroll programatically?

    I have been wanting to create an excel like sheet but also being able to scroll to a cell I want to search just like excel does.

    more details here https://stackoverflow.com/questions/72399829/how-can-i-create-an-excel-like-sheet-with-flutter-widgets?noredirect=1#comment127905020_72399829

    is this possible?

    stale 
    opened by fenchai23 17
  • Is there any way to completely override the sorting logic? [Help]

    Is there any way to completely override the sorting logic? [Help]

    Hi There!

    Couple of questions:

    1. Is it possible to completely override the sorting logic? What I want to be able to do is click on the header cell and get sorted records from the server without applying the Pluto sorting. I still want to be able to update the icon though to indicate the sorting order.
    2. Is there a way to have separate icons for the sort indication and the pop-up menu? Right now the menu icon changes to a sorting icon when you sort, but I want to be able to still see the menu icon separately even when sort is applied.
    enhancement question stale 
    opened by ashndev 16
  • Getting selected Rows.

    Getting selected Rows.

    When using event.stateManager.setSelectingMode(PlutoGridSelectingMode.horizontal), the following code does not return the selected rows.

    List selectedRows = Set.from(stateManager!.currentSelectingRows.map((e) => e.sortIdx)).toList();

    question 
    opened by robertjones1 15
  • The onSelected event seems to be invalid

    The onSelected event seems to be invalid

    I did a test, the purpose is, click on a table row to open another new interface。 I added onSelected event, and click one row, but it seems invalid, no trigger onSelected event.

    stale 
    opened by stoneLee81 15
  • [Feature] is it possible to use different colors for check box and activate border color

    [Feature] is it possible to use different colors for check box and activate border color

    is it possible to use different colors for check box and activate border color

    Screenshot 2022-12-27 at 8 53 04

    like in this picture the check box color is from PlutoGridStyleConfig.activatedBorderColor and also the cell activated border color is from the same attribute. can we make them different colors?

    enhancement 
    opened by amirsnayax 0
  • [Help] Is it possible to make a single (or several but not all)row editable/non-editable?

    [Help] Is it possible to make a single (or several but not all)row editable/non-editable?

    So my PlutoGrid has an edit mode where you can edit/delete rows from it. Once a row has been marked for deletion, I want that row to not be editable without making all other rows not editable since the only way I've found to make this is to change the whole colum's enableEditingMode which make the whole column non-editable if set to false or changing GridMode to readOnly which disable all rows.

    Is there a way to achieve this?

    question 
    opened by Retr0sec7 0
Releases(2.10.0)
  • 2.10.0(May 10, 2022)

    Added features

    • Added export as csv. (Contributed by @henry2man)
    • Added PlutoGrid.of method. (Contributed by @Hu-Wentao)
    • Added persian locale. (Contributed by @hos3ein)
    Source code(tar.gz)
    Source code(zip)
  • 2.9.0(Jan 6, 2022)

    Added features

    • Added expandedColumn of columnGroup. You can vertically expand one column in a column group.
    • Added row color animation when dragging rows.
    • Added F3 key action. When the column filter is active, the current focus moves to the column filter.
      When the focus is on the column filter, the column filter popup is called.
    • Added ESC key action to moving previous cell in column filter widget. Changes focus to the previous cell with the column filter in focus.
      If you press the down arrow key, the focus moves to the cell below the first row.
    • Added done button action for mobile. The keyboard is closed when the cell is in the editing state and the done button on the mobile is tapped.
    • Added insert, remove columns. https://weblaze.dev/pluto_grid/build/web/#add-and-remove-column-row
    • Added allowFirstDot to PlutoColumnTypeNumber. Added option to enter minus sign on mobile devices where the "., -" sign is in one button.

    Note to users of previous versions

    • Changed the default value of enableMoveDownAfterSelecting to false.
    • Changed a minimum flutter version to 2.5.0.
    • Changed to be changed in real time when changing the column width.
    • Changed pagination logic.
    • Removed isShowFrozenColumn method of PlutoGridStateManager.
    • Removed resetKeyPressed, setKeyPressed methods of PlutoGridStateManager.
    • Fixed screen not being able to touch due to scroll range error when resizing the screen.
    Source code(tar.gz)
    Source code(zip)
  • 2.8.0(Dec 10, 2021)

    Added features

    PlutoGrid Cell renderer

    • Added columnGroups.
    • Added columnHeight, columnFilterHeight.

    Note to users of previous versions

    • Changed the default value of enableGridBorderShadow from true to false.
    • Changed interface of toggleSortColumn, sortAscending, sortDescending, sortBySortIdx methods.
      void toggleSortColumn(Key columnKey); // less than 2.8.0
      void toggleSortColumn(PlutoColumn column); // 2.8.0 or later
    
      void sortAscending(PlutoColumn column); // less than 2.8.0
      void sortAscending(PlutoColumn column, {bool notify = true}); // 2.8.0 or later
    
      void sortDescending(PlutoColumn column); // less than 2.8.0
      void sortDescending(PlutoColumn column, {bool notify = true}); // 2.8.0 or later
    
      void sortBySortIdx(); // less than 2.8.0
      void sortBySortIdx(PlutoColumn column, {bool notify = true}); // 2.8.0 or later
    
    Source code(tar.gz)
    Source code(zip)
  • 2.7.0(Dec 7, 2021)

    Added features

    • Added to be able to set the left and right padding of the cell. You can set the left and right padding values with double defaultColumnTitlePadding and double defaultCellPadding in the configuration property.
    • Added option to automatically enter edit state when selecting a cell. https://weblaze.dev/pluto_grid/build/web/#feature/editing-state
    • Added keyboard move option with left and right arrow keys when reaching the left and right ends of text in edit state. (by PlutoGridConfiguration.enableMoveHorizontalInEditing)
    • Added titleSpan property to custom text or icon in column title.
    • Removed readOnly property of PlutoColumnType and added to PlutoColumn.
    • Added checkReadOnly callback to dynamically manipulate readOnly property. https://weblaze.dev/pluto_grid/build/web/#add-and-remove-rows
    • Added gridPopupBorderRadius property to round the corners of popups used inside the grid.

    Note to users of previous versions

    • Removed readOnly property of PlutoColumnType and added to PlutoColumn. The readOnly property has been changed from the existing PlutoColumnType to PlutoColumn, so if you are using the readOnly property in your existing code, you need to modify the code.
    Source code(tar.gz)
    Source code(zip)
  • 2.6.0(Nov 19, 2021)

    added features

    • Added dynamically row background color. Web demo
    • Added optional border radius. (Round the grid corners through the borderRadius property in the PlutoGrid constructor.)
    • Added align column title text. (Align column titles via titleTextAlign in the PlutoColumn constructor.)
    • Added to receive the moved row to onRowsMoved callback when a row is moved by dragging, etc.
    • Added shortcuts. (Alt + PageUp or PageDown. Moving a page in the paging state.)
    • Modified so that onSelected callback is called with one tap in PlutoGridMode.selectWithOneTap mode.
    • Fixed an error where arrow keys and backspace keys did not work in Desktop.
    • Fixed insert, append, prepend rows bug.
    • Renamed PlutoGridMoveUpdateEvent to PlutoGridScrollUpdateEvent.
    Source code(tar.gz)
    Source code(zip)
Owner
Manki Kim
Developing flutter packages used by managers or business applications.
Manki Kim
Pure Dart and Flutter package for Android,IOS and Web

Fancy Flutter Alert Dialog Pure Dart and Flutter package for Android,IOS and Web A flutter Package to show custom alert Dialog,you can choose between

Dokkar Rachid Reda 119 Sep 23, 2022
A dart package to display a horizontal bar of customisable toggle tabs. Supports iOS and Android.

toggle_bar A dart package to display a horizontal bar of customisable toggle tabs. Supports iOS and Android. Installation Depend on it. dependencies:

Prem Adithya 9 Jul 13, 2022
Flutter progress dialog. Support both Android and iOS platform.

Flutter Progress Dialog [pub packages] | Flutter progress dialog. Support both Android and iOS platform

Dylan Wu 22 Oct 9, 2022
PowerFileView - A powerful file view widget, support a variety of file types, such as Doc Eexcl PPT TXT PDF and so on, Android is implemented by Tencent X5, iOS is implemented by WKWebView.

PowerFileView - A powerful file view widget, support a variety of file types, such as Doc Eexcl PPT TXT PDF and so on, Android is implemented by Tencent X5, iOS is implemented by WKWebView.

Yao 8 Oct 22, 2022
A high performance Flutter Widget to render Bottts svg avatars on android/ios devices.

Flutter Avatars - Bottts A high performance Flutter Widget to render Bottts svg avatars on android/ios devices. (pub.dev) It's faster than other class

Abhijat Saxena 11 Dec 19, 2021
Flutter StatusBar Control for iOS & Android

Since flutter_statusbar_manager is no longer maintained, this package is a re-publish and will be occasionally updated for continued use in existing projects.

Rafael M. 9 Nov 15, 2022
Experimental solution for web-like text selection across widgets

Better Selection Experimental solution for web-like text selection across widgets (text, images, et cetera). Better selection is dependent on, and is

Wilson Wilson 59 Oct 12, 2022
A widget that can be dragged and scrolled in a single gesture and snapped to a list of extents.

Sliding Sheet A widget that can be dragged and scrolled in a single gesture and snapped to a list of extents. Click here to view the full example. Ins

null 396 Mar 10, 2022
This repo is for anything that can be reusable in flutter like custom widgets 🟥, animations 🌟and more

Flutter Shortcuts This repo is for anything that can be reusable in flutter like custom widgets ?? , animations ?? and more. How to Use Just get the f

Abdelrahman Mostafa Elmarakby 91 Dec 3, 2022
A sliding up panel widget which can be used to show or hide content, beautiful and simple.

flutter_sliding_up_panel A sliding up panel widget which can be used to show or hide content, beautiful and simple. demo Getting Started dependencies:

null 25 Dec 12, 2022
Custom bottom sheet widget, that can resize by drag and then scroll.

Bottom Sheet This package is part of the SurfGear toolkit made by Surf. About Custom bottom sheet widget that can be resized in response to drag gestu

Surf 92 Dec 16, 2022
The public ui library is used with the openim demo, and you can directly use it for secondary development.

flutter_openim_widget The public ui library is used with the openim demo, and you can directly use it for secondary development. import 'package:flutt

null 28 Dec 27, 2022
Flutter Triple Status Button can use toggle button but in three statuses.

triple_status_button Triple Status Button. Flutter Triple Status Button can use toggle button but in three statuses. Property Description height heigh

MahdiBagjani 2 Nov 13, 2021
A Flutter GridView whose items the user can interactively reorder by dragging

A GridView whose items the user can interactively reorder by dragging. Compared to the given ReorderableListView, it is possible to reorder different

null 57 Dec 19, 2022
Widget, that can make any static located widget hidable

Installing See the official installing guidline from hidable/install Usage & Overview To start using Hidable widget, we have to create a ScrollControl

Anon 18 Dec 16, 2022
Flutter package: Define a theme (colors, text styles etc.) as static const values which can be changed dynamically.

Flutter package: Define a theme (colors, text styles etc.) as static const values which can be changed dynamically. Also comes with useful extensions to create text styles by composition.

Marcelo Glasberg 21 Jan 2, 2023
Global loading widget, which can be used through simple configuration.

load Global loading widget, which can be used through simple configuration. Pure flutter library, not use native code. It is similar to OKToast in use

Caijinglong 35 Nov 4, 2022
This app is a good example of how adding animations can liven up a digital clock.

Animal Clock This app is a good example of how adding animations can liven up a digital clock. The lion's head bobbles along without any care in the w

sei 7 Jun 29, 2022
A widget lib that the widget in this lib can react to flutter ScrollController's offset

Language: English | 中文简体 linked_scroll_widgets A lib full of widgets that can react to the scrollController's offset change,to custom your UI effect.

WenJingRui 8 Oct 16, 2022