Steps to reproduce the bug
- Use the new version of Flutter: version 3.27.3
- Start writing in a selected cell of PlutoGrid without clicking first. (For example, write: "hello")
- Press enter.
Expected results
All typed characters should be saved in the cell. (For example, "hello")
Actual results
The first character is always trimmed. (For example, "ello")
Code sample
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:pluto_grid/pluto_grid.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'PlutoGrid Example',
home: Scaffold(
appBar: AppBar(title: const Text('PlutoGrid Example')),
body: const SimplePlutoGrid(),
),
);
}
}
class SimplePlutoGrid extends StatelessWidget {
const SimplePlutoGrid({super.key});
@override
Widget build(BuildContext context) {
// Define the columns for the grid
final List<PlutoColumn> columns = [
PlutoColumn(
title: 'ID',
field: 'id',
minWidth: 40,
width: 40,
enableContextMenu: false,
enableDropToResize: false,
type: PlutoColumnType.number(),
),
PlutoColumn(
title: 'Name',
field: 'name',
type: PlutoColumnType.text(),
),
PlutoColumn(
title: 'Age',
field: 'age',
type: PlutoColumnType.number(),
),
];
// Define the rows for the grid
final List<PlutoRow> rows = [
PlutoRow(cells: {
'id': PlutoCell(value: 1),
'name': PlutoCell(value: 'Alice'),
'age': PlutoCell(value: 25),
}),
PlutoRow(cells: {
'id': PlutoCell(value: 2),
'name': PlutoCell(value: 'Bob'),
'age': PlutoCell(value: 30),
}),
PlutoRow(cells: {
'id': PlutoCell(value: 3),
'name': PlutoCell(value: 'Charlie'),
'age': PlutoCell(value: 35),
}),
];
return PlutoGrid(
columns: columns,
rows: rows,
);
}
}
Execution Environment
Flutter version
Flutter version is 3.27.3
Old version 3.24 was working correctly.
PlutoGrid version
PlutoGrid version is 8.4.3
OS
Windows 11
Steps to reproduce the bug
Expected results
All typed characters should be saved in the cell. (For example, "hello")
Actual results
The first character is always trimmed. (For example, "ello")
Code sample
Execution Environment
Flutter version
Flutter version is 3.27.3
Old version 3.24 was working correctly.
PlutoGrid version
PlutoGrid version is 8.4.3
OS
Windows 11