Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 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
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
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
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
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
1 change: 1 addition & 0 deletions demo/linux/flutter/ephemeral/.plugin_symlinks/printing
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
2 changes: 1 addition & 1 deletion lib/src/manager/pluto_grid_state_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier
/// stateManager.refRows.addAll(FilteredList(initialList: value));
/// stateManager.notifyListeners();
/// });
/// {@endtemplate}
/// ```
/// {@endtemplate}
class PlutoGridStateManager extends PlutoGridStateChangeNotifier {
PlutoGridStateManager({
required super.columns,
Expand Down
4 changes: 2 additions & 2 deletions lib/src/manager/state/column_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,12 @@ mixin ColumnState implements IPlutoGridState {

@override
PlutoColumn? get currentColumn {
return currentCell == null ? null : currentCell!.column;
return currentCell?.column;
}

@override
String? get currentColumnField {
return currentCell == null ? null : currentCell!.column.field;
return currentCell?.column.field;
}

@override
Expand Down
4 changes: 1 addition & 3 deletions lib/src/plugin/pluto_lazy_pagination.dart
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,7 @@ class _PaginationWidgetState extends State<_PaginationWidget> {
? SystemMouseCursors.basic
: SystemMouseCursors.click,
),
..._pageNumbers
.map(_makeNumberButton)
.toList(growable: false),
..._pageNumbers.map(_makeNumberButton),
IconButton(
onPressed: _isLastPage ? null : _nextPage,
icon: const Icon(Icons.navigate_next),
Expand Down
4 changes: 1 addition & 3 deletions lib/src/plugin/pluto_pagination.dart
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,7 @@ class PlutoPaginationState extends _PlutoPaginationStateWithChange {
? SystemMouseCursors.basic
: SystemMouseCursors.click,
),
..._pageNumbers
.map(_makeNumberButton)
.toList(growable: false),
..._pageNumbers.map(_makeNumberButton),
IconButton(
onPressed: _isLastPage ? null : _nextPage,
icon: const Icon(Icons.navigate_next),
Expand Down
8 changes: 4 additions & 4 deletions lib/src/pluto_dual_grid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ class PlutoDualGrid extends StatefulWidget {
this.onSelected,
this.display,
this.divider = const PlutoDualGridDivider(),
Key? key,
}) : super(key: key);
super.key,
});

static const double dividerWidth = 10;

Expand Down Expand Up @@ -262,8 +262,8 @@ class PlutoDualGridDividerWidget extends StatefulWidget {
required this.indicatorColor,
required this.draggingColor,
required this.dragCallback,
Key? key,
}) : super(key: key);
super.key,
});

@override
State<PlutoDualGridDividerWidget> createState() =>
Expand Down
19 changes: 9 additions & 10 deletions lib/src/pluto_grid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ typedef PlutoRowLeftFloatingWidgetCallback = Widget? Function(
/// Also, the popup to set the filter or column inside the grid is implemented through the setting of [PlutoGrid].
class PlutoGrid extends PlutoStatefulWidget {
const PlutoGrid({
Key? key,
super.key,
required this.columns,
required this.rows,
this.columnGroups,
Expand All @@ -93,7 +93,7 @@ class PlutoGrid extends PlutoStatefulWidget {
this.notifierFilterResolver,
this.mode = PlutoGridMode.normal,
this.customShortcutEvent,
}) : super(key: key);
});

/// {@template pluto_grid_property_columns}
/// The [PlutoColumn] column is delivered as a list and can be added or deleted after grid creation.
Expand Down Expand Up @@ -1266,8 +1266,7 @@ class _GridContainer extends StatelessWidget {
const _GridContainer({
required this.stateManager,
required this.child,
Key? key,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -1432,17 +1431,17 @@ abstract class PlutoGridOnRowCheckedEvent {
/// Argument of [PlutoGrid.onRowChecked] callback when the checkbox of the row is tapped.
class PlutoGridOnRowCheckedOneEvent extends PlutoGridOnRowCheckedEvent {
const PlutoGridOnRowCheckedOneEvent({
required PlutoRow row,
required int rowIdx,
required bool? isChecked,
}) : super(row: row, rowIdx: rowIdx, isChecked: isChecked);
required PlutoRow super.row,
required int super.rowIdx,
required super.isChecked,
});
}

/// Argument of [PlutoGrid.onRowChecked] callback when all checkboxes of the column are tapped.
class PlutoGridOnRowCheckedAllEvent extends PlutoGridOnRowCheckedEvent {
const PlutoGridOnRowCheckedAllEvent({
bool? isChecked,
}) : super(row: null, rowIdx: null, isChecked: isChecked);
super.isChecked,
}) : super(row: null, rowIdx: null);
}

/// The argument of the [PlutoGrid.onRowDoubleTap] callback
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/cells/pluto_currency_cell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class PlutoCurrencyCell extends StatefulWidget implements TextCell {
required this.cell,
required this.column,
required this.row,
Key? key,
}) : super(key: key);
super.key,
});

@override
PlutoCurrencyCellState createState() => PlutoCurrencyCellState();
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/cells/pluto_date_cell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class PlutoDateCell extends StatefulWidget implements PopupCell {
required this.cell,
required this.column,
required this.row,
Key? key,
}) : super(key: key);
super.key,
});

@override
PlutoDateCellState createState() => PlutoDateCellState();
Expand Down
10 changes: 4 additions & 6 deletions lib/src/ui/cells/pluto_default_cell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class PlutoDefaultCell extends PlutoStatefulWidget {
required this.rowIdx,
required this.row,
required this.stateManager,
Key? key,
}) : super(key: key);
super.key,
});

@override
State<PlutoDefaultCell> createState() => _PlutoDefaultCellState();
Expand Down Expand Up @@ -219,8 +219,7 @@ class _RowDragIconWidget extends StatelessWidget {
required this.stateManager,
required this.dragIcon,
required this.feedbackWidget,
Key? key,
}) : super(key: key);
});

List<PlutoRow> get _draggingRows {
if (stateManager.currentSelectingRows.isEmpty) {
Expand Down Expand Up @@ -422,8 +421,7 @@ class _DefaultCellWidget extends StatelessWidget {
required this.row,
required this.column,
required this.cell,
Key? key,
}) : super(key: key);
});

bool get _showText {
if (!stateManager.enabledRowGroups) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/cells/pluto_number_cell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class PlutoNumberCell extends StatefulWidget implements TextCell {
required this.cell,
required this.column,
required this.row,
Key? key,
}) : super(key: key);
super.key,
});

@override
PlutoNumberCellState createState() => PlutoNumberCellState();
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/cells/pluto_select_cell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class PlutoSelectCell extends StatefulWidget implements PopupCell {
required this.cell,
required this.column,
required this.row,
Key? key,
}) : super(key: key);
super.key,
});

@override
PlutoSelectCellState createState() => PlutoSelectCellState();
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/cells/pluto_text_cell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class PlutoTextCell extends StatefulWidget implements TextCell {
required this.cell,
required this.column,
required this.row,
Key? key,
}) : super(key: key);
super.key,
});

@override
PlutoTextCellState createState() => PlutoTextCellState();
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/cells/pluto_time_cell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class PlutoTimeCell extends StatefulWidget implements PopupCell {
required this.cell,
required this.column,
required this.row,
Key? key,
}) : super(key: key);
super.key,
});

@override
PlutoTimeCellState createState() => PlutoTimeCellState();
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/cells/popup_cell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ abstract class PopupCell extends StatefulWidget {
required this.cell,
required this.column,
required this.row,
Key? key,
}) : super(key: key);
super.key,
});
}

abstract class GridPopupProps {
Expand Down
Loading
Loading