forked from bosskmk/pluto_grid
-
Notifications
You must be signed in to change notification settings - Fork 32
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
[Bug] PlutoGrid Unexpected null value. #88
Comments
Any news on what could cause this? This could be a make or break problem for my application |
@roberto-gigli I'm looking in to it |
Its fixed.I created a PR: #106I also added I tested this with this example:import 'package:flutter/material.dart';
import 'package:pluto_grid_plus/pluto_grid_plus.dart';
import '../dummy_data/development.dart';
class EmptyScreen extends StatefulWidget {
static const routeName = 'empty';
const EmptyScreen({super.key});
@override
_EmptyScreenState createState() => _EmptyScreenState();
}
class _EmptyScreenState extends State<EmptyScreen> {
late List<PlutoColumn> columns;
late List<PlutoRow> rows;
late PlutoGridStateManager stateManager;
@override
void initState() {
super.initState();
columns = [
PlutoColumn(
title: 'column1',
field: 'column1',
type: PlutoColumnType.text(),
),
PlutoColumn(
title: 'column2',
field: 'column2',
type: PlutoColumnType.text(),
),
PlutoColumn(
title: 'column3',
field: 'column3',
type: PlutoColumnType.text(),
),
];
rows = DummyData.rowsByColumns(length: 10, columns: columns);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('PlutoGrid')),
body: PlutoGrid(
configuration:
const PlutoGridConfiguration(style: PlutoGridStyleConfig()),
columns: [
for (int i = 0; i < 30; i++)
PlutoColumn(
backgroundColor: Colors.primaries[i % Colors.primaries.length],
title: 'Column $i',
field: 'column$i',
minWidth: 100,
type: PlutoColumnType.text(),
titlePadding: EdgeInsets.zero,
),
],
rows: [
for (int i = 0; i < 5; i++)
PlutoRow(
cells: {
for (int a = 0; a < 30; a++)
'column$a': PlutoCell(value: 'Row $a'),
},
),
],
onLoaded: (event) {
for (final column in event.stateManager.columns) {
event.stateManager.autoFitColumn(context, column);
}
},
),
);
}
} |
Bezig.met.opnemen.2024-12-06.181151.mp4 |
stan-at-work
added a commit
to stan-at-work/pluto_grid_plus
that referenced
this issue
Dec 6, 2024
This issue is stale because it has been open for 30 days with no activity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce the bug
Expected results
Scroll horizontally
Actual results
Columns are no longer displayed and whole app does not work until restarted
Code sample
Execution Environment
Flutter version
3.19.6
PlutoGrid version
8.4.0
OS
Windows 11 23H2
Web, Edge 130.0.2849.52
Video
Progetto.video.2.mp4
Logs
The text was updated successfully, but these errors were encountered: