Configuration

Search for a command to run...

No comments yet. Be the first to comment.
PlutoGrid is a data grid. It is a Flutter package that allows you to easily edit large amounts of data with the keyboard. It can be used on any platform supported by Flutter.
After setting columns and rows in the constructor of PlutoGrid, how to add columns and rows during runtime and precautions are described. Setting up columns and rows when creating a grid PlutoGrid can set columns and rows in the constructor when crea...
A unique id can be set for PlutoMenuItem. PlutoMenuItem( id: 'unique_id', title: 'Menu 1', ) If PlutoMenuItem is created in build method, you should set a unique id for PlutoMenuItem.Otherwise, when PlutoMenuBar is rebuilt, incorrect actions suc...

The default ScrollBehavior.dragDevices of PlutoGrid is as follows.(dragDevices is a setting that allows scrolling by dragging to the set pointer type.) // In case of Mobile { PointerDeviceKind.touch, PointerDeviceKind.stylus, PointerDeviceKind....

Example code to add custom widget to PlutoMenuBar.

PlutoGrid has default shortcut keys set, and users can change or set shortcut keys. Shortcut Range The scope of the shortcut depends on the focus. PlutoGrid : In the state that TextField is not focused. You can set custom shortcut keys. TextField :...

PlutoLayout is a Flutter package for configuring layouts such as CMS or admin service.You can configure tab views or menus on the top, bottom, left, and right sides.It also supports keyboard shortcuts and allows you to toggle or resize the tab view. ...

When creating a PlutoGrid, you can change the grid settings by passing PlutoGridConfiguration to the configuration property.
child: PlutoGrid(
columns: columns,
rows: rows,
configuration: const PlutoGridConfiguration(),
),
After a value is selected in the date, time, or selection type popup, the current cell position of the grid is moved down after the popup is closed.

If the value is set to true, if you press the direction key once more after reaching the end of the left and right text in the edit state, the current cell moves in the entered direction.
If the value is set to false, the current cell cannot be moved with the left and right arrow keys in the editing state.
If the cell is not in edit state, the current cell can be moved left or right regardless of this value.
Sets the behavior of the Enter key when the current cell is selected.
PlutoEnterKeyAction.editingAndMoveDown switches the current cell to the edit state when the enter key is pressed if the current cell is not in the edit state.PlutoEnterKeyAction.editingAndMoveRight converts the current cell to the edit state when the enter key is pressed if the current cell is not in the edit state.PlutoEnterKeyAction.toggleEditing toggles the editing status of the current cell when the Enter key is pressed, and does not move the current cell position.PlutoGridEnterKeyAction.none does not perform any action when the enter key is pressed.This is the style setting for PlutoGrid.
configuration: const PlutoGridConfiguration(
style: PlutoGridStyleConfig(
enableGridBorderShadow: true,
),
),
enableGridBorderShadow enables shadowing on the grid's borders.
enableColumnBorderVertical enables vertical dividing borders between columns.
enableColumnBorderHorizontal enables horizontal borders for columns.
enableCellBorderVertical enables cell-to-cell vertical separator borders.
enableCellBorderHorizontal enables horizontal boarding of cells.
enableRowColorAnimation enables the animation effect of the background color of a row when the current row position is moved.
gridBackgroundColor sets the background color of the grid.
rowColor sets the background color of the row.
oddRowColor sets the background color of the odd-numbered row.
evenRowColor sets the background color of the even-numbered row.
activatedColor sets the background color of the currently focused row or cell.
checkedColor sets the background color of the selected row.
cellColorInEditState sets the background color of the cell when the cell is in edit state.
cellColorInReadOnlyState sets the background color when the cell is in the edit state and the cell is a read-only cell.(PlutoColumn.readonly)
dragTargetColumnColor sets the background color of the column to be dragged when the column is moved by dragging it.
If it is impossible to move to the position of the column that is the drag target, the background color of the column of the drag target does not change.
(In the case of a fixed column, if the overall width is narrow, the position is limited)
iconColor sets the color of the icon used by default inside the grid.
disabledIconColor sets the color of the icon's disabled state.
menuBackgroundColor sets the background color of the menu popup on the right side of the column.
gridBorderColor sets the border color of the grid.
borderColor sets the border color of columns, column groups, cells, and rows.
activatedBorderColor sets the border color when a row or cell receives focus.
inactivatedBorderColor sets the border color when a row or cell loses focus.
iconSize sets the size of the icon used by default inside the grid.
rowHeight sets the height of the row.
columnHeight sets the height of the column.
columnFilterHeight sets the height of the column filter.
defaultColumnTitlePadding sets the padding of the column title area.
defaultColumnFilterPadding sets the padding of the column filter area.
defaultCellPadding sets the padding of the cell.
columnTextStyle sets the text style of the column.
cellTextStyle sets the text style of the cell.
columnContextIcon sets the menu icon to the right of the column title.
columnResizeIcon sets the resize icon to the right of the column title. (In case PlutoColumn.enableContextMenu is false.)
gridBorderRadius sets the border radius of the grid.
gridPopupBorderRadius sets the border radius of the popup inside the grid.
It is the horizontal and vertical scroll bar setting of the grid.
configuration: PlutoGridConfiguration(
scrollbar: const PlutoGridScrollbarConfig(
isAlwaysShown: false,
scrollbarThickness: 8,
scrollbarThicknessWhileDragging: 10,
),
),
draggableScrollbar is whether the scrollbar can be scrolled by dragging it.
isAlwaysShown determines whether the scrollbar will remain visible.
scrollbarRadius sets the radius of the scrollbar.
scrollbarRadiusWhileDragging sets the radius while dragging the scrollbar.
scrollbarThickness sets the thickness of the scrollbar.
scrollbarThicknessWhileDragging sets the thickness when the scrollbar is being dragged.
This is the filter setting for the column.
If you press F3 while the cell is in focus, the focus is moved to the filter input box of the column of the current cell.
If you press the F3 key again in the filter input box, a filtering pop-up is called where you can set the entire filtering.
If you press ESC in the filter input box, it will return to the previous cell position.
If you enter the arrow down key in the filter input box, it moves to the first cell of the column.

configuration: const PlutoGridConfiguration(
columnFilter: PlutoGridColumnFilterConfig(),
),
The built-in column filters are set in the FilterHelper.defaultFilters static property.
If no columnFilter is set, a default filter is provided.
PlutoFilterTypeContains checks whether the filter input value is included in the values of the cells of the corresponding column.RegExp : /filter input value/
PlutoFilterTypeEquals checks whether the filter input value matches the values of the cells of the corresponding column.RegExp : /^Filter input value$/
PlutoFilterTypeStartsWith checks whether the filter input value matches the value of the cells in the corresponding column.RegExp : /^Filter input value/
PlutoFilterTypeEndsWith means that the filter input value is the cell of the corresponding column.RegExp : /Filter input value$/
PlutoFilterTypeGreaterThan checks whether the filter input value is greater than the value of the cells in the corresponding column.
According to the definition of the PlutoColumn.type.compare function.
PlutoFilterTypeGreaterThanOrEqualTo checks whether the filter input value is greater than or equal to the value of the cells in the corresponding column.
According to the definition of the PlutoColumn.type.compare function.
PlutoFilterTypeLessThan checks whether the filter input value is less than the value of the cells of the corresponding column.
According to the definition of the PlutoColumn.type.compare function.
PlutoFilterTypeLessThanOrEqualTo checks whether the filter input value is less than or equal to the value of the cells of the corresponding column.
According to the definition of the PlutoColumn.type.compare function.
The example code below applies different filters depending on the PlutoColumn.field .
columnFilter: PlutoGridColumnFilterConfig(
filters: const [
...FilterHelper.defaultFilters,
// custom filter
ClassYouImplemented(),
],
resolveDefaultColumnFilter: (column, resolver) {
if (column.field == 'text') {
return resolver<PlutoFilterTypeContains>() as PlutoFilterType;
} else if (column.field == 'number') {
return resolver<PlutoFilterTypeGreaterThan>()
as PlutoFilterType;
} else if (column.field == 'date') {
return resolver<PlutoFilterTypeLessThan>() as PlutoFilterType;
} else if (column.field == 'select') {
return resolver<ClassYouImplemented>() as PlutoFilterType;
}
return resolver<PlutoFilterTypeContains>() as PlutoFilterType;
},),
class ClassYouImplemented implements PlutoFilterType {
@override
String get title => 'Custom contains';
@override
get compare => ({
required String? base,
required String? search,
required PlutoColumn? column,
}) {
var keys = search!.split(',').map((e) => e.toUpperCase()).toList();
return keys.contains(base!.toUpperCase());
};
const ClassYouImplemented();
}
The ClassYouImplemented class that implements PlutoFilterType filters whether multiple options are included by separating the filter input value with , in case of a select type column.
If the column has the select option ['one', 'two', 'three']
If you enter the filter input value as one, two, cases containing one or two will be filtered.
You can change the column width automatically or set the column width adjustment condition.
configuration: const PlutoGridConfiguration(
columnSize: PlutoGridColumnSizeConfig(),
),
Automatically change the width of a column in situations such as when the grid starts or the width of the grid changes.
If the total width of the grid is insufficient and all columns reach the minimum width, horizontal scrolling may occur because the total width of the column becomes larger than the entire grid.
If autoSizeMode is applied in a state other than none, if resizeMode is also applied as PlutoResizeMode.pushAndPull, the width of columns can be changed not to exceed the total width of the grid.
PlutoAutoSizeMode.none disables auto change of width.
PlutoAutoSizeMode.equal changes all columns to the same width.
PlutoAutoSizeMode.scale changes the column width proportionally according to the current width of each column.
In autoSizeMode, there is an option to set whether autoSizeMode is applied again according to the state of a column being moved, hidden or unhidden, etc.
restoreAutoSizeAfterHideColumn determines whether autoSizeMode is reapplied after a column is hidden or unhidden.
restoreAutoSizeAfterFrozenColumn determines whether autoSizeMode is reapplied after the column's frozen state is changed.
restoreAutoSizeAfterMoveColumn determines whether autoSizeMode is reapplied after a column is moved.
restoreAutoSizeAfterInsertColumn determines whether autoSizeMode is applied again after a new column is added.
restoreAutoSizeAfterRemoveColumn determines whether autoSizeMode is reapplied after a column is deleted.
Set the condition to change the width of the column.
PlutoResizeMode.none disables changing the column width.
In PlutoResizeMode.normal, when the width of a column is changed, only the width of the corresponding column is changed.
In this case, the overall scroll width of the grid is also widened or narrowed.

PlutoResizeMode.pushAndPull operates to change the width of the corresponding column within the entire grid width, and to widen or narrow the width of the surrounding columns by that much.

Change the language of the characters used inside the grid. If the value is not set, it is set to English.
English PlutoGridLocaleText()
Chinese PlutoGridLocaleText.china()
Korean PlutoGridLocaleText.korean()
Russian PlutoGridLocaleText.russian()
Czech PlutoGridLocaleText.czech()
brazilianPortuguese PlutoGridLocaleText.brazilianPortuguese()
Spanish PlutoGridLocaleText.spanish()
Persian PlutoGridLocaleText.persian()
Arabic PlutoGridLocaleText.arabic()
configuration: const PlutoGridConfiguration(
localeText: PlutoGridLocaleText(
unfreezeColumn: 'Unpin column',
freezeColumnToStart: 'Pin column to left',
),
),