Taha Tesser
ca5aa2329a
Update ListTile text defaults to use ColorScheme (#128581)
fixes https://github.com/flutter/flutter/issues/128569
<details>
<summary>code sample</summary>
```dart
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'),
),
),
),
);
}
}
```
</details>
# 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.
```dart
colorScheme: ColorScheme.fromSeed(seedColor: Colors.red).copyWith(
onSurface: Colors.yellow,
onSurfaceVariant: Colors.green,
),
```
### Before

### After

2023-06-12 14:52:06 +00:00
..
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-03-14 17:01:13 +00:00
2023-06-09 11:28:18 +00:00
2023-04-27 09:28:11 +02:00
2023-06-09 11:28:18 +00:00
2023-03-14 17:01:13 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2022-09-29 09:12:05 -07:00
2023-06-09 11:28:18 +00:00
2023-01-12 14:22:53 +00:00
2023-02-24 06:30:33 -08:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-12 14:52:06 +00:00
2023-03-13 16:16:07 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-03-13 16:16:07 +00:00
2023-06-09 11:28:18 +00:00
2022-09-20 14:09:20 -07:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-03-14 17:01:13 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2023-03-17 10:09:49 -07:00
2023-05-11 00:03:09 +00:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00