Unverified Commit 1aabe314 authored by Rami's avatar Rami Committed by GitHub

[Material 3] Update TextTheme to have M3 names for styles (#93725)

parent bb906b6b
...@@ -373,17 +373,19 @@ void main() { ...@@ -373,17 +373,19 @@ void main() {
List<TextStyle> extractStyles(TextTheme textTheme) { List<TextStyle> extractStyles(TextTheme textTheme) {
return <TextStyle>[ return <TextStyle>[
textTheme.headline1!, textTheme.displayLarge!,
textTheme.headline2!, textTheme.displayMedium!,
textTheme.headline3!, textTheme.displaySmall!,
textTheme.headline4!, textTheme.headlineLarge!,
textTheme.headline5!, textTheme.headlineMedium!,
textTheme.headline6!, textTheme.headlineSmall!,
textTheme.subtitle1!, textTheme.titleLarge!,
textTheme.bodyText1!, textTheme.titleMedium!,
textTheme.bodyText2!, textTheme.bodyLarge!,
textTheme.caption!, textTheme.bodyMedium!,
textTheme.button!, textTheme.bodySmall!,
textTheme.labelLarge!,
textTheme.labelMedium!,
]; ];
} }
...@@ -408,7 +410,7 @@ void main() { ...@@ -408,7 +410,7 @@ void main() {
} }
} }
expect(theme.textTheme.headline1!.debugLabel, '(englishLike display4 2014).merge(blackMountainView headline1)'); expect(theme.textTheme.displayLarge!.debugLabel, '(englishLike displayLarge 2014).merge(blackMountainView displayLarge)');
}); });
group('Cupertino theme', () { group('Cupertino theme', () {
......
...@@ -584,7 +584,7 @@ void main() { ...@@ -584,7 +584,7 @@ void main() {
expect(textStyle.color, Colors.white); expect(textStyle.color, Colors.white);
expect(textStyle.fontFamily, 'Roboto'); expect(textStyle.fontFamily, 'Roboto');
expect(textStyle.decoration, TextDecoration.none); expect(textStyle.decoration, TextDecoration.none);
expect(textStyle.debugLabel, '((englishLike body1 2014).merge(blackMountainView bodyText2)).copyWith'); expect(textStyle.debugLabel, '((englishLike bodyMedium 2014).merge(blackMountainView bodyMedium)).copyWith');
}); });
testWidgets('Default tooltip message textStyle - dark', (WidgetTester tester) async { testWidgets('Default tooltip message textStyle - dark', (WidgetTester tester) async {
...@@ -610,7 +610,7 @@ void main() { ...@@ -610,7 +610,7 @@ void main() {
expect(textStyle.color, Colors.black); expect(textStyle.color, Colors.black);
expect(textStyle.fontFamily, 'Roboto'); expect(textStyle.fontFamily, 'Roboto');
expect(textStyle.decoration, TextDecoration.none); expect(textStyle.decoration, TextDecoration.none);
expect(textStyle.debugLabel, '((englishLike body1 2014).merge(whiteMountainView bodyText2)).copyWith'); expect(textStyle.debugLabel, '((englishLike bodyMedium 2014).merge(whiteMountainView bodyMedium)).copyWith');
}); });
testWidgets('Custom tooltip message textStyle', (WidgetTester tester) async { testWidgets('Custom tooltip message textStyle', (WidgetTester tester) async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment