mirror of
https://github.com/flutter/flutter
synced 2024-08-27 12:00:58 +00:00
Deprecate 2018 text theme parameters (#109817)
This commit is contained in:
parent
717d92e802
commit
7e12b37111
|
@ -198,7 +198,7 @@ class MenuItemWithIcon extends StatelessWidget {
|
|||
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
|
||||
child: Text(title),
|
||||
),
|
||||
Text(subtitle, style: Theme.of(context).textTheme.caption),
|
||||
Text(subtitle, style: Theme.of(context).textTheme.bodySmall),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ class InfoBar extends StatelessWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
const MiniIconWithText(Icons.thumb_up, '42'),
|
||||
Text('3 Comments', style: Theme.of(context).textTheme.caption),
|
||||
Text('3 Comments', style: Theme.of(context).textTheme.bodySmall),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -331,7 +331,7 @@ class MiniIconWithText extends StatelessWidget {
|
|||
child: Icon(icon, color: Colors.white, size: 12.0),
|
||||
),
|
||||
),
|
||||
Text(title, style: Theme.of(context).textTheme.caption),
|
||||
Text(title, style: Theme.of(context).textTheme.bodySmall),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ class UserHeader extends StatelessWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: <Widget>[
|
||||
RichText(text: TextSpan(
|
||||
style: Theme.of(context).textTheme.bodyText2,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
children: <TextSpan>[
|
||||
TextSpan(text: userName, style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
const TextSpan(text: ' shared a new '),
|
||||
|
@ -383,8 +383,8 @@ class UserHeader extends StatelessWidget {
|
|||
)),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Text('Yesterday at 11:55 • ', style: Theme.of(context).textTheme.caption),
|
||||
Icon(Icons.people, size: 16.0, color: Theme.of(context).textTheme.caption!.color),
|
||||
Text('Yesterday at 11:55 • ', style: Theme.of(context).textTheme.bodySmall),
|
||||
Icon(Icons.people, size: 16.0, color: Theme.of(context).textTheme.bodySmall!.color),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
@ -477,9 +477,9 @@ class ItemImageBox extends StatelessWidget {
|
|||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: <Widget>[
|
||||
Text('Artisans of Southern India', style: Theme.of(context).textTheme.bodyText1),
|
||||
Text('Silk Spinners', style: Theme.of(context).textTheme.bodyText2),
|
||||
Text('Sivaganga, Tamil Nadu', style: Theme.of(context).textTheme.caption),
|
||||
Text('Artisans of Southern India', style: Theme.of(context).textTheme.bodyLarge),
|
||||
Text('Silk Spinners', style: Theme.of(context).textTheme.bodyMedium),
|
||||
Text('Sivaganga, Tamil Nadu', style: Theme.of(context).textTheme.bodySmall),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -521,7 +521,7 @@ class ItemGalleryBox extends StatelessWidget {
|
|||
child: Container(
|
||||
color: Theme.of(context).primaryColor,
|
||||
child: Center(
|
||||
child: Text(tabName, style: Theme.of(context).textTheme.headline5!.copyWith(color: Colors.white)),
|
||||
child: Text(tabName, style: Theme.of(context).textTheme.headlineSmall!.copyWith(color: Colors.white)),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -602,7 +602,7 @@ class BottomBarButton extends StatelessWidget {
|
|||
icon: Icon(icon),
|
||||
onPressed: () { print('Pressed: $title'); },
|
||||
),
|
||||
Text(title, style: Theme.of(context).textTheme.caption),
|
||||
Text(title, style: Theme.of(context).textTheme.bodySmall),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
@ -401,9 +401,9 @@ class PaletteTabView extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
final TextTheme textTheme = Theme.of(context).textTheme;
|
||||
final TextStyle whiteTextStyle =
|
||||
textTheme.bodyText2!.copyWith(color: Colors.white);
|
||||
textTheme.bodyMedium!.copyWith(color: Colors.white);
|
||||
final TextStyle blackTextStyle =
|
||||
textTheme.bodyText2!.copyWith(color: Colors.black);
|
||||
textTheme.bodyMedium!.copyWith(color: Colors.black);
|
||||
return Scrollbar(
|
||||
child: ListView(
|
||||
itemExtent: kColorItemHeight,
|
||||
|
|
|
@ -106,7 +106,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
),
|
||||
Text(
|
||||
'0',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {},
|
||||
|
|
|
@ -25,7 +25,7 @@ class _StockSymbolView extends StatelessWidget {
|
|||
changeInPrice = '+$changeInPrice';
|
||||
}
|
||||
|
||||
final TextStyle headings = Theme.of(context).textTheme.bodyText1!;
|
||||
final TextStyle headings = Theme.of(context).textTheme.bodyLarge!;
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Column(
|
||||
|
@ -37,7 +37,7 @@ class _StockSymbolView extends StatelessWidget {
|
|||
Text(
|
||||
stock.symbol,
|
||||
key: ValueKey<String>('${stock.symbol}_symbol_name'),
|
||||
style: Theme.of(context).textTheme.headline3,
|
||||
style: Theme.of(context).textTheme.displaySmall,
|
||||
),
|
||||
arrow,
|
||||
],
|
||||
|
|
|
@ -92,8 +92,8 @@ class PaletteTabView extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final TextTheme textTheme = Theme.of(context).textTheme;
|
||||
final TextStyle whiteTextStyle = textTheme.bodyText2!.copyWith(color: Colors.white);
|
||||
final TextStyle blackTextStyle = textTheme.bodyText2!.copyWith(color: Colors.black);
|
||||
final TextStyle whiteTextStyle = textTheme.bodyMedium!.copyWith(color: Colors.white);
|
||||
final TextStyle blackTextStyle = textTheme.bodyMedium!.copyWith(color: Colors.black);
|
||||
return Scrollbar(
|
||||
child: ListView(
|
||||
primary: true,
|
||||
|
|
|
@ -20,7 +20,7 @@ class _ContactCategory extends StatelessWidget {
|
|||
border: Border(bottom: BorderSide(color: themeData.dividerColor))
|
||||
),
|
||||
child: DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.subtitle1!,
|
||||
style: Theme.of(context).textTheme.titleMedium!,
|
||||
child: SafeArea(
|
||||
top: false,
|
||||
bottom: false,
|
||||
|
@ -64,7 +64,7 @@ class _ContactItem extends StatelessWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
...lines.sublist(0, lines.length - 1).map<Widget>((String line) => Text(line)),
|
||||
Text(lines.last, style: themeData.textTheme.caption),
|
||||
Text(lines.last, style: themeData.textTheme.bodySmall),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -117,29 +117,29 @@ over water meant for the whole central valley of California? The story will shoc
|
|||
children: <Widget>[
|
||||
Text(
|
||||
'US',
|
||||
style: textTheme.overline,
|
||||
style: textTheme.labelSmall,
|
||||
),
|
||||
Text(
|
||||
' ¬ ',
|
||||
// TODO(larche): Replace textTheme.headline2.color with a ColorScheme value when known.
|
||||
style: textTheme.overline!.apply(color: textTheme.headline2!.color),
|
||||
style: textTheme.labelSmall!.apply(color: textTheme.displayMedium!.color),
|
||||
),
|
||||
Text(
|
||||
'CULTURE',
|
||||
style: textTheme.overline,
|
||||
style: textTheme.labelSmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
'Quince for Wisdom, Persimmon for Luck, Pomegranate for Love',
|
||||
style: textTheme.headline4,
|
||||
style: textTheme.headlineMedium,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
'How these crazy fruits sweetened our hearts, relationships, '
|
||||
'and puffed pastries',
|
||||
style: textTheme.bodyText2,
|
||||
style: textTheme.bodyMedium,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
|
@ -155,7 +155,7 @@ over water meant for the whole central valley of California? The story will shoc
|
|||
const SizedBox(width: 12),
|
||||
Text(
|
||||
'by',
|
||||
style: textTheme.headline2,
|
||||
style: textTheme.displayMedium,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
const Text(
|
||||
|
@ -172,7 +172,7 @@ over water meant for the whole central valley of California? The story will shoc
|
|||
),
|
||||
Text(
|
||||
'$paragraph1\n\n$paragraph2',
|
||||
style: textTheme.bodyText1,
|
||||
style: textTheme.bodyLarge,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -200,7 +200,7 @@ TextTheme _buildTextTheme(TextTheme base) {
|
|||
theme = theme.apply(displayColor: Colors.black);
|
||||
|
||||
theme = theme.copyWith(
|
||||
headline4: base.headline4!.copyWith(
|
||||
headlineMedium: base.headlineMedium!.copyWith(
|
||||
fontFamily: 'Merriweather',
|
||||
fontStyle: FontStyle.italic,
|
||||
fontSize: 28,
|
||||
|
@ -208,21 +208,21 @@ TextTheme _buildTextTheme(TextTheme base) {
|
|||
color: Colors.black,
|
||||
height: .88,
|
||||
),
|
||||
headline2: base.headline2!.copyWith(
|
||||
displayMedium: base.displayMedium!.copyWith(
|
||||
fontFamily: 'LibreFranklin',
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.black.withAlpha(153),
|
||||
),
|
||||
headline5: base.headline5!.copyWith(fontWeight: FontWeight.w500),
|
||||
bodyText2: base.bodyText2!.copyWith(
|
||||
headlineSmall: base.headlineSmall!.copyWith(fontWeight: FontWeight.w500),
|
||||
bodyMedium: base.bodyMedium!.copyWith(
|
||||
fontFamily: 'Merriweather',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w300,
|
||||
color: const Color(0xFF666666),
|
||||
height: 1.11,
|
||||
),
|
||||
bodyText1: base.bodyText1!.copyWith(
|
||||
bodyLarge: base.bodyLarge!.copyWith(
|
||||
fontFamily: 'Merriweather',
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w300,
|
||||
|
@ -230,7 +230,7 @@ TextTheme _buildTextTheme(TextTheme base) {
|
|||
height: 1.4,
|
||||
letterSpacing: .25,
|
||||
),
|
||||
overline: const TextStyle(
|
||||
labelSmall: const TextStyle(
|
||||
fontFamily: 'LibreFranklin',
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w700,
|
||||
|
|
|
@ -130,7 +130,7 @@ class CategoryView extends StatelessWidget {
|
|||
alignment: AlignmentDirectional.center,
|
||||
child: Text(
|
||||
asset,
|
||||
style: theme.textTheme.caption,
|
||||
style: theme.textTheme.bodySmall,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -186,7 +186,7 @@ class BackdropPanel extends StatelessWidget {
|
|||
padding: const EdgeInsetsDirectional.only(start: 16.0),
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
child: DefaultTextStyle(
|
||||
style: theme.textTheme.subtitle1!,
|
||||
style: theme.textTheme.titleMedium!,
|
||||
child: Tooltip(
|
||||
message: 'Tap to dismiss',
|
||||
child: title,
|
||||
|
@ -213,7 +213,7 @@ class BackdropTitle extends AnimatedWidget {
|
|||
Widget build(BuildContext context) {
|
||||
final Animation<double> animation = listenable as Animation<double>;
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).primaryTextTheme.headline6!,
|
||||
style: Theme.of(context).primaryTextTheme.titleLarge!,
|
||||
softWrap: false,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
child: Stack(
|
||||
|
@ -365,8 +365,8 @@ class _BackdropDemoState extends State<BackdropDemo> with SingleTickerProviderSt
|
|||
children: <Widget>[
|
||||
ListTileTheme(
|
||||
iconColor: theme.primaryIconTheme.color,
|
||||
textColor: theme.primaryTextTheme.headline6!.color!.withOpacity(0.6),
|
||||
selectedColor: theme.primaryTextTheme.headline6!.color,
|
||||
textColor: theme.primaryTextTheme.titleLarge!.color!.withOpacity(0.6),
|
||||
selectedColor: theme.primaryTextTheme.titleLarge!.color,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Column(
|
||||
|
|
|
@ -262,7 +262,7 @@ class _RadioItem<T> extends StatelessWidget {
|
|||
},
|
||||
child: Text(
|
||||
value.title!,
|
||||
style: theme.textTheme.subtitle1,
|
||||
style: theme.textTheme.titleMedium,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -332,7 +332,7 @@ class _Heading extends StatelessWidget {
|
|||
alignment: AlignmentDirectional.centerStart,
|
||||
child: Text(
|
||||
text,
|
||||
style: theme.textTheme.bodyText1,
|
||||
style: theme.textTheme.bodyLarge,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ class SectionTitle extends StatelessWidget {
|
|||
padding: const EdgeInsets.fromLTRB(4.0, 4.0, 4.0, 12.0),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(title!, style: Theme.of(context).textTheme.subtitle1),
|
||||
child: Text(title!, style: Theme.of(context).textTheme.titleMedium),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -245,8 +245,8 @@ class TravelDestinationContent extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final ThemeData theme = Theme.of(context);
|
||||
final TextStyle titleStyle = theme.textTheme.headline5!.copyWith(color: Colors.white);
|
||||
final TextStyle descriptionStyle = theme.textTheme.subtitle1!;
|
||||
final TextStyle titleStyle = theme.textTheme.headlineSmall!.copyWith(color: Colors.white);
|
||||
final TextStyle descriptionStyle = theme.textTheme.titleMedium!;
|
||||
final ButtonStyle textButtonStyle = TextButton.styleFrom(foregroundColor: Colors.amber.shade500);
|
||||
|
||||
return Column(
|
||||
|
|
|
@ -124,7 +124,7 @@ class _ChipsTile extends StatelessWidget {
|
|||
alignment: Alignment.center,
|
||||
constraints: const BoxConstraints(minWidth: 48.0, minHeight: 48.0),
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text('None', style: Theme.of(context).textTheme.caption!.copyWith(fontStyle: FontStyle.italic)),
|
||||
child: Text('None', style: Theme.of(context).textTheme.bodySmall!.copyWith(fontStyle: FontStyle.italic)),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -318,7 +318,7 @@ class _ChipDemoState extends State<ChipDemo> {
|
|||
child: Center(
|
||||
child: Text(
|
||||
_createResult(),
|
||||
style: theme.textTheme.headline6,
|
||||
style: theme.textTheme.titleLarge,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -83,7 +83,7 @@ class _DateTimePicker extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final TextStyle? valueStyle = Theme.of(context).textTheme.headline6;
|
||||
final TextStyle? valueStyle = Theme.of(context).textTheme.titleLarge;
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
|
@ -147,13 +147,13 @@ class _DateAndTimePickerDemoState extends State<DateAndTimePickerDemo> {
|
|||
labelText: 'Event name',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
TextField(
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Location',
|
||||
),
|
||||
style: Theme.of(context).textTheme.headline4!.copyWith(fontSize: 20.0),
|
||||
style: Theme.of(context).textTheme.headlineMedium!.copyWith(fontSize: 20.0),
|
||||
),
|
||||
_DateTimePicker(
|
||||
labelText: 'From',
|
||||
|
|
|
@ -82,7 +82,7 @@ class DialogDemoState extends State<DialogDemo> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final ThemeData theme = Theme.of(context);
|
||||
final TextStyle dialogTextStyle = theme.textTheme.subtitle1!.copyWith(color: theme.textTheme.caption!.color);
|
||||
final TextStyle dialogTextStyle = theme.textTheme.titleMedium!.copyWith(color: theme.textTheme.bodySmall!.color);
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
|
|
@ -237,7 +237,7 @@ class _DrawerDemoState extends State<DrawerDemo> with TickerProviderStateMixin {
|
|||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Text('Tap here to open the drawer',
|
||||
style: Theme.of(context).textTheme.subtitle1,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
@ -58,7 +58,7 @@ class DualHeaderWithHint extends StatelessWidget {
|
|||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
name!,
|
||||
style: textTheme.bodyText2!.copyWith(fontSize: 15.0),
|
||||
style: textTheme.bodyMedium!.copyWith(fontSize: 15.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -68,8 +68,8 @@ class DualHeaderWithHint extends StatelessWidget {
|
|||
child: Container(
|
||||
margin: const EdgeInsets.only(left: 24.0),
|
||||
child: _crossFade(
|
||||
Text(value!, style: textTheme.caption!.copyWith(fontSize: 15.0)),
|
||||
Text(hint!, style: textTheme.caption!.copyWith(fontSize: 15.0)),
|
||||
Text(value!, style: textTheme.bodySmall!.copyWith(fontSize: 15.0)),
|
||||
Text(hint!, style: textTheme.bodySmall!.copyWith(fontSize: 15.0)),
|
||||
showHint!,
|
||||
),
|
||||
),
|
||||
|
@ -108,7 +108,7 @@ class CollapsibleBody extends StatelessWidget {
|
|||
) - margin,
|
||||
child: Center(
|
||||
child: DefaultTextStyle(
|
||||
style: textTheme.caption!.copyWith(fontSize: 15.0),
|
||||
style: textTheme.bodySmall!.copyWith(fontSize: 15.0),
|
||||
child: child!,
|
||||
),
|
||||
),
|
||||
|
|
|
@ -28,7 +28,7 @@ class DateTimeItem extends StatelessWidget {
|
|||
final ThemeData theme = Theme.of(context);
|
||||
|
||||
return DefaultTextStyle(
|
||||
style: theme.textTheme.subtitle1!,
|
||||
style: theme.textTheme.titleMedium!,
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
|
@ -116,7 +116,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
|
|||
}
|
||||
|
||||
final ThemeData theme = Theme.of(context);
|
||||
final TextStyle dialogTextStyle = theme.textTheme.subtitle1!.copyWith(color: theme.textTheme.caption!.color);
|
||||
final TextStyle dialogTextStyle = theme.textTheme.titleMedium!.copyWith(color: theme.textTheme.bodySmall!.color);
|
||||
|
||||
return showDialog<bool>(
|
||||
context: context,
|
||||
|
@ -154,7 +154,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
|
|||
title: Text(_hasName ? _eventName : 'Event Name TBD'),
|
||||
actions: <Widget> [
|
||||
TextButton(
|
||||
child: Text('SAVE', style: theme.textTheme.bodyText2!.copyWith(color: Colors.white)),
|
||||
child: Text('SAVE', style: theme.textTheme.bodyMedium!.copyWith(color: Colors.white)),
|
||||
onPressed: () {
|
||||
Navigator.pop(context, DismissDialogAction.save);
|
||||
},
|
||||
|
@ -176,7 +176,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
|
|||
labelText: 'Event name',
|
||||
filled: true,
|
||||
),
|
||||
style: theme.textTheme.headline5,
|
||||
style: theme.textTheme.headlineSmall,
|
||||
onChanged: (String value) {
|
||||
setState(() {
|
||||
_hasName = value.isNotEmpty;
|
||||
|
@ -206,7 +206,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
|
|||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text('From', style: theme.textTheme.caption),
|
||||
Text('From', style: theme.textTheme.bodySmall),
|
||||
DateTimeItem(
|
||||
dateTime: _fromDateTime,
|
||||
onChanged: (DateTime value) {
|
||||
|
@ -221,7 +221,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
|
|||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text('To', style: theme.textTheme.caption),
|
||||
Text('To', style: theme.textTheme.bodySmall),
|
||||
DateTimeItem(
|
||||
dateTime: _toDateTime,
|
||||
onChanged: (DateTime value) {
|
||||
|
|
|
@ -112,7 +112,7 @@ class _IconsDemoCard extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final ThemeData theme = Theme.of(context);
|
||||
final TextStyle textStyle = theme.textTheme.subtitle1!.copyWith(color: theme.textTheme.caption!.color);
|
||||
final TextStyle textStyle = theme.textTheme.titleMedium!.copyWith(color: theme.textTheme.bodySmall!.color);
|
||||
return Card(
|
||||
child: DefaultTextStyle(
|
||||
style: textStyle,
|
||||
|
|
|
@ -115,7 +115,7 @@ class _ProgressIndicatorDemoState extends State<ProgressIndicatorDemo> with Sing
|
|||
body: Center(
|
||||
child: SingleChildScrollView(
|
||||
child: DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline6!,
|
||||
style: Theme.of(context).textTheme.titleLarge!,
|
||||
child: GestureDetector(
|
||||
onTap: _handleTap,
|
||||
behavior: HitTestBehavior.opaque,
|
||||
|
|
|
@ -212,7 +212,7 @@ class _ListDemoState extends State<ReorderableListDemo> {
|
|||
header: _itemType != _ReorderableListType.threeLine
|
||||
? Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text('Header of the list', style: Theme.of(context).textTheme.headline5))
|
||||
child: Text('Header of the list', style: Theme.of(context).textTheme.headlineSmall))
|
||||
: null,
|
||||
onReorder: _onReorder,
|
||||
reverse: _reverse!,
|
||||
|
|
|
@ -255,7 +255,7 @@ class _ResultCard extends StatelessWidget {
|
|||
Text(title!),
|
||||
Text(
|
||||
'$integer',
|
||||
style: theme.textTheme.headline5!.copyWith(fontSize: 72.0),
|
||||
style: theme.textTheme.headlineSmall!.copyWith(fontSize: 72.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -284,11 +284,11 @@ class _SuggestionList extends StatelessWidget {
|
|||
title: RichText(
|
||||
text: TextSpan(
|
||||
text: suggestion.substring(0, query!.length),
|
||||
style: theme.textTheme.subtitle1!.copyWith(fontWeight: FontWeight.bold),
|
||||
style: theme.textTheme.titleMedium!.copyWith(fontWeight: FontWeight.bold),
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: suggestion.substring(query!.length),
|
||||
style: theme.textTheme.subtitle1,
|
||||
style: theme.textTheme.titleMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -334,7 +334,7 @@ class _SlidersState extends State<_Sliders> {
|
|||
valueIndicatorColor: Colors.deepPurpleAccent,
|
||||
thumbShape: _CustomThumbShape(),
|
||||
valueIndicatorShape: _CustomValueIndicatorShape(),
|
||||
valueIndicatorTextStyle: theme.textTheme.bodyText1!.copyWith(color: theme.colorScheme.onSurface),
|
||||
valueIndicatorTextStyle: theme.textTheme.bodyLarge!.copyWith(color: theme.colorScheme.onSurface),
|
||||
),
|
||||
child: Slider(
|
||||
value: _discreteCustomValue,
|
||||
|
|
|
@ -126,7 +126,7 @@ class _CardDataItem extends StatelessWidget {
|
|||
Center(
|
||||
child: Text(
|
||||
data!.title!,
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
@ -78,7 +78,7 @@ class _TabsFabDemoState extends State<TabsFabDemo> with SingleTickerProviderStat
|
|||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(32.0),
|
||||
child: Text(_explanatoryText, style: Theme.of(context).textTheme.subtitle1),
|
||||
child: Text(_explanatoryText, style: Theme.of(context).textTheme.titleMedium),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
|
|
@ -293,7 +293,7 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> {
|
|||
const SizedBox(height: 24.0),
|
||||
Text(
|
||||
'* indicates required field',
|
||||
style: Theme.of(context).textTheme.caption,
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
),
|
||||
const SizedBox(height: 24.0),
|
||||
],
|
||||
|
|
|
@ -31,10 +31,10 @@ class TooltipDemo extends StatelessWidget {
|
|||
bottom: false,
|
||||
child: ListView(
|
||||
children: <Widget>[
|
||||
Text(_introText, style: theme.textTheme.subtitle1),
|
||||
Text(_introText, style: theme.textTheme.titleMedium),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Text('Long press the ', style: theme.textTheme.subtitle1),
|
||||
Text('Long press the ', style: theme.textTheme.titleMedium),
|
||||
Tooltip(
|
||||
message: 'call icon',
|
||||
child: Icon(
|
||||
|
@ -43,7 +43,7 @@ class TooltipDemo extends StatelessWidget {
|
|||
color: theme.iconTheme.color,
|
||||
),
|
||||
),
|
||||
Text(' icon.', style: theme.textTheme.subtitle1),
|
||||
Text(' icon.', style: theme.textTheme.titleMedium),
|
||||
],
|
||||
),
|
||||
Center(
|
||||
|
|
|
@ -98,11 +98,11 @@ ThemeData _buildShrineTheme() {
|
|||
|
||||
TextTheme _buildShrineTextTheme(TextTheme base) {
|
||||
return base.copyWith(
|
||||
headline5: base.headline5!.copyWith(fontWeight: FontWeight.w500),
|
||||
headline6: base.headline6!.copyWith(fontSize: 18.0),
|
||||
caption: base.caption!.copyWith(fontWeight: FontWeight.w400, fontSize: 14.0),
|
||||
bodyText1: base.bodyText1!.copyWith(fontWeight: FontWeight.w500, fontSize: 16.0),
|
||||
button: base.button!.copyWith(fontWeight: FontWeight.w500, fontSize: 14.0),
|
||||
headlineSmall: base.headlineSmall!.copyWith(fontWeight: FontWeight.w500),
|
||||
titleLarge: base.titleLarge!.copyWith(fontSize: 18.0),
|
||||
bodySmall: base.bodySmall!.copyWith(fontWeight: FontWeight.w400, fontSize: 14.0),
|
||||
bodyLarge: base.bodyLarge!.copyWith(fontWeight: FontWeight.w500, fontSize: 16.0),
|
||||
labelLarge: base.labelLarge!.copyWith(fontWeight: FontWeight.w500, fontSize: 14.0),
|
||||
).apply(
|
||||
fontFamily: 'Raleway',
|
||||
displayColor: kShrineBrown900,
|
||||
|
|
|
@ -125,7 +125,7 @@ class _BackdropTitle extends AnimatedWidget {
|
|||
);
|
||||
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).primaryTextTheme.headline6!,
|
||||
style: Theme.of(context).primaryTextTheme.titleLarge!,
|
||||
softWrap: false,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
child: Row(children: <Widget>[
|
||||
|
|
|
@ -33,7 +33,7 @@ class CategoryMenuPage extends StatelessWidget {
|
|||
const SizedBox(height: 16.0),
|
||||
Text(
|
||||
categoryString,
|
||||
style: theme.textTheme.bodyText1,
|
||||
style: theme.textTheme.bodyLarge,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 14.0),
|
||||
|
@ -48,7 +48,7 @@ class CategoryMenuPage extends StatelessWidget {
|
|||
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
||||
child: Text(
|
||||
categoryString,
|
||||
style: theme.textTheme.bodyText1!.copyWith(
|
||||
style: theme.textTheme.bodyLarge!.copyWith(
|
||||
color: kShrineBrown900.withAlpha(153)
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
|
|
|
@ -542,7 +542,7 @@ class ExtraProductsNumber extends StatelessWidget {
|
|||
final int displayedOverflowProducts = numOverflowProducts <= 99 ? numOverflowProducts : 99;
|
||||
return Text(
|
||||
'+$displayedOverflowProducts',
|
||||
style: Theme.of(context).primaryTextTheme.button,
|
||||
style: Theme.of(context).primaryTextTheme.labelLarge,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ class _LoginPageState extends State<LoginPage> {
|
|||
const SizedBox(height: 16.0),
|
||||
Text(
|
||||
'SHRINE',
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -58,7 +58,7 @@ class _ShoppingCartPageState extends State<ShoppingCartPage> {
|
|||
),
|
||||
Text(
|
||||
'CART',
|
||||
style: localTheme.textTheme.subtitle1!.copyWith(fontWeight: FontWeight.w600),
|
||||
style: localTheme.textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w600),
|
||||
),
|
||||
const SizedBox(width: 16.0),
|
||||
Text('${model.totalCartQuantity} ITEMS'),
|
||||
|
@ -109,8 +109,8 @@ class ShoppingCartSummary extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final TextStyle smallAmountStyle = Theme.of(context).textTheme.bodyText2!.copyWith(color: kShrineBrown600);
|
||||
final TextStyle? largeAmountStyle = Theme.of(context).textTheme.headline4;
|
||||
final TextStyle smallAmountStyle = Theme.of(context).textTheme.bodyMedium!.copyWith(color: kShrineBrown600);
|
||||
final TextStyle? largeAmountStyle = Theme.of(context).textTheme.headlineMedium;
|
||||
final NumberFormat formatter = NumberFormat.simpleCurrency(
|
||||
decimalDigits: 2,
|
||||
locale: Localizations.localeOf(context).toString(),
|
||||
|
@ -243,7 +243,7 @@ class ShoppingCartRow extends StatelessWidget {
|
|||
),
|
||||
Text(
|
||||
product.name,
|
||||
style: localTheme.textTheme.subtitle1!.copyWith(fontWeight: FontWeight.w600),
|
||||
style: localTheme.textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w600),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -59,7 +59,7 @@ class ProductCard extends StatelessWidget {
|
|||
children: <Widget>[
|
||||
Text(
|
||||
product == null ? '' : product!.name,
|
||||
style: theme.textTheme.button,
|
||||
style: theme.textTheme.labelLarge,
|
||||
softWrap: false,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
|
@ -67,7 +67,7 @@ class ProductCard extends StatelessWidget {
|
|||
const SizedBox(height: 4.0),
|
||||
Text(
|
||||
product == null ? '' : formatter.format(product!.price),
|
||||
style: theme.textTheme.caption,
|
||||
style: theme.textTheme.bodySmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -19,7 +19,7 @@ class TextStyleItem extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final ThemeData theme = Theme.of(context);
|
||||
final TextStyle nameStyle = theme.textTheme.caption!.copyWith(color: theme.textTheme.caption!.color);
|
||||
final TextStyle nameStyle = theme.textTheme.bodySmall!.copyWith(color: theme.textTheme.bodySmall!.color);
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 16.0),
|
||||
child: Row(
|
||||
|
@ -47,18 +47,21 @@ class TypographyDemo extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
final TextTheme textTheme = Theme.of(context).textTheme;
|
||||
final List<Widget> styleItems = <Widget>[
|
||||
if (MediaQuery.of(context).size.width > 500.0)
|
||||
TextStyleItem(name: 'Headline 1', style: textTheme.headline1!, text: 'Light 112sp'),
|
||||
TextStyleItem(name: 'Headline 2', style: textTheme.headline2!, text: 'Regular 56sp'),
|
||||
TextStyleItem(name: 'Headline 3', style: textTheme.headline3!, text: 'Regular 45sp'),
|
||||
TextStyleItem(name: 'Headline 4', style: textTheme.headline4!, text: 'Regular 34sp'),
|
||||
TextStyleItem(name: 'Headline 5', style: textTheme.headline5!, text: 'Regular 24sp'),
|
||||
TextStyleItem(name: 'Headline 6', style: textTheme.headline6!, text: 'Medium 20sp'),
|
||||
TextStyleItem(name: 'Subtitle 1', style: textTheme.subtitle1!, text: 'Regular 16sp'),
|
||||
TextStyleItem(name: 'Body 1', style: textTheme.bodyText1!, text: 'Medium 14sp'),
|
||||
TextStyleItem(name: 'Body 2', style: textTheme.bodyText2!, text: 'Regular 14sp'),
|
||||
TextStyleItem(name: 'Caption', style: textTheme.caption!, text: 'Regular 12sp'),
|
||||
TextStyleItem(name: 'Button', style: textTheme.button!, text: 'MEDIUM (ALL CAPS) 14sp'),
|
||||
TextStyleItem(name: 'Display Large', style: textTheme.displayLarge!, text: 'Regular 57/64 +0'),
|
||||
TextStyleItem(name: 'Display Medium', style: textTheme.displayMedium!, text: 'Regular 45/52 +0'),
|
||||
TextStyleItem(name: 'Display Small', style: textTheme.displaySmall!, text: 'Regular 36/44 +0'),
|
||||
TextStyleItem(name: 'Headline Large', style: textTheme.headlineLarge!, text: 'Regular 32/40 +0'),
|
||||
TextStyleItem(name: 'Headline Medium', style: textTheme.headlineMedium!, text: 'Regular 28/36 +0'),
|
||||
TextStyleItem(name: 'Headline Small', style: textTheme.headlineSmall!, text: 'Regular 24/32 +0'),
|
||||
TextStyleItem(name: 'Title Large', style: textTheme.titleLarge!, text: 'Medium 22/28 +0'),
|
||||
TextStyleItem(name: 'Title Medium', style: textTheme.titleMedium!, text: 'Medium 16/24 +0.15'),
|
||||
TextStyleItem(name: 'Title Small', style: textTheme.titleSmall!, text: 'Medium 14/20 +0.1'),
|
||||
TextStyleItem(name: 'Body Large', style: textTheme.bodyLarge!, text: 'Regular 16/24 +0.5'),
|
||||
TextStyleItem(name: 'Body Medium', style: textTheme.bodyMedium!, text: 'Regular 14/20 +0.25'),
|
||||
TextStyleItem(name: 'Body Small', style: textTheme.bodySmall!, text: 'Regular 12/16 +0.4'),
|
||||
TextStyleItem(name: 'Label Large', style: textTheme.labelLarge!, text: 'Medium 14/20 +0.1'),
|
||||
TextStyleItem(name: 'Label Medium', style: textTheme.labelMedium!, text: 'Medium 12/16 +0.5'),
|
||||
TextStyleItem(name: 'Label Small', style: textTheme.labelSmall!, text: 'Medium 11/16 +0.5'),
|
||||
];
|
||||
|
||||
return Scaffold(
|
||||
|
|
|
@ -32,8 +32,8 @@ class _LinkTextSpan extends TextSpan {
|
|||
|
||||
void showGalleryAboutDialog(BuildContext context) {
|
||||
final ThemeData themeData = Theme.of(context);
|
||||
final TextStyle? aboutTextStyle = themeData.textTheme.bodyText1;
|
||||
final TextStyle linkStyle = themeData.textTheme.bodyText1!.copyWith(color: themeData.colorScheme.primary);
|
||||
final TextStyle? aboutTextStyle = themeData.textTheme.bodyLarge;
|
||||
final TextStyle linkStyle = themeData.textTheme.bodyLarge!.copyWith(color: themeData.colorScheme.primary);
|
||||
|
||||
showAboutDialog(
|
||||
context: context,
|
||||
|
|
|
@ -147,7 +147,7 @@ class _BackAppBar extends StatelessWidget {
|
|||
return IconTheme.merge(
|
||||
data: theme.primaryIconTheme,
|
||||
child: DefaultTextStyle(
|
||||
style: theme.primaryTextTheme.headline6!,
|
||||
style: theme.primaryTextTheme.titleLarge!,
|
||||
child: SizedBox(
|
||||
height: _kBackAppBarHeight,
|
||||
child: Row(
|
||||
|
|
|
@ -136,7 +136,7 @@ class TabbedComponentDemoScaffold extends StatelessWidget {
|
|||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Text(demo.description!,
|
||||
style: Theme.of(context).textTheme.subtitle1,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
),
|
||||
Expanded(child: demo.demoWidget!),
|
||||
|
|
|
@ -79,7 +79,7 @@ class _CategoryItem extends StatelessWidget {
|
|||
child: Text(
|
||||
category!.name,
|
||||
textAlign: TextAlign.center,
|
||||
style: theme.textTheme.subtitle1!.copyWith(
|
||||
style: theme.textTheme.titleMedium!.copyWith(
|
||||
fontFamily: 'GoogleSans',
|
||||
color: isDark ? Colors.white : _kFlutterBlue,
|
||||
),
|
||||
|
@ -206,14 +206,14 @@ class _DemoItem extends StatelessWidget {
|
|||
children: <Widget>[
|
||||
Text(
|
||||
demo!.title,
|
||||
style: theme.textTheme.subtitle1!.copyWith(
|
||||
style: theme.textTheme.titleMedium!.copyWith(
|
||||
color: isDark ? Colors.white : const Color(0xFF202124),
|
||||
),
|
||||
),
|
||||
if (demo!.subtitle != null)
|
||||
Text(
|
||||
demo!.subtitle!,
|
||||
style: theme.textTheme.bodyText2!.copyWith(
|
||||
style: theme.textTheme.bodyMedium!.copyWith(
|
||||
color: isDark ? Colors.white : const Color(0xFF60646B)
|
||||
),
|
||||
),
|
||||
|
|
|
@ -179,7 +179,7 @@ class _TextButton extends StatelessWidget {
|
|||
return TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: theme.colorScheme.onPrimary,
|
||||
textStyle: theme.textTheme.subtitle1,
|
||||
textStyle: theme.textTheme.titleMedium,
|
||||
padding: EdgeInsets.zero,
|
||||
),
|
||||
onPressed: onPressed,
|
||||
|
@ -198,7 +198,7 @@ class _Heading extends StatelessWidget {
|
|||
final ThemeData theme = Theme.of(context);
|
||||
return _OptionsItem(
|
||||
child: DefaultTextStyle(
|
||||
style: theme.textTheme.headline6!.copyWith(
|
||||
style: theme.textTheme.titleLarge!.copyWith(
|
||||
fontFamily: 'GoogleSans',
|
||||
color: theme.colorScheme.onPrimary,
|
||||
fontWeight: FontWeight.w700,
|
||||
|
@ -236,7 +236,7 @@ class _ThemeModeItem extends StatelessWidget {
|
|||
const Text('Theme'),
|
||||
Text(
|
||||
modeLabels[options!.themeMode!]!,
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2,
|
||||
style: Theme.of(context).primaryTextTheme.bodyMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -283,7 +283,7 @@ class _TextScaleFactorItem extends StatelessWidget {
|
|||
const Text('Text size'),
|
||||
Text(
|
||||
options!.textScaleFactor!.label,
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2,
|
||||
style: Theme.of(context).primaryTextTheme.bodyMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -329,7 +329,7 @@ class _VisualDensityItem extends StatelessWidget {
|
|||
const Text('Visual density'),
|
||||
Text(
|
||||
options!.visualDensity!.label,
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2,
|
||||
style: Theme.of(context).primaryTextTheme.bodyMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -438,7 +438,7 @@ class _PlatformItem extends StatelessWidget {
|
|||
const Text('Platform mechanics'),
|
||||
Text(
|
||||
_platformLabel(options!.platform!),
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2,
|
||||
style: Theme.of(context).primaryTextTheme.bodyMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -517,7 +517,7 @@ class GalleryOptionsPage extends StatelessWidget {
|
|||
final ThemeData theme = Theme.of(context);
|
||||
|
||||
return DefaultTextStyle(
|
||||
style: theme.primaryTextTheme.subtitle1!,
|
||||
style: theme.primaryTextTheme.titleMedium!,
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.only(bottom: 124.0),
|
||||
children: <Widget>[
|
||||
|
|
|
@ -9,7 +9,7 @@ final ThemeData kDarkGalleryTheme = _buildDarkTheme();
|
|||
|
||||
TextTheme _buildTextTheme(TextTheme base) {
|
||||
return base.copyWith(
|
||||
headline6: base.headline6!.copyWith(
|
||||
titleLarge: base.titleLarge!.copyWith(
|
||||
fontFamily: 'GoogleSans',
|
||||
),
|
||||
);
|
||||
|
|
|
@ -44,7 +44,7 @@ class UpdaterState extends State<Updater> {
|
|||
Widget _buildDialog(BuildContext context) {
|
||||
final ThemeData theme = Theme.of(context);
|
||||
final TextStyle dialogTextStyle =
|
||||
theme.textTheme.subtitle1!.copyWith(color: theme.textTheme.caption!.color);
|
||||
theme.textTheme.titleMedium!.copyWith(color: theme.textTheme.bodySmall!.color);
|
||||
return AlertDialog(
|
||||
title: const Text('Update Flutter Gallery?'),
|
||||
content: Text('A newer version is available.', style: dialogTextStyle),
|
||||
|
|
|
@ -102,7 +102,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
),
|
||||
Text(
|
||||
'$_counter',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -425,7 +425,7 @@ class _FocusDemoState extends State<FocusDemo> {
|
|||
debugLabel: 'Scope',
|
||||
autofocus: true,
|
||||
child: DefaultTextStyle(
|
||||
style: textTheme.headline4!,
|
||||
style: textTheme.headlineMedium!,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Actions Demo'),
|
||||
|
|
|
@ -243,7 +243,7 @@ class CardCollectionState extends State<CardCollection> {
|
|||
padding: const EdgeInsets.only(left: 72.0),
|
||||
height: 128.0,
|
||||
alignment: const Alignment(-1.0, 0.5),
|
||||
child: Text('Swipe Away: ${_cardModels.length}', style: Theme.of(context).primaryTextTheme.headline6),
|
||||
child: Text('Swipe Away: ${_cardModels.length}', style: Theme.of(context).primaryTextTheme.titleLarge),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ class CardCollectionState extends State<CardCollection> {
|
|||
}
|
||||
|
||||
final ThemeData theme = Theme.of(context);
|
||||
final TextStyle? backgroundTextStyle = theme.primaryTextTheme.headline6;
|
||||
final TextStyle? backgroundTextStyle = theme.primaryTextTheme.titleLarge;
|
||||
|
||||
// The background Widget appears behind the Dismissible card when the card
|
||||
// moves to the left or right. The Positioned widget ensures that the
|
||||
|
|
|
@ -101,7 +101,7 @@ class ExampleDragSource extends StatelessWidget {
|
|||
}
|
||||
|
||||
final Widget contents = DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.bodyText2!,
|
||||
style: Theme.of(context).textTheme.bodyMedium!,
|
||||
textAlign: TextAlign.center,
|
||||
child: Dot(
|
||||
color: color,
|
||||
|
@ -190,7 +190,7 @@ class MovableBall extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final Widget ball = DefaultTextStyle(
|
||||
style: Theme.of(context).primaryTextTheme.bodyText2!,
|
||||
style: Theme.of(context).primaryTextTheme.bodyMedium!,
|
||||
textAlign: TextAlign.center,
|
||||
child: Dot(
|
||||
key: kBallKey,
|
||||
|
|
|
@ -138,7 +138,7 @@ class _FocusDemoState extends State<FocusDemo> {
|
|||
onKey: _handleKeyPress,
|
||||
autofocus: true,
|
||||
child: DefaultTextStyle(
|
||||
style: textTheme.headline4!,
|
||||
style: textTheme.headlineMedium!,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Focus Demo'),
|
||||
|
|
|
@ -29,7 +29,7 @@ class _HoverDemoState extends State<HoverDemo> {
|
|||
);
|
||||
|
||||
return DefaultTextStyle(
|
||||
style: textTheme.headline4!,
|
||||
style: textTheme.headlineMedium!,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Hover Demo'),
|
||||
|
|
|
@ -214,7 +214,7 @@ class _PointDemoState extends State<_PointDemo> {
|
|||
child: Text(
|
||||
'Tap the refresh button to run the animation. Drag the green '
|
||||
"and red points to change the animation's path.",
|
||||
style: Theme.of(context).textTheme.caption?.copyWith(fontSize: 16.0),
|
||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(fontSize: 16.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -382,7 +382,7 @@ class _RectangleDemoState extends State<_RectangleDemo> {
|
|||
child: Text(
|
||||
'Tap the refresh button to run the animation. Drag the rectangles '
|
||||
"to change the animation's path.",
|
||||
style: Theme.of(context).textTheme.caption!.copyWith(fontSize: 16.0),
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(fontSize: 16.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -66,12 +66,12 @@ class _HardwareKeyDemoState extends State<RawKeyboardDemo> {
|
|||
onTap: () {
|
||||
_focusNode.requestFocus();
|
||||
},
|
||||
child: Text('Tap to focus', style: textTheme.headline4),
|
||||
child: Text('Tap to focus', style: textTheme.headlineMedium),
|
||||
);
|
||||
}
|
||||
|
||||
if (_event == null) {
|
||||
return Text('Press a key', style: textTheme.headline4);
|
||||
return Text('Press a key', style: textTheme.headlineMedium);
|
||||
}
|
||||
|
||||
final RawKeyEventData? data = _event?.data;
|
||||
|
@ -139,7 +139,7 @@ class _HardwareKeyDemoState extends State<RawKeyboardDemo> {
|
|||
}
|
||||
dataText.add(Text(pressed.join(' ')));
|
||||
return DefaultTextStyle(
|
||||
style: textTheme.subtitle1!,
|
||||
style: textTheme.titleMedium!,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: dataText,
|
||||
|
|
|
@ -49,7 +49,7 @@ class _${blockName}DefaultsM3 extends AppBarTheme {
|
|||
);
|
||||
|
||||
@override
|
||||
TextStyle? get toolbarTextStyle => _textTheme.bodyText2;
|
||||
TextStyle? get toolbarTextStyle => _textTheme.bodyMedium;
|
||||
|
||||
@override
|
||||
TextStyle? get titleTextStyle => ${textStyle('md.comp.top-app-bar.small.headline')};
|
||||
|
|
|
@ -110,7 +110,7 @@ class MyStatelessWidget extends StatelessWidget {
|
|||
child: CircleAvatar(
|
||||
backgroundColor: Colors.yellow,
|
||||
child: DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline6!,
|
||||
style: Theme.of(context).textTheme.titleLarge!,
|
||||
child: const Text('B'), // Buzz, buzz!
|
||||
),
|
||||
),
|
||||
|
|
|
@ -28,7 +28,7 @@ class MyStatelessWidget extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final ThemeData theme = Theme.of(context);
|
||||
final TextStyle textStyle = theme.textTheme.bodyText2!;
|
||||
final TextStyle textStyle = theme.textTheme.bodyMedium!;
|
||||
final List<Widget> aboutBoxChildren = <Widget>[
|
||||
const SizedBox(height: 24),
|
||||
RichText(
|
||||
|
|
|
@ -56,7 +56,7 @@ class MyStatelessWidget extends StatelessWidget {
|
|||
alignment: AlignmentDirectional.centerStart,
|
||||
child: Text(
|
||||
'Subheader',
|
||||
style: Theme.of(context).textTheme.caption,
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
),
|
||||
|
|
|
@ -33,12 +33,12 @@ class RootPage extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final TextStyle headline5 = Theme.of(context).textTheme.headline5!;
|
||||
final TextStyle headlineSmall = Theme.of(context).textTheme.headlineSmall!;
|
||||
final ButtonStyle buttonStyle = ElevatedButton.styleFrom(
|
||||
backgroundColor: destination.color,
|
||||
visualDensity: VisualDensity.comfortable,
|
||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
||||
textStyle: headline5,
|
||||
textStyle: headlineSmall,
|
||||
);
|
||||
|
||||
return Scaffold(
|
||||
|
@ -97,7 +97,7 @@ class RootPage extends StatelessWidget {
|
|||
child: Text(
|
||||
'${destination.title} BottomSheet\n'
|
||||
'Tap the back button to dismiss',
|
||||
style: headline5,
|
||||
style: headlineSmall,
|
||||
softWrap: true,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
|
@ -127,7 +127,7 @@ class ListPage extends StatelessWidget {
|
|||
final ButtonStyle buttonStyle = OutlinedButton.styleFrom(
|
||||
foregroundColor: destination.color,
|
||||
fixedSize: const Size.fromHeight(128),
|
||||
textStyle: Theme.of(context).textTheme.headline5,
|
||||
textStyle: Theme.of(context).textTheme.headlineSmall,
|
||||
);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
@ -198,7 +198,7 @@ class _TextPageState extends State<TextPage> {
|
|||
alignment: Alignment.center,
|
||||
child: TextField(
|
||||
controller: textController,
|
||||
style: theme.primaryTextTheme.headline4?.copyWith(
|
||||
style: theme.primaryTextTheme.headlineMedium?.copyWith(
|
||||
color: widget.destination.color,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
|
|
|
@ -62,7 +62,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
|||
children: <Widget>[
|
||||
Text(
|
||||
'Circular progress indicator with a fixed color',
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
CircularProgressIndicator(
|
||||
value: controller.value,
|
||||
|
|
|
@ -46,7 +46,7 @@ class _MyAppState extends State<MyApp> {
|
|||
),
|
||||
Text(
|
||||
'$_counter',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -56,7 +56,7 @@ class MyStatelessWidget extends StatelessWidget {
|
|||
return Center(
|
||||
child: Text(
|
||||
'${tab.text!} Tab',
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
|
|
|
@ -68,7 +68,7 @@ class _ToggleButtonsSampleState extends State<ToggleButtonsSample> {
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
// ToggleButtons with a single selection.
|
||||
Text('Single-select', style: theme.textTheme.subtitle2),
|
||||
Text('Single-select', style: theme.textTheme.titleSmall),
|
||||
const SizedBox(height: 5),
|
||||
ToggleButtons(
|
||||
direction: vertical ? Axis.vertical : Axis.horizontal,
|
||||
|
@ -94,7 +94,7 @@ class _ToggleButtonsSampleState extends State<ToggleButtonsSample> {
|
|||
),
|
||||
const SizedBox(height: 20),
|
||||
// ToggleButtons with a multiple selection.
|
||||
Text('Multi-select', style: theme.textTheme.subtitle2),
|
||||
Text('Multi-select', style: theme.textTheme.titleSmall),
|
||||
const SizedBox(height: 5),
|
||||
ToggleButtons(
|
||||
direction: vertical ? Axis.vertical : Axis.horizontal,
|
||||
|
@ -119,7 +119,7 @@ class _ToggleButtonsSampleState extends State<ToggleButtonsSample> {
|
|||
),
|
||||
const SizedBox(height: 20),
|
||||
// ToggleButtons with icons only.
|
||||
Text('Icon-only', style: theme.textTheme.subtitle2),
|
||||
Text('Icon-only', style: theme.textTheme.titleSmall),
|
||||
const SizedBox(height: 5),
|
||||
ToggleButtons(
|
||||
direction: vertical ? Axis.vertical : Axis.horizontal,
|
||||
|
|
|
@ -70,7 +70,7 @@ class _MyKeyExampleState extends State<MyKeyExample> {
|
|||
color: Colors.white,
|
||||
alignment: Alignment.center,
|
||||
child: DefaultTextStyle(
|
||||
style: textTheme.headline4!,
|
||||
style: textTheme.headlineMedium!,
|
||||
child: Focus(
|
||||
focusNode: _focusNode,
|
||||
onKey: _handleKeyEvent,
|
||||
|
|
|
@ -70,7 +70,7 @@ class _MyPhysicalKeyExampleState extends State<MyPhysicalKeyExample> {
|
|||
color: Colors.white,
|
||||
alignment: Alignment.center,
|
||||
child: DefaultTextStyle(
|
||||
style: textTheme.headline4!,
|
||||
style: textTheme.headlineMedium!,
|
||||
child: Focus(
|
||||
focusNode: _focusNode,
|
||||
onKey: _handleKeyEvent,
|
||||
|
|
|
@ -155,7 +155,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
|||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text('${model.data.value}',
|
||||
style: Theme.of(context).textTheme.headline4),
|
||||
style: Theme.of(context).textTheme.headlineMedium),
|
||||
);
|
||||
}),
|
||||
IconButton(
|
||||
|
|
|
@ -186,7 +186,7 @@ class CardItem extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
TextStyle textStyle = Theme.of(context).textTheme.headline4!;
|
||||
TextStyle textStyle = Theme.of(context).textTheme.headlineMedium!;
|
||||
if (selected) {
|
||||
textStyle = textStyle.copyWith(color: Colors.lightGreenAccent[400]);
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ class CardItem extends StatelessWidget {
|
|||
child: Center(
|
||||
child: Text(
|
||||
'Item $item',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -50,7 +50,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
|||
// child each time the count changes, so that it will begin its animation
|
||||
// when the count changes.
|
||||
key: ValueKey<int>(_count),
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
),
|
||||
ElevatedButton(
|
||||
|
|
|
@ -38,7 +38,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline2!,
|
||||
style: Theme.of(context).textTheme.displayMedium!,
|
||||
textAlign: TextAlign.center,
|
||||
child: FutureBuilder<String>(
|
||||
future: _calculation, // a previously-obtained Future<String> or null
|
||||
|
|
|
@ -48,7 +48,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline2!,
|
||||
style: Theme.of(context).textTheme.displayMedium!,
|
||||
textAlign: TextAlign.center,
|
||||
child: Container(
|
||||
alignment: FractionalOffset.center,
|
||||
|
|
|
@ -78,7 +78,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
|||
'You have pressed or released in this area this many times:'),
|
||||
Text(
|
||||
'$_downCounter presses\n$_upCounter releases',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
Text(
|
||||
'The cursor is here: (${x.toStringAsFixed(2)}, ${y.toStringAsFixed(2)})',
|
||||
|
|
|
@ -76,7 +76,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
|||
'You have entered or exited this box this many times:'),
|
||||
Text(
|
||||
'$_enterCounter Entries\n$_exitCounter Exits',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
Text(
|
||||
'The cursor is here: (${x.toStringAsFixed(2)}, ${y.toStringAsFixed(2)})',
|
||||
|
|
|
@ -121,7 +121,7 @@ class MyStatelessWidget extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
final TextTheme textTheme = Theme.of(context).textTheme;
|
||||
return DefaultTextStyle(
|
||||
style: textTheme.headline4!,
|
||||
style: textTheme.headlineMedium!,
|
||||
child: const ColorfulButton(),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
|||
debugLabel: 'Scope',
|
||||
autofocus: true,
|
||||
child: DefaultTextStyle(
|
||||
style: textTheme.headline4!,
|
||||
style: textTheme.headlineMedium!,
|
||||
child: Focus(
|
||||
onKey: _handleKeyPress,
|
||||
debugLabel: 'Button',
|
||||
|
|
|
@ -119,7 +119,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
|||
child: const Text('ANOTHER BUTTON TO FOCUS'),
|
||||
),
|
||||
DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline2!,
|
||||
style: Theme.of(context).textTheme.displayMedium!,
|
||||
child: const Text('BACKDROP')),
|
||||
],
|
||||
),
|
||||
|
@ -148,7 +148,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
|||
? null
|
||||
: () => setState(() => backdropIsVisible = true),
|
||||
child: DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline2!,
|
||||
style: Theme.of(context).textTheme.displayMedium!,
|
||||
child: const Text('FOREGROUND')),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -31,7 +31,7 @@ class HomePage extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline4!,
|
||||
style: Theme.of(context).textTheme.headlineMedium!,
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
alignment: Alignment.center,
|
||||
|
@ -47,7 +47,7 @@ class CollectPersonalInfoPage extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline4!,
|
||||
style: Theme.of(context).textTheme.headlineMedium!,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
// This moves from the personal info page to the credentials page,
|
||||
|
@ -78,7 +78,7 @@ class ChooseCredentialsPage extends StatelessWidget {
|
|||
return GestureDetector(
|
||||
onTap: onSignupComplete,
|
||||
child: DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.headline4!,
|
||||
style: Theme.of(context).textTheme.headlineMedium!,
|
||||
child: Container(
|
||||
color: Colors.pinkAccent,
|
||||
alignment: Alignment.center,
|
||||
|
|
|
@ -82,7 +82,7 @@ class _RestorableCounterState extends State<RestorableCounter>
|
|||
),
|
||||
Text(
|
||||
'${_counter.value}',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -28,7 +28,7 @@ class MyStatelessWidget extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.bodyText2!,
|
||||
style: Theme.of(context).textTheme.bodyMedium!,
|
||||
child: LayoutBuilder(
|
||||
builder: (BuildContext context, BoxConstraints viewportConstraints) {
|
||||
return SingleChildScrollView(
|
||||
|
|
|
@ -28,7 +28,7 @@ class MyStatelessWidget extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.bodyText2!,
|
||||
style: Theme.of(context).textTheme.bodyMedium!,
|
||||
child: LayoutBuilder(
|
||||
builder: (BuildContext context, BoxConstraints viewportConstraints) {
|
||||
return SingleChildScrollView(
|
||||
|
|
|
@ -210,7 +210,7 @@ class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin {
|
|||
),
|
||||
Text(
|
||||
'$_counter',
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -17,6 +17,245 @@
|
|||
|
||||
version: 1
|
||||
transforms:
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: "Rename to 'displayLarge'"
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
getter: headline1
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'displayLarge'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: "Rename to 'displayMedium'"
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
getter: headline2
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'displayMedium'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: "Rename to 'displaySmall'"
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
getter: headline3
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'displaySmall'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: "Rename to 'headlineMedium'"
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
getter: headline4
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'headlineMedium'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: "Rename to 'headlineSmall'"
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
getter: headline5
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'headlineSmall'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: "Rename to 'titleLarge'"
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
getter: headline6
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'titleLarge'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: "Rename to 'titleMedium'"
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
getter: subtitle1
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'titleMedium'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: "Rename to 'titleSmall'"
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
getter: subtitle2
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'titleSmall'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: "Rename to 'bodyLarge'"
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
getter: bodyText1
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'bodyLarge'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: "Rename to 'bodyMedium'"
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
getter: bodyText2
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'bodyMedium'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: "Rename to 'bodySmall'"
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
getter: caption
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'bodySmall'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: "Rename to 'labelLarge'"
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
getter: button
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'labelLarge'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: "Rename to 'labelSmall'"
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
getter: overline
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'labelSmall'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: 'Rename arguments'
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
constructor: ''
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'headline1'
|
||||
newName: 'displayLarge'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'headline2'
|
||||
newName: 'displayMedium'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'headline3'
|
||||
newName: 'displaySmall'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'headline4'
|
||||
newName: 'headlineMedium'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'headline5'
|
||||
newName: 'headlineSmall'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'headline6'
|
||||
newName: 'titleLarge'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'subtitle1'
|
||||
newName: 'titleMedium'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'subtitle2'
|
||||
newName: 'titleSmall'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'bodyText1'
|
||||
newName: 'bodyLarge'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'bodyText2'
|
||||
newName: 'bodyMedium'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'caption'
|
||||
newName: 'bodySmall'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'button'
|
||||
newName: 'labelLarge'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'overline'
|
||||
newName: 'labelSmall'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109817
|
||||
- title: 'Rename arguments'
|
||||
date: 2022-08-18
|
||||
element:
|
||||
uris: [ 'material.dart' ]
|
||||
method: 'copyWith'
|
||||
inClass: 'TextTheme'
|
||||
changes:
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'headline1'
|
||||
newName: 'displayLarge'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'headline2'
|
||||
newName: 'displayMedium'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'headline3'
|
||||
newName: 'displaySmall'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'headline4'
|
||||
newName: 'headlineMedium'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'headline5'
|
||||
newName: 'headlineSmall'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'headline6'
|
||||
newName: 'titleLarge'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'subtitle1'
|
||||
newName: 'titleMedium'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'subtitle2'
|
||||
newName: 'titleSmall'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'bodyText1'
|
||||
newName: 'bodyLarge'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'bodyText2'
|
||||
newName: 'bodyMedium'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'caption'
|
||||
newName: 'bodySmall'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'button'
|
||||
newName: 'labelLarge'
|
||||
- kind: 'renameParameter'
|
||||
oldName: 'overline'
|
||||
newName: 'labelSmall'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/109070
|
||||
- title: "Remove 'selectedRowColor'"
|
||||
date: 2022-08-05
|
||||
|
|
|
@ -330,10 +330,10 @@ class AboutDialog extends StatelessWidget {
|
|||
padding: const EdgeInsets.symmetric(horizontal: 24.0),
|
||||
child: ListBody(
|
||||
children: <Widget>[
|
||||
Text(name, style: Theme.of(context).textTheme.headline5),
|
||||
Text(version, style: Theme.of(context).textTheme.bodyText2),
|
||||
Text(name, style: Theme.of(context).textTheme.headlineSmall),
|
||||
Text(version, style: Theme.of(context).textTheme.bodyMedium),
|
||||
const SizedBox(height: _textVerticalSeparation),
|
||||
Text(applicationLegalese ?? '', style: Theme.of(context).textTheme.caption),
|
||||
Text(applicationLegalese ?? '', style: Theme.of(context).textTheme.bodySmall),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -495,7 +495,7 @@ class _AboutProgram extends StatelessWidget {
|
|||
children: <Widget>[
|
||||
Text(
|
||||
name,
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
if (icon != null)
|
||||
|
@ -505,20 +505,20 @@ class _AboutProgram extends StatelessWidget {
|
|||
padding: const EdgeInsets.only(bottom: _textVerticalSeparation),
|
||||
child: Text(
|
||||
version,
|
||||
style: Theme.of(context).textTheme.bodyText2,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
if (legalese != null && legalese != '')
|
||||
Text(
|
||||
legalese!,
|
||||
style: Theme.of(context).textTheme.caption,
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: _textVerticalSeparation),
|
||||
Text(
|
||||
'Powered by Flutter',
|
||||
style: Theme.of(context).textTheme.bodyText2,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
|
@ -908,7 +908,7 @@ class _PackageLicensePageState extends State<_PackageLicensePage> {
|
|||
);
|
||||
}
|
||||
return DefaultTextStyle(
|
||||
style: theme.textTheme.caption!,
|
||||
style: theme.textTheme.bodySmall!,
|
||||
child: page,
|
||||
);
|
||||
}
|
||||
|
@ -933,8 +933,8 @@ class _PackageLicensePageTitle extends StatelessWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(title, style: theme.headline6?.copyWith(color: color)),
|
||||
Text(subtitle, style: theme.subtitle2?.copyWith(color: color)),
|
||||
Text(title, style: theme.titleLarge?.copyWith(color: color)),
|
||||
Text(subtitle, style: theme.titleSmall?.copyWith(color: color)),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
@ -739,7 +739,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
|
|||
///
|
||||
/// If this property is null, then [AppBarTheme.toolbarTextStyle] of
|
||||
/// [ThemeData.appBarTheme] is used. If that is also null, the default
|
||||
/// value is a copy of the overall theme's [TextTheme.bodyText2]
|
||||
/// value is a copy of the overall theme's [TextTheme.bodyMedium]
|
||||
/// [TextStyle], with color set to the app bar's [foregroundColor].
|
||||
/// {@endtemplate}
|
||||
///
|
||||
|
@ -755,7 +755,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
|
|||
///
|
||||
/// If this property is null, then [AppBarTheme.titleTextStyle] of
|
||||
/// [ThemeData.appBarTheme] is used. If that is also null, the default
|
||||
/// value is a copy of the overall theme's [TextTheme.headline6]
|
||||
/// value is a copy of the overall theme's [TextTheme.titleLarge]
|
||||
/// [TextStyle], with color set to the app bar's [foregroundColor].
|
||||
/// {@endtemplate}
|
||||
///
|
||||
|
@ -950,17 +950,17 @@ class _AppBarState extends State<AppBar> {
|
|||
?? overallIconTheme;
|
||||
|
||||
TextStyle? toolbarTextStyle = backwardsCompatibility
|
||||
? widget.textTheme?.bodyText2
|
||||
?? appBarTheme.textTheme?.bodyText2
|
||||
?? theme.primaryTextTheme.bodyText2
|
||||
? widget.textTheme?.bodyMedium
|
||||
?? appBarTheme.textTheme?.bodyMedium
|
||||
?? theme.primaryTextTheme.bodyMedium
|
||||
: widget.toolbarTextStyle
|
||||
?? appBarTheme.toolbarTextStyle
|
||||
?? defaults.toolbarTextStyle?.copyWith(color: foregroundColor);
|
||||
|
||||
TextStyle? titleTextStyle = backwardsCompatibility
|
||||
? widget.textTheme?.headline6
|
||||
?? appBarTheme.textTheme?.headline6
|
||||
?? theme.primaryTextTheme.headline6
|
||||
? widget.textTheme?.titleLarge
|
||||
?? appBarTheme.textTheme?.titleLarge
|
||||
?? theme.primaryTextTheme.titleLarge
|
||||
: widget.titleTextStyle
|
||||
?? appBarTheme.titleTextStyle
|
||||
?? defaults.titleTextStyle?.copyWith(color: foregroundColor);
|
||||
|
@ -2324,10 +2324,10 @@ class _AppBarDefaultsM2 extends AppBarTheme {
|
|||
IconThemeData? get iconTheme => _theme.iconTheme;
|
||||
|
||||
@override
|
||||
TextStyle? get toolbarTextStyle => _theme.textTheme.bodyText2;
|
||||
TextStyle? get toolbarTextStyle => _theme.textTheme.bodyMedium;
|
||||
|
||||
@override
|
||||
TextStyle? get titleTextStyle => _theme.textTheme.headline6;
|
||||
TextStyle? get titleTextStyle => _theme.textTheme.titleLarge;
|
||||
}
|
||||
|
||||
// BEGIN GENERATED TOKEN PROPERTIES - AppBar
|
||||
|
@ -2375,7 +2375,7 @@ class _AppBarDefaultsM3 extends AppBarTheme {
|
|||
);
|
||||
|
||||
@override
|
||||
TextStyle? get toolbarTextStyle => _textTheme.bodyText2;
|
||||
TextStyle? get toolbarTextStyle => _textTheme.bodyMedium;
|
||||
|
||||
@override
|
||||
TextStyle? get titleTextStyle => _textTheme.titleLarge;
|
||||
|
|
|
@ -121,7 +121,7 @@ class MaterialBanner extends StatefulWidget {
|
|||
/// Style for the text in the [content] of the [MaterialBanner].
|
||||
///
|
||||
/// If `null`, [MaterialBannerThemeData.contentTextStyle] is used. If that is
|
||||
/// also `null`, [TextTheme.bodyText2] of [ThemeData.textTheme] is used.
|
||||
/// also `null`, [TextTheme.bodyMedium] of [ThemeData.textTheme] is used.
|
||||
final TextStyle? contentTextStyle;
|
||||
|
||||
/// The set of actions that are displayed at the bottom or trailing side of
|
||||
|
@ -299,7 +299,7 @@ class _MaterialBannerState extends State<MaterialBanner> {
|
|||
?? theme.colorScheme.surface;
|
||||
final TextStyle? textStyle = widget.contentTextStyle
|
||||
?? bannerTheme.contentTextStyle
|
||||
?? theme.textTheme.bodyText2;
|
||||
?? theme.textTheme.bodyMedium;
|
||||
|
||||
Widget materialBanner = Container(
|
||||
margin: EdgeInsets.only(bottom: elevation > 0 ? 10.0 : 0.0),
|
||||
|
|
|
@ -394,7 +394,7 @@ class _DatePickerModeToggleButtonState extends State<_DatePickerModeToggleButton
|
|||
child: Text(
|
||||
widget.title,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: textTheme.subtitle2?.copyWith(
|
||||
style: textTheme.titleSmall?.copyWith(
|
||||
color: controlColor,
|
||||
),
|
||||
),
|
||||
|
@ -937,10 +937,10 @@ class _DayPickerState extends State<_DayPicker> {
|
|||
final ColorScheme colorScheme = Theme.of(context).colorScheme;
|
||||
final MaterialLocalizations localizations = MaterialLocalizations.of(context);
|
||||
final TextTheme textTheme = Theme.of(context).textTheme;
|
||||
final TextStyle? headerStyle = textTheme.caption?.apply(
|
||||
final TextStyle? headerStyle = textTheme.bodySmall?.apply(
|
||||
color: colorScheme.onSurface.withOpacity(0.60),
|
||||
);
|
||||
final TextStyle dayStyle = textTheme.caption!;
|
||||
final TextStyle dayStyle = textTheme.bodySmall!;
|
||||
final Color enabledDayColor = colorScheme.onSurface.withOpacity(0.87);
|
||||
final Color disabledDayColor = colorScheme.onSurface.withOpacity(0.38);
|
||||
final Color selectedDayColor = colorScheme.onPrimary;
|
||||
|
@ -1185,7 +1185,7 @@ class _YearPickerState extends State<YearPicker> {
|
|||
} else {
|
||||
textColor = colorScheme.onSurface.withOpacity(0.87);
|
||||
}
|
||||
final TextStyle? itemStyle = textTheme.bodyText1?.apply(color: textColor);
|
||||
final TextStyle? itemStyle = textTheme.bodyLarge?.apply(color: textColor);
|
||||
|
||||
BoxDecoration? decoration;
|
||||
if (isSelected) {
|
||||
|
|
|
@ -77,7 +77,7 @@ abstract class ChipAttributes {
|
|||
|
||||
/// The style to be applied to the chip's label.
|
||||
///
|
||||
/// The default label style is [TextTheme.bodyText1] from the overall
|
||||
/// The default label style is [TextTheme.bodyLarge] from the overall
|
||||
/// theme's [ThemeData.textTheme].
|
||||
//
|
||||
/// This only has an effect on widgets that respect the [DefaultTextStyle],
|
||||
|
@ -1167,7 +1167,7 @@ class _RawChipState extends State<RawChip> with MaterialStateMixin, TickerProvid
|
|||
final ChipThemeData chipDefaults = widget.defaultProperties ?? ChipThemeData.fromDefaults(
|
||||
brightness: brightness,
|
||||
secondaryColor: brightness == Brightness.dark ? Colors.tealAccent[200]! : theme.primaryColor,
|
||||
labelStyle: theme.textTheme.bodyText1!,
|
||||
labelStyle: theme.textTheme.bodyLarge!,
|
||||
);
|
||||
final TextDirection? textDirection = Directionality.maybeOf(context);
|
||||
final OutlinedBorder resolvedShape = _getShape(theme, chipTheme, chipDefaults);
|
||||
|
|
|
@ -192,7 +192,7 @@ class CircleAvatar extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
assert(debugCheckHasMediaQuery(context));
|
||||
final ThemeData theme = Theme.of(context);
|
||||
TextStyle textStyle = theme.primaryTextTheme.subtitle1!.copyWith(color: foregroundColor);
|
||||
TextStyle textStyle = theme.primaryTextTheme.titleMedium!.copyWith(color: foregroundColor);
|
||||
Color? effectiveBackgroundColor = backgroundColor;
|
||||
if (effectiveBackgroundColor == null) {
|
||||
switch (ThemeData.estimateBrightnessForColor(textStyle.color!)) {
|
||||
|
|
|
@ -515,7 +515,7 @@ class DataTable extends StatelessWidget {
|
|||
/// {@endtemplate}
|
||||
///
|
||||
/// If null, [DataTableThemeData.dataTextStyle] is used. By default, the text
|
||||
/// style is [TextTheme.bodyText2].
|
||||
/// style is [TextTheme.bodyMedium].
|
||||
final TextStyle? dataTextStyle;
|
||||
|
||||
/// {@template flutter.material.dataTable.headingRowColor}
|
||||
|
@ -565,7 +565,7 @@ class DataTable extends StatelessWidget {
|
|||
/// {@endtemplate}
|
||||
///
|
||||
/// If null, [DataTableThemeData.headingTextStyle] is used. By default, the
|
||||
/// text style is [TextTheme.subtitle2].
|
||||
/// text style is [TextTheme.titleSmall].
|
||||
final TextStyle? headingTextStyle;
|
||||
|
||||
/// {@template flutter.material.dataTable.horizontalMargin}
|
||||
|
@ -774,7 +774,7 @@ class DataTable extends StatelessWidget {
|
|||
final TextStyle effectiveHeadingTextStyle = headingTextStyle
|
||||
?? dataTableTheme.headingTextStyle
|
||||
?? themeData.dataTableTheme.headingTextStyle
|
||||
?? themeData.textTheme.subtitle2!;
|
||||
?? themeData.textTheme.titleSmall!;
|
||||
final double effectiveHeadingRowHeight = headingRowHeight
|
||||
?? dataTableTheme.headingRowHeight
|
||||
?? themeData.dataTableTheme.headingRowHeight
|
||||
|
@ -837,7 +837,7 @@ class DataTable extends StatelessWidget {
|
|||
final TextStyle effectiveDataTextStyle = dataTextStyle
|
||||
?? dataTableTheme.dataTextStyle
|
||||
?? themeData.dataTableTheme.dataTextStyle
|
||||
?? themeData.textTheme.bodyText2!;
|
||||
?? themeData.textTheme.bodyMedium!;
|
||||
final double effectiveDataRowHeight = dataRowHeight
|
||||
?? dataTableTheme.dataRowHeight
|
||||
?? themeData.dataTableTheme.dataRowHeight
|
||||
|
|
|
@ -467,8 +467,8 @@ class _DatePickerDialogState extends State<DatePickerDialog> with RestorationMix
|
|||
? colorScheme.onPrimary
|
||||
: colorScheme.onSurface;
|
||||
final TextStyle? dateStyle = orientation == Orientation.landscape
|
||||
? textTheme.headline5?.copyWith(color: onPrimarySurface)
|
||||
: textTheme.headline4?.copyWith(color: onPrimarySurface);
|
||||
? textTheme.headlineSmall?.copyWith(color: onPrimarySurface)
|
||||
: textTheme.headlineMedium?.copyWith(color: onPrimarySurface);
|
||||
|
||||
final Widget actions = Container(
|
||||
alignment: AlignmentDirectional.centerEnd,
|
||||
|
@ -752,7 +752,7 @@ class _DatePickerHeader extends StatelessWidget {
|
|||
final Color primarySurfaceColor = isDark ? colorScheme.surface : colorScheme.primary;
|
||||
final Color onPrimarySurfaceColor = isDark ? colorScheme.onSurface : colorScheme.onPrimary;
|
||||
|
||||
final TextStyle? helpStyle = textTheme.overline?.copyWith(
|
||||
final TextStyle? helpStyle = textTheme.labelSmall?.copyWith(
|
||||
color: onPrimarySurfaceColor,
|
||||
);
|
||||
|
||||
|
@ -1483,14 +1483,14 @@ class _CalendarRangePickerDialog extends StatelessWidget {
|
|||
final Color headerDisabledForeground = headerForeground.withOpacity(0.38);
|
||||
final String startDateText = _formatRangeStartDate(localizations, selectedStartDate, selectedEndDate);
|
||||
final String endDateText = _formatRangeEndDate(localizations, selectedStartDate, selectedEndDate, DateTime.now());
|
||||
final TextStyle? headlineStyle = textTheme.headline5;
|
||||
final TextStyle? headlineStyle = textTheme.headlineSmall;
|
||||
final TextStyle? startDateStyle = headlineStyle?.apply(
|
||||
color: selectedStartDate != null ? headerForeground : headerDisabledForeground,
|
||||
);
|
||||
final TextStyle? endDateStyle = headlineStyle?.apply(
|
||||
color: selectedEndDate != null ? headerForeground : headerDisabledForeground,
|
||||
);
|
||||
final TextStyle saveButtonStyle = textTheme.button!.apply(
|
||||
final TextStyle saveButtonStyle = textTheme.labelLarge!.apply(
|
||||
color: onConfirm != null ? headerForeground : headerDisabledForeground,
|
||||
);
|
||||
|
||||
|
@ -1525,7 +1525,7 @@ class _CalendarRangePickerDialog extends StatelessWidget {
|
|||
children: <Widget>[
|
||||
Text(
|
||||
helpText,
|
||||
style: textTheme.overline!.apply(
|
||||
style: textTheme.labelSmall!.apply(
|
||||
color: headerForeground,
|
||||
),
|
||||
),
|
||||
|
@ -1984,7 +1984,7 @@ class _DayHeaders extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
final ThemeData themeData = Theme.of(context);
|
||||
final ColorScheme colorScheme = themeData.colorScheme;
|
||||
final TextStyle textStyle = themeData.textTheme.subtitle2!.apply(color: colorScheme.onSurface);
|
||||
final TextStyle textStyle = themeData.textTheme.titleSmall!.apply(color: colorScheme.onSurface);
|
||||
final MaterialLocalizations localizations = MaterialLocalizations.of(context);
|
||||
final List<Widget> labels = _getDayHeaders(textStyle, localizations);
|
||||
|
||||
|
@ -2270,7 +2270,7 @@ class _MonthItemState extends State<_MonthItem> {
|
|||
final bool isDisabled = dayToBuild.isAfter(widget.lastDate) || dayToBuild.isBefore(widget.firstDate);
|
||||
|
||||
BoxDecoration? decoration;
|
||||
TextStyle? itemStyle = textTheme.bodyText2;
|
||||
TextStyle? itemStyle = textTheme.bodyMedium;
|
||||
|
||||
final bool isRangeSelected = widget.selectedDateStart != null && widget.selectedDateEnd != null;
|
||||
final bool isSelectedDayStart = widget.selectedDateStart != null && dayToBuild.isAtSameMomentAs(widget.selectedDateStart!);
|
||||
|
@ -2284,7 +2284,7 @@ class _MonthItemState extends State<_MonthItem> {
|
|||
if (isSelectedDayStart || isSelectedDayEnd) {
|
||||
// The selected start and end dates gets a circle background
|
||||
// highlight, and a contrasting text color.
|
||||
itemStyle = textTheme.bodyText2?.apply(color: colorScheme.onPrimary);
|
||||
itemStyle = textTheme.bodyMedium?.apply(color: colorScheme.onPrimary);
|
||||
decoration = BoxDecoration(
|
||||
color: colorScheme.primary,
|
||||
shape: BoxShape.circle,
|
||||
|
@ -2308,11 +2308,11 @@ class _MonthItemState extends State<_MonthItem> {
|
|||
textDirection: textDirection,
|
||||
);
|
||||
} else if (isDisabled) {
|
||||
itemStyle = textTheme.bodyText2?.apply(color: colorScheme.onSurface.withOpacity(0.38));
|
||||
itemStyle = textTheme.bodyMedium?.apply(color: colorScheme.onSurface.withOpacity(0.38));
|
||||
} else if (DateUtils.isSameDay(widget.currentDate, dayToBuild)) {
|
||||
// The current day gets a different text color and a circle stroke
|
||||
// border.
|
||||
itemStyle = textTheme.bodyText2?.apply(color: colorScheme.primary);
|
||||
itemStyle = textTheme.bodyMedium?.apply(color: colorScheme.primary);
|
||||
decoration = BoxDecoration(
|
||||
border: Border.all(color: colorScheme.primary),
|
||||
shape: BoxShape.circle,
|
||||
|
@ -2458,7 +2458,7 @@ class _MonthItemState extends State<_MonthItem> {
|
|||
child: ExcludeSemantics(
|
||||
child: Text(
|
||||
localizations.formatMonthYear(widget.displayedMonth),
|
||||
style: textTheme.bodyText2!.apply(color: themeData.colorScheme.onSurface),
|
||||
style: textTheme.bodyMedium!.apply(color: themeData.colorScheme.onSurface),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2606,8 +2606,8 @@ class _InputDateRangePickerDialog extends StatelessWidget {
|
|||
? colorScheme.onPrimary
|
||||
: colorScheme.onSurface;
|
||||
final TextStyle? dateStyle = orientation == Orientation.landscape
|
||||
? textTheme.headline5?.apply(color: onPrimarySurfaceColor)
|
||||
: textTheme.headline4?.apply(color: onPrimarySurfaceColor);
|
||||
? textTheme.headlineSmall?.apply(color: onPrimarySurfaceColor)
|
||||
: textTheme.headlineMedium?.apply(color: onPrimarySurfaceColor);
|
||||
final String dateText = _formatDateRange(context, selectedStartDate, selectedEndDate, currentDate!);
|
||||
final String semanticDateText = selectedStartDate != null && selectedEndDate != null
|
||||
? '${localizations.formatMediumDate(selectedStartDate!)} – ${localizations.formatMediumDate(selectedEndDate!)}'
|
||||
|
|
|
@ -334,7 +334,7 @@ class AlertDialog extends StatelessWidget {
|
|||
/// Style for the text in the [title] of this [AlertDialog].
|
||||
///
|
||||
/// If null, [DialogTheme.titleTextStyle] is used. If that's null, defaults to
|
||||
/// [TextTheme.headline6] of [ThemeData.textTheme].
|
||||
/// [TextTheme.titleLarge] of [ThemeData.textTheme].
|
||||
final TextStyle? titleTextStyle;
|
||||
|
||||
/// The (optional) content of the dialog is displayed in the center of the
|
||||
|
@ -363,7 +363,7 @@ class AlertDialog extends StatelessWidget {
|
|||
/// Style for the text in the [content] of this [AlertDialog].
|
||||
///
|
||||
/// If null, [DialogTheme.contentTextStyle] is used. If that's null, defaults
|
||||
/// to [TextTheme.subtitle1] of [ThemeData.textTheme].
|
||||
/// to [TextTheme.titleMedium] of [ThemeData.textTheme].
|
||||
final TextStyle? contentTextStyle;
|
||||
|
||||
/// The (optional) set of actions that are displayed at the bottom of the
|
||||
|
@ -888,7 +888,7 @@ class SimpleDialog extends StatelessWidget {
|
|||
/// Style for the text in the [title] of this [SimpleDialog].
|
||||
///
|
||||
/// If null, [DialogTheme.titleTextStyle] is used. If that's null, defaults to
|
||||
/// [TextTheme.headline6] of [ThemeData.textTheme].
|
||||
/// [TextTheme.titleLarge] of [ThemeData.textTheme].
|
||||
final TextStyle? titleTextStyle;
|
||||
|
||||
/// The (optional) content of the dialog is displayed in a
|
||||
|
@ -976,7 +976,7 @@ class SimpleDialog extends StatelessWidget {
|
|||
bottom: children == null ? effectiveTitlePadding.bottom * paddingScaleFactor : effectiveTitlePadding.bottom,
|
||||
),
|
||||
child: DefaultTextStyle(
|
||||
style: titleTextStyle ?? DialogTheme.of(context).titleTextStyle ?? theme.textTheme.headline6!,
|
||||
style: titleTextStyle ?? DialogTheme.of(context).titleTextStyle ?? theme.textTheme.titleLarge!,
|
||||
child: Semantics(
|
||||
// For iOS platform, the focus always lands on the title.
|
||||
// Set nameRoute to false to avoid title being announce twice.
|
||||
|
@ -1297,10 +1297,10 @@ class _DialogDefaultsM2 extends DialogTheme {
|
|||
Color? get backgroundColor => Theme.of(context).dialogBackgroundColor;
|
||||
|
||||
@override
|
||||
TextStyle? get titleTextStyle => _textTheme.headline6;
|
||||
TextStyle? get titleTextStyle => _textTheme.titleLarge;
|
||||
|
||||
@override
|
||||
TextStyle? get contentTextStyle => _textTheme.subtitle1;
|
||||
TextStyle? get contentTextStyle => _textTheme.titleMedium;
|
||||
|
||||
@override
|
||||
EdgeInsetsGeometry? get actionsPadding => EdgeInsets.zero;
|
||||
|
|
|
@ -91,7 +91,7 @@ class DrawerHeader extends StatelessWidget {
|
|||
duration: duration,
|
||||
curve: curve,
|
||||
child: child == null ? null : DefaultTextStyle(
|
||||
style: theme.textTheme.bodyText1!,
|
||||
style: theme.textTheme.bodyLarge!,
|
||||
child: MediaQuery.removePadding(
|
||||
context: context,
|
||||
removeTop: true,
|
||||
|
|
|
@ -1050,7 +1050,7 @@ class DropdownButton<T> extends StatefulWidget {
|
|||
/// ** See code in examples/api/lib/material/dropdown/dropdown_button.style.0.dart **
|
||||
/// {@end-tool}
|
||||
///
|
||||
/// Defaults to the [TextTheme.subtitle1] value of the current
|
||||
/// Defaults to the [TextTheme.titleMedium] value of the current
|
||||
/// [ThemeData.textTheme] of the current [Theme].
|
||||
final TextStyle? style;
|
||||
|
||||
|
@ -1266,7 +1266,7 @@ class _DropdownButtonState<T> extends State<DropdownButton<T>> with WidgetsBindi
|
|||
}
|
||||
}
|
||||
|
||||
TextStyle? get _textStyle => widget.style ?? Theme.of(context).textTheme.subtitle1;
|
||||
TextStyle? get _textStyle => widget.style ?? Theme.of(context).textTheme.titleMedium;
|
||||
|
||||
void _handleTap() {
|
||||
final TextDirection? textDirection = Directionality.maybeOf(context);
|
||||
|
@ -1334,7 +1334,7 @@ class _DropdownButtonState<T> extends State<DropdownButton<T>> with WidgetsBindi
|
|||
// would be clipped.
|
||||
double get _denseButtonHeight {
|
||||
final double textScaleFactor = MediaQuery.of(context).textScaleFactor;
|
||||
final double fontSize = _textStyle!.fontSize ?? Theme.of(context).textTheme.subtitle1!.fontSize!;
|
||||
final double fontSize = _textStyle!.fontSize ?? Theme.of(context).textTheme.titleMedium!.fontSize!;
|
||||
final double scaledFontSize = textScaleFactor * fontSize;
|
||||
return math.max(scaledFontSize, math.max(widget.iconSize, _kDenseButtonHeight));
|
||||
}
|
||||
|
|
|
@ -362,7 +362,7 @@ class ElevatedButton extends ButtonStyleButton {
|
|||
disabledForegroundColor: colorScheme.onSurface.withOpacity(0.38),
|
||||
shadowColor: theme.shadowColor,
|
||||
elevation: 2,
|
||||
textStyle: theme.textTheme.button,
|
||||
textStyle: theme.textTheme.labelLarge,
|
||||
padding: _scaledPadding(context),
|
||||
minimumSize: const Size(64, 36),
|
||||
maximumSize: Size.infinite,
|
||||
|
|
|
@ -409,7 +409,7 @@ class _ExpansionTileState extends State<ExpansionTile> with SingleTickerProvider
|
|||
_headerColorTween
|
||||
..begin = widget.collapsedTextColor
|
||||
?? expansionTileTheme.collapsedTextColor
|
||||
?? theme.textTheme.subtitle1!.color
|
||||
?? theme.textTheme.titleMedium!.color
|
||||
..end = widget.textColor ?? expansionTileTheme.textColor ?? colorScheme.primary;
|
||||
_iconColorTween
|
||||
..begin = widget.collapsedIconColor
|
||||
|
|
|
@ -322,7 +322,7 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
|
|||
|
||||
final double opacity = settings.toolbarOpacity;
|
||||
if (opacity > 0.0) {
|
||||
TextStyle titleStyle = theme.primaryTextTheme.headline6!;
|
||||
TextStyle titleStyle = theme.primaryTextTheme.titleLarge!;
|
||||
titleStyle = titleStyle.copyWith(
|
||||
color: titleStyle.color!.withOpacity(opacity),
|
||||
);
|
||||
|
|
|
@ -501,7 +501,7 @@ class FloatingActionButton extends StatelessWidget {
|
|||
/// The text style for an extended [FloatingActionButton]'s label.
|
||||
///
|
||||
/// If null, [FloatingActionButtonThemeData.extendedTextStyle] is used. If
|
||||
/// that is also null, then [TextTheme.button] with a letter spacing of 1.2
|
||||
/// that is also null, then [TextTheme.labelLarge] with a letter spacing of 1.2
|
||||
/// is used.
|
||||
final TextStyle? extendedTextStyle;
|
||||
|
||||
|
@ -794,7 +794,7 @@ class _FABDefaultsM2 extends FloatingActionButtonThemeData {
|
|||
@override double? get iconSize => _isLarge ? 36.0 : 24.0;
|
||||
|
||||
@override EdgeInsetsGeometry? get extendedPadding => EdgeInsetsDirectional.only(start: hasChild && _isExtended ? 16.0 : 20.0, end: 20.0);
|
||||
@override TextStyle? get extendedTextStyle => _theme.textTheme.button!.copyWith(letterSpacing: 1.2);
|
||||
@override TextStyle? get extendedTextStyle => _theme.textTheme.labelLarge!.copyWith(letterSpacing: 1.2);
|
||||
}
|
||||
|
||||
// BEGIN GENERATED TOKEN PROPERTIES - FAB
|
||||
|
|
|
@ -88,13 +88,13 @@ class GridTileBar extends StatelessWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
DefaultTextStyle(
|
||||
style: darkTheme.textTheme.subtitle1!,
|
||||
style: darkTheme.textTheme.titleMedium!,
|
||||
softWrap: false,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
child: title!,
|
||||
),
|
||||
DefaultTextStyle(
|
||||
style: darkTheme.textTheme.caption!,
|
||||
style: darkTheme.textTheme.bodySmall!,
|
||||
softWrap: false,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
child: subtitle!,
|
||||
|
@ -105,7 +105,7 @@ class GridTileBar extends StatelessWidget {
|
|||
else if (title != null || subtitle != null)
|
||||
Expanded(
|
||||
child: DefaultTextStyle(
|
||||
style: darkTheme.textTheme.subtitle1!,
|
||||
style: darkTheme.textTheme.titleMedium!,
|
||||
softWrap: false,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
child: title ?? subtitle!,
|
||||
|
|
|
@ -1761,7 +1761,7 @@ class InputDecorator extends StatefulWidget {
|
|||
/// The style on which to base the label, hint, counter, and error styles
|
||||
/// if the [decoration] does not provide explicit styles.
|
||||
///
|
||||
/// If null, `baseStyle` defaults to the `subtitle1` style from the
|
||||
/// If null, `baseStyle` defaults to the `titleMedium` style from the
|
||||
/// current [Theme], see [ThemeData.textTheme].
|
||||
///
|
||||
/// The [TextStyle.textBaseline] of the [baseStyle] is used to determine
|
||||
|
@ -2029,7 +2029,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
|
|||
final TextStyle? style = MaterialStateProperty.resolveAs(decoration.labelStyle, materialState)
|
||||
?? MaterialStateProperty.resolveAs(themeData.inputDecorationTheme.labelStyle, materialState);
|
||||
|
||||
return themeData.textTheme.subtitle1!
|
||||
return themeData.textTheme.titleMedium!
|
||||
.merge(widget.baseStyle)
|
||||
.merge(defaultStyle)
|
||||
.merge(style)
|
||||
|
@ -2044,7 +2044,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
|
|||
final TextStyle? style = MaterialStateProperty.resolveAs(decoration.hintStyle, materialState)
|
||||
?? MaterialStateProperty.resolveAs(themeData.inputDecorationTheme.hintStyle, materialState);
|
||||
|
||||
return themeData.textTheme.subtitle1!
|
||||
return themeData.textTheme.titleMedium!
|
||||
.merge(widget.baseStyle)
|
||||
.merge(defaultStyle)
|
||||
.merge(style);
|
||||
|
@ -2060,7 +2060,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
|
|||
final TextStyle? style = MaterialStateProperty.resolveAs(decoration.floatingLabelStyle, materialState)
|
||||
?? MaterialStateProperty.resolveAs(themeData.inputDecorationTheme.floatingLabelStyle, materialState);
|
||||
|
||||
return themeData.textTheme.subtitle1!
|
||||
return themeData.textTheme.titleMedium!
|
||||
.merge(widget.baseStyle)
|
||||
.copyWith(height: 1)
|
||||
.merge(defaultTextStyle)
|
||||
|
@ -4357,19 +4357,19 @@ class _InputDecoratorDefaultsM2 extends InputDecorationTheme {
|
|||
TextStyle? get helperStyle => MaterialStateTextStyle.resolveWith((Set<MaterialState> states) {
|
||||
final ThemeData themeData= Theme.of(context);
|
||||
if (states.contains(MaterialState.disabled)) {
|
||||
return themeData.textTheme.caption!.copyWith(color: Colors.transparent);
|
||||
return themeData.textTheme.bodySmall!.copyWith(color: Colors.transparent);
|
||||
}
|
||||
|
||||
return themeData.textTheme.caption!.copyWith(color: themeData.hintColor);
|
||||
return themeData.textTheme.bodySmall!.copyWith(color: themeData.hintColor);
|
||||
});
|
||||
|
||||
@override
|
||||
TextStyle? get errorStyle => MaterialStateTextStyle.resolveWith((Set<MaterialState> states) {
|
||||
final ThemeData themeData= Theme.of(context);
|
||||
if (states.contains(MaterialState.disabled)) {
|
||||
return themeData.textTheme.caption!.copyWith(color: Colors.transparent);
|
||||
return themeData.textTheme.bodySmall!.copyWith(color: Colors.transparent);
|
||||
}
|
||||
return themeData.textTheme.caption!.copyWith(color: themeData.errorColor);
|
||||
return themeData.textTheme.bodySmall!.copyWith(color: themeData.errorColor);
|
||||
});
|
||||
|
||||
@override
|
||||
|
|
|
@ -23,8 +23,8 @@ import 'theme_data.dart';
|
|||
|
||||
/// Defines the title font used for [ListTile] descendants of a [ListTileTheme].
|
||||
///
|
||||
/// List tiles that appear in a [Drawer] use the theme's [TextTheme.bodyText1]
|
||||
/// text style, which is a little smaller than the theme's [TextTheme.subtitle1]
|
||||
/// List tiles that appear in a [Drawer] use the theme's [TextTheme.bodyLarge]
|
||||
/// text style, which is a little smaller than the theme's [TextTheme.titleMedium]
|
||||
/// text style, which is used by default.
|
||||
enum ListTileStyle {
|
||||
/// Use a title font that's appropriate for a [ListTile] in a list.
|
||||
|
@ -323,14 +323,14 @@ class ListTile extends StatelessWidget {
|
|||
/// two lines. For example, you can use [Text.maxLines] to enforce the number
|
||||
/// of lines.
|
||||
///
|
||||
/// The subtitle's default [TextStyle] depends on [TextTheme.bodyText2] except
|
||||
/// The subtitle's default [TextStyle] depends on [TextTheme.bodyMedium] except
|
||||
/// [TextStyle.color]. The [TextStyle.color] depends on the value of [enabled]
|
||||
/// and [selected].
|
||||
///
|
||||
/// When [enabled] is false, the text color is set to [ThemeData.disabledColor].
|
||||
///
|
||||
/// When [selected] is false, the text color is set to [ListTileTheme.textColor]
|
||||
/// if it's not null and to [TextTheme.caption]'s color if [ListTileTheme.textColor]
|
||||
/// if it's not null and to [TextTheme.bodySmall]'s color if [ListTileTheme.textColor]
|
||||
/// is null.
|
||||
final Widget? subtitle;
|
||||
|
||||
|
@ -624,10 +624,10 @@ class ListTile extends StatelessWidget {
|
|||
final TextStyle textStyle;
|
||||
switch(style ?? tileTheme.style ?? theme.listTileTheme.style ?? ListTileStyle.list) {
|
||||
case ListTileStyle.drawer:
|
||||
textStyle = theme.useMaterial3 ? theme.textTheme.bodyMedium! : theme.textTheme.bodyText1!;
|
||||
textStyle = theme.useMaterial3 ? theme.textTheme.bodyMedium! : theme.textTheme.bodyLarge!;
|
||||
break;
|
||||
case ListTileStyle.list:
|
||||
textStyle = theme.useMaterial3 ? theme.textTheme.titleMedium! : theme.textTheme.subtitle1!;
|
||||
textStyle = theme.useMaterial3 ? theme.textTheme.titleMedium! : theme.textTheme.titleMedium!;
|
||||
break;
|
||||
}
|
||||
final Color? color = _textColor(theme, tileTheme, textStyle.color);
|
||||
|
@ -637,11 +637,11 @@ class ListTile extends StatelessWidget {
|
|||
}
|
||||
|
||||
TextStyle _subtitleTextStyle(ThemeData theme, ListTileThemeData tileTheme) {
|
||||
final TextStyle textStyle = theme.useMaterial3 ? theme.textTheme.bodyMedium! : theme.textTheme.bodyText2!;
|
||||
final TextStyle textStyle = theme.useMaterial3 ? theme.textTheme.bodyMedium! : theme.textTheme.bodyMedium!;
|
||||
final Color? color = _textColor(
|
||||
theme,
|
||||
tileTheme,
|
||||
theme.useMaterial3 ? theme.textTheme.bodySmall!.color : theme.textTheme.caption!.color,
|
||||
theme.useMaterial3 ? theme.textTheme.bodySmall!.color : theme.textTheme.bodySmall!.color,
|
||||
);
|
||||
return _isDenseLayout(theme, tileTheme)
|
||||
? textStyle.copyWith(color: color, fontSize: 12.0)
|
||||
|
@ -649,7 +649,7 @@ class ListTile extends StatelessWidget {
|
|||
}
|
||||
|
||||
TextStyle _trailingAndLeadingTextStyle(ThemeData theme, ListTileThemeData tileTheme) {
|
||||
final TextStyle textStyle = theme.useMaterial3 ? theme.textTheme.bodyMedium! : theme.textTheme.bodyText2!;
|
||||
final TextStyle textStyle = theme.useMaterial3 ? theme.textTheme.bodyMedium! : theme.textTheme.bodyMedium!;
|
||||
final Color? color = _textColor(theme, tileTheme, textStyle.color);
|
||||
return textStyle.copyWith(color: color);
|
||||
}
|
||||
|
|
|
@ -417,7 +417,7 @@ class _MaterialState extends State<Material> with TickerProviderStateMixin {
|
|||
Widget? contents = widget.child;
|
||||
if (contents != null) {
|
||||
contents = AnimatedDefaultTextStyle(
|
||||
style: widget.textStyle ?? Theme.of(context).textTheme.bodyText2!,
|
||||
style: widget.textStyle ?? Theme.of(context).textTheme.bodyMedium!,
|
||||
duration: widget.animationDuration,
|
||||
child: contents,
|
||||
);
|
||||
|
|
|
@ -130,7 +130,7 @@ class MaterialButton extends StatelessWidget {
|
|||
/// The color to use for this button's text.
|
||||
///
|
||||
/// The button's [Material.textStyle] will be the current theme's button text
|
||||
/// style, [TextTheme.button] of [ThemeData.textTheme], configured with this
|
||||
/// style, [TextTheme.labelLarge] of [ThemeData.textTheme], configured with this
|
||||
/// color.
|
||||
///
|
||||
/// The default text color depends on the button theme's text theme,
|
||||
|
@ -148,7 +148,7 @@ class MaterialButton extends StatelessWidget {
|
|||
/// The color to use for this button's text when the button is disabled.
|
||||
///
|
||||
/// The button's [Material.textStyle] will be the current theme's button text
|
||||
/// style, [TextTheme.button] of [ThemeData.textTheme], configured with this
|
||||
/// style, [TextTheme.labelLarge] of [ThemeData.textTheme], configured with this
|
||||
/// color.
|
||||
///
|
||||
/// The default value is the theme's disabled color,
|
||||
|
@ -395,7 +395,7 @@ class MaterialButton extends StatelessWidget {
|
|||
onHighlightChanged: onHighlightChanged,
|
||||
mouseCursor: mouseCursor,
|
||||
fillColor: buttonTheme.getFillColor(this),
|
||||
textStyle: theme.textTheme.button!.copyWith(color: buttonTheme.getTextColor(this)),
|
||||
textStyle: theme.textTheme.labelLarge!.copyWith(color: buttonTheme.getTextColor(this)),
|
||||
focusColor: focusColor ?? buttonTheme.getFocusColor(this),
|
||||
hoverColor: hoverColor ?? buttonTheme.getHoverColor(this),
|
||||
highlightColor: highlightColor ?? theme.highlightColor,
|
||||
|
|
|
@ -268,7 +268,7 @@ class NavigationDestination extends StatelessWidget {
|
|||
///
|
||||
/// The accompanying [Text] widget will use
|
||||
/// [NavigationBarThemeData.labelTextStyle]. If this are null, the default
|
||||
/// text style would use [TextTheme.overline] with [ColorScheme.onSurface].
|
||||
/// text style would use [TextTheme.labelSmall] with [ColorScheme.onSurface].
|
||||
final String label;
|
||||
|
||||
/// The text to display in the tooltip for this [NavigationDestination], when
|
||||
|
@ -1224,7 +1224,7 @@ class _NavigationBarDefaultsM2 extends NavigationBarThemeData {
|
|||
|
||||
@override Color? get indicatorColor => _colors.secondary.withOpacity(0.24);
|
||||
|
||||
@override MaterialStateProperty<TextStyle?>? get labelTextStyle => MaterialStatePropertyAll<TextStyle?>(_theme.textTheme.overline!.copyWith(color: _colors.onSurface));
|
||||
@override MaterialStateProperty<TextStyle?>? get labelTextStyle => MaterialStatePropertyAll<TextStyle?>(_theme.textTheme.labelSmall!.copyWith(color: _colors.onSurface));
|
||||
}
|
||||
|
||||
// BEGIN GENERATED TOKEN PROPERTIES - NavigationBar
|
||||
|
|
|
@ -226,7 +226,7 @@ class NavigationRail extends StatefulWidget {
|
|||
/// When one of the [destinations] is selected the [selectedLabelTextStyle]
|
||||
/// will be used instead.
|
||||
///
|
||||
/// The default value is based on the [Theme]'s [TextTheme.bodyText1]. The
|
||||
/// The default value is based on the [Theme]'s [TextTheme.bodyLarge]. The
|
||||
/// default color is based on the [Theme]'s [ColorScheme.onSurface].
|
||||
///
|
||||
/// Properties from this text style, or
|
||||
|
@ -239,7 +239,7 @@ class NavigationRail extends StatefulWidget {
|
|||
/// When a [NavigationRailDestination] is not selected,
|
||||
/// [unselectedLabelTextStyle] will be used.
|
||||
///
|
||||
/// The default value is based on the [TextTheme.bodyText1] of
|
||||
/// The default value is based on the [TextTheme.bodyLarge] of
|
||||
/// [ThemeData.textTheme]. The default color is based on the [Theme]'s
|
||||
/// [ColorScheme.primary].
|
||||
///
|
||||
|
@ -936,11 +936,11 @@ class _NavigationRailDefaultsM2 extends NavigationRailThemeData {
|
|||
@override Color? get backgroundColor => _colors.surface;
|
||||
|
||||
@override TextStyle? get unselectedLabelTextStyle {
|
||||
return _theme.textTheme.bodyText1!.copyWith(color: _colors.onSurface.withOpacity(0.64));
|
||||
return _theme.textTheme.bodyLarge!.copyWith(color: _colors.onSurface.withOpacity(0.64));
|
||||
}
|
||||
|
||||
@override TextStyle? get selectedLabelTextStyle {
|
||||
return _theme.textTheme.bodyText1!.copyWith(color: _colors.primary);
|
||||
return _theme.textTheme.bodyLarge!.copyWith(color: _colors.primary);
|
||||
}
|
||||
|
||||
@override IconThemeData? get unselectedIconTheme {
|
||||
|
|
|
@ -318,7 +318,7 @@ class OutlinedButton extends ButtonStyleButton {
|
|||
disabledBackgroundColor: Colors.transparent,
|
||||
shadowColor: theme.shadowColor,
|
||||
elevation: 0,
|
||||
textStyle: theme.textTheme.button,
|
||||
textStyle: theme.textTheme.labelLarge,
|
||||
padding: _scaledPadding(context),
|
||||
minimumSize: const Size(64, 36),
|
||||
maximumSize: Size.infinite,
|
||||
|
|
|
@ -404,7 +404,7 @@ class PaginatedDataTableState extends State<PaginatedDataTable> {
|
|||
}
|
||||
|
||||
// FOOTER
|
||||
final TextStyle? footerTextStyle = themeData.textTheme.caption;
|
||||
final TextStyle? footerTextStyle = themeData.textTheme.bodySmall;
|
||||
final List<Widget> footerWidgets = <Widget>[];
|
||||
if (widget.onRowsPerPageChanged != null) {
|
||||
final List<Widget> availableRowsPerPage = widget.availableRowsPerPage
|
||||
|
@ -493,8 +493,8 @@ class PaginatedDataTableState extends State<PaginatedDataTable> {
|
|||
// These typographic styles aren't quite the regular ones. We pick the closest ones from the regular
|
||||
// list and then tweak them appropriately.
|
||||
// See https://material.io/design/components/data-tables.html#tables-within-cards
|
||||
style: _selectedRowCount > 0 ? themeData.textTheme.subtitle1!.copyWith(color: themeData.colorScheme.secondary)
|
||||
: themeData.textTheme.headline6!.copyWith(fontWeight: FontWeight.w400),
|
||||
style: _selectedRowCount > 0 ? themeData.textTheme.titleMedium!.copyWith(color: themeData.colorScheme.secondary)
|
||||
: themeData.textTheme.titleLarge!.copyWith(fontWeight: FontWeight.w400),
|
||||
child: IconTheme.merge(
|
||||
data: const IconThemeData(
|
||||
opacity: 0.54,
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue