Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for [Bug] PlutoGrid Unexpected null value #88 #106

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
45 changes: 22 additions & 23 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -170,29 +170,28 @@ class _PlutoGridExamplePageState extends State<PlutoGridExamplePage> {
body: Container(
padding: const EdgeInsets.all(15),
child: PlutoGrid(
columns: columns,
rows: rows,
columnGroups: columnGroups,
onLoaded: (PlutoGridOnLoadedEvent event) {
stateManager = event.stateManager;
stateManager.setShowColumnFilter(true);
},
onChanged: (PlutoGridOnChangedEvent event) {
print(event);
},
configuration: const PlutoGridConfiguration(),
selectDateCallback: (PlutoCell cell, PlutoColumn column) async {
return showDatePicker(
context: context,
initialDate: PlutoDateTimeHelper.parseOrNullWithFormat(
cell.value,
column.type.date.format,
) ?? DateTime.now(),
firstDate: column.type.date.startDate ?? DateTime(0),
lastDate: column.type.date.endDate ?? DateTime(9999)
);
}
),
columns: columns,
rows: rows,
columnGroups: columnGroups,
onLoaded: (PlutoGridOnLoadedEvent event) {
stateManager = event.stateManager;
stateManager.setShowColumnFilter(true);
},
onChanged: (PlutoGridOnChangedEvent event) {
print(event);
},
configuration: const PlutoGridConfiguration(),
selectDateCallback: (PlutoCell cell, PlutoColumn column) async {
return showDatePicker(
context: context,
initialDate: PlutoDateTimeHelper.parseOrNullWithFormat(
cell.value,
column.type.date.format,
) ??
DateTime.now(),
firstDate: column.type.date.startDate ?? DateTime(0),
lastDate: column.type.date.endDate ?? DateTime(9999));
}),
),
);
}
Expand Down
3 changes: 2 additions & 1 deletion lib/src/manager/event/pluto_grid_row_hover_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class PlutoGridRowHoverEvent extends PlutoGridEvent {

@override
void handler(PlutoGridStateManager stateManager) {
bool enableRowHoverColor = stateManager.configuration.style.enableRowHoverColor;
bool enableRowHoverColor =
stateManager.configuration.style.enableRowHoverColor;

// only change current hovered row index
// if row hover color effect is enabled
Expand Down
Loading
Loading