Skip to content

[syncfusion_flutter_datagrid] Set custom TextStyle for headers and cells #973

@Alyxsqrd

Description

@Alyxsqrd

This internal function _getDefaultTextStyle in ColumnSizer has hardcoded TextStyles. Please allow us to change/customize these values so I can replace the default font family. ☹️

TextStyle _getDefaultTextStyle(
    DataGridConfiguration dataGridConfiguration, bool isHeader) {
  if (isHeader) {
    return TextStyle(
        fontFamily: 'Roboto',
        fontWeight: FontWeight.w500,
        fontSize: 14,
        color:
            dataGridConfiguration.colorScheme!.onSurface.withOpacity(0.87));
  } else {
    return TextStyle(
        fontFamily: 'Roboto',
        fontWeight: FontWeight.w400,
        fontSize: 14,
        color:
            dataGridConfiguration.colorScheme!.onSurface.withOpacity(0.87));
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions