Unverified Commit 7f6c096e authored by Taha Tesser's avatar Taha Tesser Committed by GitHub

Provide Appbar's `foregroundColor` to package license page titles (#95685)

parent f7b809d2
...@@ -920,12 +920,14 @@ class _PackageLicensePageTitle extends StatelessWidget { ...@@ -920,12 +920,14 @@ class _PackageLicensePageTitle extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final Color? color = Theme.of(context).appBarTheme.foregroundColor;
return Column( return Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text(title, style: theme.headline6), Text(title, style: theme.headline6?.copyWith(color: color)),
Text(subtitle, style: theme.subtitle2), Text(subtitle, style: theme.subtitle2?.copyWith(color: color)),
], ],
); );
} }
......
...@@ -289,11 +289,11 @@ void main() { ...@@ -289,11 +289,11 @@ void main() {
const TextStyle titleTextStyle = TextStyle( const TextStyle titleTextStyle = TextStyle(
fontSize: 20, fontSize: 20,
color: Colors.black, color: Colors.indigo,
); );
const TextStyle subtitleTextStyle = TextStyle( const TextStyle subtitleTextStyle = TextStyle(
fontSize: 15, fontSize: 15,
color: Colors.red, color: Colors.indigo,
); );
await tester.pumpWidget( await tester.pumpWidget(
...@@ -315,6 +315,7 @@ void main() { ...@@ -315,6 +315,7 @@ void main() {
headline6: titleTextStyle, headline6: titleTextStyle,
subtitle2: subtitleTextStyle, subtitle2: subtitleTextStyle,
), ),
foregroundColor: Colors.indigo,
), ),
), ),
home: const Center( home: const Center(
......
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