mirror of
https://github.com/flutter/flutter
synced 2024-08-27 12:00:58 +00:00
Provide Appbar's foregroundColor
to package license page titles (#95685)
This commit is contained in:
parent
f7b809d2aa
commit
7f6c096e96
|
@ -920,12 +920,14 @@ class _PackageLicensePageTitle extends StatelessWidget {
|
|||
|
||||
@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)),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
@ -289,11 +289,11 @@ void main() {
|
|||
|
||||
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 @@ void main() {
|
|||
headline6: titleTextStyle,
|
||||
subtitle2: subtitleTextStyle,
|
||||
),
|
||||
foregroundColor: Colors.indigo,
|
||||
),
|
||||
),
|
||||
home: const Center(
|
||||
|
|
Loading…
Reference in a new issue