Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
9b464d4
Updated dependencies.
bosskmk May 25, 2022
8c376c1
Merge branch 'develop' into release/pluto_grid_export
bosskmk May 25, 2022
a36b247
Merge branch 'develop' into release/pluto_grid_export
bosskmk May 25, 2022
6a089bb
Merge branch 'develop' into release/pluto_grid_export
bosskmk May 28, 2022
ee1d882
Merge branch 'develop' into release/pluto_grid_export
bosskmk Jun 7, 2022
815c353
Merge branch 'develop' into release/pluto_grid_export
bosskmk Jun 7, 2022
9d8177d
Updated pubspec.
bosskmk Jun 7, 2022
1c009c9
Merge branch 'develop' into release/pluto_grid_export
bosskmk Jul 12, 2022
9bb008c
PlutoGridExport 1.0.3
bosskmk Jul 12, 2022
722b8e8
Update 6.0.0
bosskmk Jan 26, 2023
2388f25
Merge branch 'develop' into release/pluto_grid_export
bosskmk Jan 26, 2023
0a3a660
Bump PlutoGrid.
bosskmk Jan 26, 2023
e51cb06
Removed ternary operator bug
lille-morille May 9, 2023
7b3b8da
Merge branch 'develop' into release/pluto_grid_export
bosskmk May 16, 2023
619534f
Merge branch 'master' of https://github.com/RedRozio/pluto_grid into …
bosskmk May 16, 2023
a949b05
Merge branch 'RedRozio-master' into develop
bosskmk May 16, 2023
8e9a58d
Merge branch 'develop' into release/pluto_grid_export
bosskmk May 16, 2023
16c8c4d
Bump PlutoGrid.
bosskmk May 16, 2023
71b441f
Merge remote-tracking branch 'origin/release/pluto_grid_export' into …
bosskmk May 16, 2023
3b6f423
[Export] Bump pdf version.
bosskmk May 16, 2023
10c5bf9
Save edited cell when it loses focus (#6)
Mrprey Jul 6, 2023
2f849c9
Unfocus cell when click out of the grid (#7)
krysthianlessa Jul 20, 2023
eac46ca
Adds overlay to left frozen rows (#9)
victorpinheirodev Jul 20, 2023
99397af
Enable receive custom popup dialog in ColumnMenuDelegate (#8)
gustoliveira Jul 24, 2023
ce43305
Add leadingIcon widget beside PlutoColumnTitle icon (#10)
gustoliveira Aug 1, 2023
ea91c65
Updates titleSpan to receive a callback (#11)
victorpinheirodev Aug 21, 2023
e26e30e
Resize icon is quite away of Divider line (#12)
Leonardo1952 Sep 14, 2023
2249a86
Fix Show icons and Mouse Cursor of Column Title (#13)
Mrprey Sep 20, 2023
5f9a11f
chore: fix a compile error after `flutter 3.19`
chan150 Feb 27, 2024
73898d4
fix warning
bosskmk Mar 1, 2024
5049e4d
Merge branch 'chan150-master' into develop
bosskmk Mar 1, 2024
acaf985
fix tests
bosskmk Mar 1, 2024
2b0d6c4
update 3.19
bosskmk Mar 1, 2024
3a2e741
Merge pull request #1021 from bosskmk/develop
bosskmk Mar 1, 2024
22315f9
Upgrade Flutter version to 3.19.3 (#14)
Leonardo1952 Mar 11, 2024
a9d6d20
Apply hover icon in column title (#16)
Mrprey Mar 26, 2024
e03318a
Fix hover icon of Column Title (#17)
Mrprey Mar 27, 2024
7590ca7
Removing num Lock from the list of logical Keys Pressed (#19)
Leonardo1952 May 10, 2024
f6389a8
Changing numLock key validation (#20)
Leonardo1952 Jun 25, 2024
590f77e
Upgrade Flutter version to 3.22.2 (#22)
Leonardo1952 Jun 26, 2024
9d2ec87
DIGIT-1021 Merge pluto_grid main branch into Oxeanbits fork (#23)
victorpinheirodev Jan 7, 2025
f8fa08b
Revert "DIGIT-1021 Merge pluto_grid main branch into Oxeanbits fork" …
niltonvasques Jan 14, 2025
b52a000
Merge remote-tracking branch 'original/master' into merge-pluto-grid-2
victorpinheirodev Jan 15, 2025
aca0f38
Fixes pluto grid constructor
victorpinheirodev Jan 16, 2025
50d6d25
Merge pull request #25 from vpinheiro38/merge-pluto-grid-2
rodiguif Jan 16, 2025
70b7466
Ensure tapped cell becomes fully visible
Mrprey Oct 13, 2025
7e924cf
Update cache action to v4
Mrprey Oct 13, 2025
bcb3a47
fix error
Mrprey Oct 13, 2025
c48b6fa
fix test
Mrprey Oct 13, 2025
13f8669
Ensure mouse focus scrolls cell into view
rodiguif Oct 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,17 @@ jobs:
steps:
# Without this, there are no files in the directory.
- uses: actions/checkout@v3
- name: Cache Flutter dependencies
uses: actions/cache@v4
with:
path: |
~/.pub-cache
~/.dartServer/.analysis-driver
key: ${{ runner.os }}-pub-${{ hashFiles('pubspec.yaml', 'analysis_options.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
# using flutter
- uses: subosito/flutter-action@v2.4.0
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: dart --version
Expand Down
140 changes: 88 additions & 52 deletions CHANGELOG.md

Large diffs are not rendered by default.

26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,46 @@
## PlutoGrid for flutter - v7.0.2
## PlutoGrid for flutter - v8.0.0

[![Awesome Flutter](https://img.shields.io/badge/Awesome-Flutter-blue.svg)](https://github.com/Solido/awesome-flutter)
[![codecov](https://codecov.io/gh/bosskmk/pluto_grid/branch/master/graph/badge.svg)](https://codecov.io/gh/bosskmk/pluto_grid)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

<br>

`PlutoGrid` is a `DataGrid` that can be operated with the keyboard in various situations such as moving cells.
`PlutoGrid` is a `DataGrid` that can be operated with the keyboard in various situations such as
moving cells.
It is developed with priority on the web and desktop.
Improvements such as UI on mobile are being considered.
If you comment on an issue, mobile improvements can be made quickly.

<br>

### [Demo Web](https://bosskmk.github.io/pluto_grid/build/web/index.html)

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

<br>

### [Pub.Dev](https://pub.dev/packages/pluto_grid)

> Check out how to install from the official distribution site.

<br>

### [Documentation](https://pluto.weblaze.dev/series/pluto-grid)

> The documentation has more details.

<br>

### [ChangeLog](https://github.com/bosskmk/pluto_grid/blob/master/CHANGELOG.md)

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

<br>

### [Issue](https://github.com/bosskmk/pluto_grid/issues)

> Report any questions or errors.

<br>
Expand All @@ -50,59 +56,71 @@ If you comment on an issue, mobile improvements can be made quickly.
### Screenshots

#### Change the color of the rows or make the cells look the way you want them.

![PlutoGrid Normal](https://bosskmk.github.io/images/pluto_grid/2.8.0/pluto_grid_2.8.0_01.png)

<br>

#### Date type input can be easily selected by pop-up and keyboard.

![PlutoGrid Select Popup](https://bosskmk.github.io/images/pluto_grid/3.1.0/pluto_grid_3.1.0_01.png)

<br>

#### The selection type column can be easily selected using a pop-up and keyboard.

![PlutoGrid Select Date](https://bosskmk.github.io/images/pluto_grid/2.8.0/pluto_grid_2.8.0_03.png)

<br>

#### Group columns by desired depth.

![PlutoGrid Cell renderer](https://bosskmk.github.io/images/pluto_grid/2.8.0/pluto_grid_2.8.0_04.png)

<br>

#### Grid can be expressed in dark mode or a combination of desired colors. Also, freeze the column, move it by dragging, or adjust the size.

![PlutoGrid Multi select](https://bosskmk.github.io/images/pluto_grid/2.8.0/pluto_grid_2.8.0_05.png)

<br>

### Example

Generate the data to be used in the grid.

```dart

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',
Expand Down Expand Up @@ -143,6 +161,7 @@ List<PlutoRow> rows = [
```

Create a grid with the data created above.

```dart
@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -173,6 +192,7 @@ Widget build(BuildContext context) {

| Flutter | PlutoGrid |
|------------------|-----------------------|
| 3.19.0 or higher | 8.0.0 or higher |
| 3.10.0 or higher | 7.0.0 or higher |
| 3.7.0 or higher | 6.0.0 or higher |
| 3.3.0 or higher | 5.0.6 or higher |
Expand All @@ -184,7 +204,9 @@ For other versions, contact the issue
<br>

### Related packages

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

* [PlutoGrid](https://github.com/bosskmk/pluto_grid)
* [PlutoMenuBar](https://github.com/bosskmk/pluto_menu_bar)
* [PlutoLayout](https://github.com/bosskmk/pluto_layout)
Expand Down
2 changes: 1 addition & 1 deletion demo/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class MyApp extends StatelessWidget {
scaffoldBackgroundColor: PlutoGridExampleColors.backgroundColor,
colorScheme: const ColorScheme.light(
primary: PlutoGridExampleColors.primaryColor,
background: PlutoGridExampleColors.backgroundColor,
onPrimaryContainer: PlutoGridExampleColors.backgroundColor,
),
),
);
Expand Down
28 changes: 15 additions & 13 deletions demo/lib/screen/development_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class _DevelopmentScreenState extends State<DevelopmentScreen> {

late PlutoGridStateManager stateManager;

Color Function(PlutoRowColorContext)? rowColorCallback;
Color Function(PlutoRowContext)? rowColorCallback;

PlutoRowGroupDelegate? rowGroupDelegate;

Expand Down Expand Up @@ -128,7 +128,7 @@ class _DevelopmentScreenState extends State<DevelopmentScreen> {
columns.addAll(testColumnsA);
columnGroups.addAll(testColumnGroupsA);
rows.addAll(DummyData.rowsByColumns(length: 10000, columns: columns));
rowColorCallback = (PlutoRowColorContext rowColorContext) {
rowColorCallback = (PlutoRowContext rowColorContext) {
return rowColorContext.row.cells['column2']?.value == 'green'
? const Color(0xFFE2F6DF)
: Colors.white;
Expand Down Expand Up @@ -958,18 +958,20 @@ final testColumnsA = [
enableDropToResize: true,
enableAutoEditing: true,
titleTextAlign: PlutoColumnTextAlign.right,
titleSpan: const TextSpan(
children: [
WidgetSpan(
child: Text(
'* ',
style: TextStyle(color: Colors.red),
titleSpan: (text) {
return const TextSpan(
children: [
WidgetSpan(
child: Text(
'* ',
style: TextStyle(color: Colors.red),
),
alignment: PlaceholderAlignment.bottom,
),
alignment: PlaceholderAlignment.bottom,
),
TextSpan(text: 'column1'),
],
),
TextSpan(text: 'column1'),
],
);
},
width: 250,
minWidth: 175,
renderer: (rendererContext) {
Expand Down
47 changes: 25 additions & 22 deletions demo/lib/screen/feature/add_and_remove_column_row_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,21 @@ class _AddAndRemoveColumnRowScreenState

columns.addAll([
PlutoColumn(
title: 'Id',
field: 'id',
type: PlutoColumnType.text(),
readOnly: true,
checkReadOnly: checkReadOnly,
titleSpan: const TextSpan(children: [
WidgetSpan(
child: Icon(
Icons.lock_outlined,
size: 17,
)),
TextSpan(text: 'Id'),
]),
),
title: 'Id',
field: 'id',
type: PlutoColumnType.text(),
readOnly: true,
checkReadOnly: checkReadOnly,
titleSpan: (text) {
return const TextSpan(children: [
WidgetSpan(
child: Icon(
Icons.lock_outlined,
size: 17,
)),
TextSpan(text: 'Id'),
]);
}),
PlutoColumn(
title: 'Name',
field: 'name',
Expand All @@ -66,14 +67,16 @@ class _AddAndRemoveColumnRowScreenState
]),
enableEditingMode: false,
frozen: PlutoColumnFrozen.end,
titleSpan: const TextSpan(children: [
WidgetSpan(
child: Icon(
Icons.lock,
size: 17,
)),
TextSpan(text: 'Status'),
]),
titleSpan: (text) {
return const TextSpan(children: [
WidgetSpan(
child: Icon(
Icons.lock,
size: 17,
)),
TextSpan(text: 'Status'),
]);
},
renderer: (rendererContext) {
Color textColor = Colors.black;

Expand Down
13 changes: 13 additions & 0 deletions demo/lib/screen/feature/column_menu_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,19 @@ class _UserColumnMenu implements PlutoColumnMenuDelegate<_UserColumnMenuItem> {
break;
}
}

@override
Future<_UserColumnMenuItem?>? showColumnMenu({
required BuildContext context,
required Offset position,
required List<Widget> items,
Color backgroundColor = Colors.white,
}) {
return Future.value(_UserColumnMenuItem.moveNext);
}

@override
Widget? leadingIcon(PlutoColumn column) => null;
}

enum _UserColumnMenuItem {
Expand Down
4 changes: 2 additions & 2 deletions demo/lib/screen/feature/listing_mode_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class _ListingModeScreenState extends State<ListingModeScreen> {
},
style: ButtonStyle(
backgroundColor:
MaterialStateProperty.all<Color>(
WidgetStateProperty.all<Color>(
Colors.blue,
),
),
Expand Down Expand Up @@ -204,7 +204,7 @@ class _ListingModeScreenState extends State<ListingModeScreen> {
},
style: ButtonStyle(
backgroundColor:
MaterialStateProperty.all<Color>(
WidgetStateProperty.all<Color>(
Colors.blue,
),
),
Expand Down
1 change: 1 addition & 0 deletions demo/linux/flutter/ephemeral/.plugin_symlinks/printing

This file was deleted.

6 changes: 5 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ class _PlutoGridExamplePageState extends State<PlutoGridExamplePage> {
onChanged: (PlutoGridOnChangedEvent event) {
print(event);
},
configuration: const PlutoGridConfiguration(),
configuration: const PlutoGridConfiguration(
style: PlutoGridStyleConfig(
columnIconViewType: ColumnIconViewType.hover,
),
),
),
),
);
Expand Down
4 changes: 2 additions & 2 deletions lib/src/helper/filter_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,11 @@ class PlutoGridFilterPopupHeader extends StatelessWidget {
final SetFilterPopupHandler? handleAddNewFilter;

const PlutoGridFilterPopupHeader({
Key? key,
super.key,
this.stateManager,
this.configuration,
this.handleAddNewFilter,
}) : super(key: key);
});

void handleAddButton() {
handleAddNewFilter!(stateManager);
Expand Down
14 changes: 8 additions & 6 deletions lib/src/helper/pluto_key_manager_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import 'package:flutter/services.dart';

class PlutoKeyManagerEvent {
FocusNode focusNode;
RawKeyEvent event;
KeyEvent event;

HardwareKeyboard instance = HardwareKeyboard.instance;

PlutoKeyManagerEvent({
required this.focusNode,
Expand All @@ -12,9 +14,9 @@ class PlutoKeyManagerEvent {

bool get needsThrottle => isMoving || isTab || isPageUp || isPageDown;

bool get isKeyDownEvent => event.runtimeType == RawKeyDownEvent;
bool get isKeyDownEvent => event.runtimeType == KeyDownEvent;

bool get isKeyUpEvent => event.runtimeType == RawKeyUpEvent;
bool get isKeyUpEvent => event.runtimeType == KeyUpEvent;

bool get isMoving => isHorizontal || isVertical;

Expand Down Expand Up @@ -94,15 +96,15 @@ class PlutoKeyManagerEvent {
}

bool get isShiftPressed {
return event.isShiftPressed;
return instance.isShiftPressed;
}

bool get isCtrlPressed {
return event.isMetaPressed || event.isControlPressed;
return instance.isMetaPressed || instance.isControlPressed;
}

bool get isAltPressed {
return event.isAltPressed;
return instance.isAltPressed;
}

bool get isModifierPressed {
Expand Down
Loading