In this article, we will show you how to disable the hover color for the header cell in a Flutter DataTable.
Initialize the SfDataGrid widget with all the required properties. You can change the appearance of the grid using SfDataGridThemeData in the SfDataGridTheme. The DataGrid should be wrapped inside the SfDataGridTheme. To restrict the hover color of header cells, set the header hover color to transparent using SfDataGridThemeData.headerHoverColor.
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Syncfusion Flutter DataGrid'),
),
body: SfDataGridTheme(
data: SfDataGridThemeData(headerHoverColor: Colors.transparent),
child: SfDataGrid( ),
),
);
}
You can download this example on GitHub.