Skip to content

Conversation

@darrenaustin
Copy link
Contributor

@darrenaustin darrenaustin commented Mar 9, 2021

This PR removes the PaginatedDataTable widget's accentColor dependency per #56918.

The reference in question was used to set the '# items selected' text color when selection is supported.

Breaking change

This is a breaking change, although most apps will not notice the change from theme.accentColor to theme.colorScheme.secondary, because they are typically the same color. For apps that do need a
specific color for the item selection text, you can wrap your PaginatedDataTable with something like:

final ThemeData theme = Theme.of(context);
...
Theme(
  data: theme.copyWith(colorScheme: theme.colorScheme.copyWith(secondary: Colors.red)),
  child: PaginatedDataTable(
    ...
  ),
),

Which will force the selected items header text color red.

A new test was added to verify the selected text header used the secondary color.

This PR was tested against internal Google apps in cl/360773810

@darrenaustin darrenaustin added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Mar 9, 2021
@darrenaustin darrenaustin requested a review from HansMuller March 9, 2021 21:55
@google-cla google-cla bot added the cla: yes label Mar 9, 2021
Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fluttergithubbot fluttergithubbot merged commit 07e0448 into flutter:master Mar 10, 2021
@darrenaustin darrenaustin deleted the accent_paginated_data_table branch April 26, 2021 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants