Provide Appbar's `foregroundColor` to package license page titles (#95685)
diff --git a/packages/flutter/lib/src/material/about.dart b/packages/flutter/lib/src/material/about.dart
index 391b3f5..847a469 100644
--- a/packages/flutter/lib/src/material/about.dart
+++ b/packages/flutter/lib/src/material/about.dart
@@ -920,12 +920,14 @@
@override
Widget build(BuildContext context) {
+ final Color? color = Theme.of(context).appBarTheme.foregroundColor;
+
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
- Text(title, style: theme.headline6),
- Text(subtitle, style: theme.subtitle2),
+ Text(title, style: theme.headline6?.copyWith(color: color)),
+ Text(subtitle, style: theme.subtitle2?.copyWith(color: color)),
],
);
}
diff --git a/packages/flutter/test/material/about_test.dart b/packages/flutter/test/material/about_test.dart
index 0795865..31167cb 100644
--- a/packages/flutter/test/material/about_test.dart
+++ b/packages/flutter/test/material/about_test.dart
@@ -289,11 +289,11 @@
const TextStyle titleTextStyle = TextStyle(
fontSize: 20,
- color: Colors.black,
+ color: Colors.indigo,
);
const TextStyle subtitleTextStyle = TextStyle(
fontSize: 15,
- color: Colors.red,
+ color: Colors.indigo,
);
await tester.pumpWidget(
@@ -315,6 +315,7 @@
headline6: titleTextStyle,
subtitle2: subtitleTextStyle,
),
+ foregroundColor: Colors.indigo,
),
),
home: const Center(