Skip to content

Conversation

@TahaTesser
Copy link
Member

@TahaTesser TahaTesser commented Jun 9, 2023

fixes #128569

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

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

class ListTileApp extends StatelessWidget {
  const ListTileApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        useMaterial3: true,
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.red).copyWith(
          onSurface: Colors.yellow,
          onSurfaceVariant: Colors.green,
        ),
      ),
      home: const Scaffold(
        body: Center(
          child: ListTile(
            title: Text('title'),
            subtitle: Text('subtitle'),
          ),
        ),
      ),
    );
  }
}

Description

M3 ListTile couldn't be customized using ColorScheme colors.

  • This PR updates the list tile text defaults to ColorScheme text color tokens.
  • Improved the ListTile template to use the token group.
  • Update docs and tests.
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.red).copyWith(
          onSurface: Colors.yellow,
          onSurfaceVariant: Colors.green,
        ),

Before

Screenshot 2023-06-09 at 17 47 04

After

Screenshot 2023-06-09 at 17 46 17

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels Jun 9, 2023
Copy link
Member

@guidezpl guidezpl left a comment

Choose a reason for hiding this comment

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

I was just about to file an issue for this and found this PR... you're amazing

  _    ___ _____ __  __ 
 | |  / __|_   _|  \/  |
 | |_| (_ | | | | |\/| |
 |____\___| |_| |_|  |_|
                        

@TahaTesser TahaTesser marked this pull request as ready for review June 9, 2023 15:17
@TahaTesser TahaTesser added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 9, 2023
@TahaTesser TahaTesser force-pushed the update_m3_text_color_defaults branch from a8183ee to 120acd0 Compare June 9, 2023 17:27
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 10, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Jun 10, 2023

auto label is removed for flutter/flutter, pr: 128581, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@TahaTesser TahaTesser force-pushed the update_m3_text_color_defaults branch from 120acd0 to 00fce9f Compare June 12, 2023 07:12
@TahaTesser TahaTesser added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 12, 2023
@auto-submit auto-submit bot merged commit ca5aa23 into flutter:master Jun 12, 2023
@TahaTesser TahaTesser deleted the update_m3_text_color_defaults branch June 12, 2023 14:53
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 12, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 12, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jun 12, 2023
flutter/flutter@3df163f...353b8bc

2023-06-12 [email protected] Roll Packages from afe2f05 to c9865e8 (6 revisions) (flutter/flutter#128701)
2023-06-12 [email protected] Fix RangeSlider notifies start and end twice when participates in gesture arena (flutter/flutter#128674)
2023-06-12 [email protected] Address leak tracker breaking changes. (flutter/flutter#128623)
2023-06-12 [email protected] Update `ListTile` text defaults to use `ColorScheme` (flutter/flutter#128581)
2023-06-12 [email protected] Roll Flutter Engine from effea50196ca to 4b022f4e871f (2 revisions) (flutter/flutter#128683)
2023-06-12 [email protected] Roll Flutter Engine from 9bb0a5907403 to effea50196ca (1 revision) (flutter/flutter#128678)
2023-06-11 [email protected] Roll Flutter Engine from 788437e41ee0 to 9bb0a5907403 (1 revision) (flutter/flutter#128673)
2023-06-11 [email protected] Roll Flutter Engine from 5da44b9aafdd to 788437e41ee0 (2 revisions) (flutter/flutter#128672)
2023-06-11 [email protected] Roll Flutter Engine from 6e2c71adccad to 5da44b9aafdd (1 revision) (flutter/flutter#128669)
2023-06-11 [email protected] Roll Flutter Engine from 1cca9cc6dbd1 to 6e2c71adccad (1 revision) (flutter/flutter#128662)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App c: contributor-productivity Team-specific productivity, code health, technical debt. 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.

Subtitle's color in ListTile doesn't match M3 specs.

2 participants