From e67e9513888c30b5cc3d97579729043b5cc97e76 Mon Sep 17 00:00:00 2001 From: Mitchell Goodwin <58190796+MitchellGoodwin@users.noreply.github.com> Date: Tue, 7 May 2024 12:32:47 -0700 Subject: [PATCH] Change dialog font family (#141295) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Screenshot 2024-01-10 at 10 49 26 AM After: Screenshot 2024-01-10 at 10 52 11 AM --- packages/flutter/lib/src/cupertino/dialog.dart | 2 +- packages/flutter/test/cupertino/dialog_test.dart | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/cupertino/dialog.dart b/packages/flutter/lib/src/cupertino/dialog.dart index 8424d461fa6..1d8f2ed8b08 100644 --- a/packages/flutter/lib/src/cupertino/dialog.dart +++ b/packages/flutter/lib/src/cupertino/dialog.dart @@ -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, diff --git a/packages/flutter/test/cupertino/dialog_test.dart b/packages/flutter/test/cupertino/dialog_test.dart index fd25b3640be..46c6bfe1c67 100644 --- a/packages/flutter/test/cupertino/dialog_test.dart +++ b/packages/flutter/test/cupertino/dialog_test.dart @@ -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 {