bosskmk / pluto_grid

PlutoGrid is a dataGrid for flutter that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS.

Home Page:https://pluto.weblaze.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The horizontal line is disappeared when web render is html

stoneLee81 opened this issue · comments

web render is html, the horizontal line is disappeared
image

web render is canvaskit, the h-line is okey
image

code is
`import 'package:flutter/material.dart';
import 'package:pluto_grid/pluto_grid.dart';

class ColumnFreezingScreen extends StatefulWidget {
static const routeName = 'feature/column-freezing';

const ColumnFreezingScreen({Key? key}) : super(key: key);

@OverRide
_ColumnFreezingScreenState createState() => _ColumnFreezingScreenState();
}

class _ColumnFreezingScreenState extends State {
final List columns = [];

final List rows = [];

@OverRide
void initState() {
super.initState();
columns.addAll(_hcells());
rows.addAll(_rcells());
}

List _rcells() {
List _list = List.empty(growable: true);

for(int i=1;i<10;i++) {
_list.add(PlutoRow(cells: {
'customer_name': PlutoCell(value: ''),
'customer_mobileno': PlutoCell(value: ''),
'license_plate': PlutoCell(value: ''),
'assign_to': PlutoCell(value: ''),
'car_mode': PlutoCell(value: ''),
'customer_grade': PlutoCell(value: ""),
'customer_source_from':PlutoCell(value: ""),
'followup_time':PlutoCell(value: ''),
'previous_followup':PlutoCell(value: ''),
'next_followup':PlutoCell(value: ''),
'leave_date_day':PlutoCell(value: ""),
'leave_date':PlutoCell(value: ''),
'number_of_comsume':PlutoCell(value: ''),
'operslog':PlutoCell(value: ''),
'dep':PlutoCell(value: ''),
'create_date':PlutoCell(value: ''),
}));
}

return _list;

}

List _hcells() {
List _list = List.empty(growable: true);

_list.add(PlutoColumn(title: 'customer_name', field: 'customer_name', width:130, type:PlutoColumnType.text(), frozen: PlutoColumnFrozen.start));
_list.add(PlutoColumn(title: 'customer_mobileno', field: 'customer_mobileno', type:PlutoColumnType.text(),width:130));
_list.add(PlutoColumn(title: 'license_plate', field: 'license_plate', type:PlutoColumnType.text(),));
_list.add(PlutoColumn(title: 'assign_to', field: 'assign_to', width: 100, type:PlutoColumnType.text(),));
_list.add(PlutoColumn(title: 'car_mode', field: 'car_mode', type:PlutoColumnType.text(),));
_list.add(PlutoColumn(title: 'customer_grade', field: 'customer_grade', width: 120, type:PlutoColumnType.text(),));
_list.add(PlutoColumn(title: 'customer_source_from', field: 'customer_source_from', width:120, type:PlutoColumnType.text(),));
_list.add(PlutoColumn(title: 'followup_time', field: 'followup_time', type: PlutoColumnType.text(), width:320, enableSorting: true,enableContextMenu: false, enableDropToResize: false)); 
_list.add(PlutoColumn(title: 'previous_followup', field: 'previous_followup', textAlign:PlutoColumnTextAlign.center, titleTextAlign:PlutoColumnTextAlign.center, type: PlutoColumnType.date(format: 'yyyy-MM-dd HH:mm'), width:160));
_list.add(PlutoColumn(title: 'next_followup', field: 'next_followup', textAlign:PlutoColumnTextAlign.center, titleTextAlign:PlutoColumnTextAlign.center, type: PlutoColumnType.date(format: 'yyyy-MM-dd HH:mm'), width:160));

_list.add(PlutoColumn(title: 'leave_date_day', field: 'leave_date_day',type:PlutoColumnType.text(), textAlign:PlutoColumnTextAlign.right, titleTextAlign:PlutoColumnTextAlign.right, width:100));
_list.add(PlutoColumn(title: 'leave_date', field: 'leave_date', type:PlutoColumnType.text(),textAlign:PlutoColumnTextAlign.center, titleTextAlign:PlutoColumnTextAlign.center, width:160));
_list.add(PlutoColumn(title: 'number_of_comsume', field: 'number_of_comsume', type:PlutoColumnType.text(),textAlign:PlutoColumnTextAlign.right, titleTextAlign:PlutoColumnTextAlign.right, width:100));
_list.add(PlutoColumn(title: 'operslog', field: 'operslog', type:PlutoColumnType.text(),width: 180));
_list.add(PlutoColumn(title: 'dep', field: 'dep', width: 120, type:PlutoColumnType.text(),enableSorting: true));
_list.add(PlutoColumn(title: 'create_date', field: 'create_date', width: 120,type:PlutoColumnType.text(), enableSorting:true,));

return _list;

}

@OverRide
Widget build(BuildContext context) {
return Material(child:Scaffold(body: LayoutBuilder(builder: (context, constraint) {
return Container(margin: const EdgeInsets.only(top:8), constraints: BoxConstraints(maxHeight: 1000), child: PlutoGrid(
columns: columns,
rows: rows,
onChanged: (PlutoGridOnChangedEvent event) {
print(event);
},
onLoaded: (PlutoGridOnLoadedEvent event) {
event.stateManager.setSelectingMode(PlutoGridSelectingMode.cell);
},
),
);})));
}
}
`

@bosskmk can you please try and see it's a bug to fix?

This issue is stale because it has been open for 30 days with no activity.

@stoneLee81
There is an error where horizontal lines are not rendered when in html rendering mode on the current web.
I'll see if I can fix this.

@stoneLee81
I figured out how to solve the problem.
I will update to the next version.
thank you

@stoneLee81
Fixed in Flutter version 3.4.0-28.0.pre.122.

I upgraded to latest 3.4.0-17.2.pre version, the problem still exists. @bosskmk

@stoneLee81
Does the problem occur when running in web html rendering mode after changing to flutter channel master ?
Not 3.4.0-17.2.pre version
It's 3.4.0-28.0.pre.122

@stoneLee81 Does the problem occur when running in web html rendering mode after changing to flutter channel master ? Not 3.4.0-17.2.pre version It's 3.4.0-28.0.pre.122

okay, wait for beta version, i will test it.