Change dialog font family (#141295)

Fixes #139434.

Changes the font from "Text" to "Display". We should only be using the "Display" font for fonts of size 20 and above. Previously "Display" was not showing correctly so this font being wrong was flying under the radar.

Before:
<img width="315" alt="Screenshot 2024-01-10 at 10 49 26 AM" src="https://github.com/flutter/flutter/assets/58190796/c8beba30-04d2-4c22-86ae-85c0576136ee">

After:
<img width="289" alt="Screenshot 2024-01-10 at 10 52 11 AM" src="https://github.com/flutter/flutter/assets/58190796/c6b33aaf-791c-460e-a640-37d8ddf3f713">
This commit is contained in:
Mitchell Goodwin 2024-05-07 12:32:47 -07:00 committed by GitHub
parent 6967ae551e
commit e67e951388
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -23,7 +23,7 @@ import 'theme.dart';
// Apple Design Resources(https://developer.apple.com/design/resources/).
// However the values are not exactly the same as native, so eyeballing is needed.
const TextStyle _kCupertinoDialogTitleStyle = TextStyle(
fontFamily: 'CupertinoSystemDisplay',
fontFamily: 'CupertinoSystemText',
inherit: false,
fontSize: 17.0,
fontWeight: FontWeight.w600,

View File

@ -140,6 +140,7 @@ void main() {
final DefaultTextStyle widget = tester.widget(find.byType(DefaultTextStyle));
expect(widget.style.color!.withAlpha(255), CupertinoColors.systemGreen.color);
expect(widget.style.fontFamily, 'CupertinoSystemText');
});
testWidgets('Dialog dark theme', (WidgetTester tester) async {