mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-23 00:52:14 +00:00
42 lines
709 B
Dart
42 lines
709 B
Dart
import 'package:flowy_sdk/protobuf/flowy-grid-data-model/grid.pb.dart';
|
|
|
|
class GridInfo {
|
|
List<Row> rows;
|
|
List<Field> fields;
|
|
|
|
GridInfo({
|
|
required this.rows,
|
|
required this.fields,
|
|
});
|
|
|
|
GridRowData rowAtIndex(int index) {
|
|
final row = rows[index];
|
|
return GridRowData(
|
|
row: row,
|
|
fields: fields,
|
|
cellMap: row.cellByFieldId,
|
|
);
|
|
}
|
|
|
|
int numberOfRows() {
|
|
return rows.length;
|
|
}
|
|
}
|
|
|
|
class GridRowData {
|
|
Row row;
|
|
List<Field> fields;
|
|
Map<String, Cell> cellMap;
|
|
GridRowData({
|
|
required this.row,
|
|
required this.fields,
|
|
required this.cellMap,
|
|
});
|
|
}
|
|
|
|
class GridColumnData {
|
|
final List<Field> fields;
|
|
|
|
GridColumnData({required this.fields});
|
|
}
|