Skip to content

Inconsistent text color on DataTable in different platforms #114470

@brainwo

Description

@brainwo

Steps to Reproduce

  • Make a DataTable
  • Set the headingTextStyle to const TextStyle()
  • Run on Linux and Web
  • Shows different result

Expected results: Same color across all the platform

Actual results: Web has a black color, Linux has a white color on headingTextStyle and both does not respecting the platform Brightness.

Code sample
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({key}) : super(key: key);

  @override
  build(context) {
    return MaterialApp(
      theme: ThemeData(),
      darkTheme: ThemeData.dark(),
      home: Scaffold(
        body: Center(
          child: DataTable(
            headingTextStyle: const TextStyle(),
            columns: const <DataColumn>[
              DataColumn(label: Text("Header")),
            ],
            rows: const <DataRow>[
              DataRow(cells: [
                DataCell(Text("Data")),
              ])
            ],
          ),
        ),
      ),
    );
  }
}

Screenshot of the output:
Web light mode
image

Web dark mode
image

Linux light mode
image

Linux dark mode
image

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listf: material designflutter/packages/flutter/material repository.found in release: 3.3Found to occur in 3.3found in release: 3.5Found to occur in 3.5frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions