fix(app): use native schedule text roles instead of fixed sizes and weights
This commit is contained in:
@@ -6,8 +6,8 @@ import '../../../../ui/adaptive/host.dart';
|
||||
/// Secondary text under a field, using the host's own colours and text theme.
|
||||
TextStyle scheduleEditorSecondaryStyle(BuildContext context) {
|
||||
if (usesCupertinoHost(context)) {
|
||||
return CupertinoTheme.of(context).textTheme.textStyle.copyWith(
|
||||
fontSize: 14,
|
||||
// The host's own secondary-label style; no invented point size.
|
||||
return CupertinoTheme.of(context).textTheme.tabLabelTextStyle.copyWith(
|
||||
color: CupertinoColors.secondaryLabel.resolveFrom(context),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -80,28 +80,22 @@ class ScheduleListRow extends StatelessWidget {
|
||||
Text(value, style: _metaStyle(context));
|
||||
|
||||
TextStyle? _titleStyle(BuildContext context) => cupertino
|
||||
? CupertinoTheme.of(
|
||||
context,
|
||||
).textTheme.textStyle.copyWith(fontWeight: FontWeight.w600)
|
||||
: Theme.of(
|
||||
context,
|
||||
).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600);
|
||||
? CupertinoTheme.of(context).textTheme.navTitleTextStyle
|
||||
: Theme.of(context).textTheme.titleMedium;
|
||||
|
||||
TextStyle? _bodyStyle(BuildContext context) =>
|
||||
cupertino ? CupertinoTheme.of(context).textTheme.textStyle : null;
|
||||
|
||||
TextStyle? _metaStyle(BuildContext context) => cupertino
|
||||
? CupertinoTheme.of(context).textTheme.textStyle.copyWith(
|
||||
fontSize: 14,
|
||||
color: _secondaryColor(context),
|
||||
)
|
||||
? CupertinoTheme.of(
|
||||
context,
|
||||
).textTheme.tabLabelTextStyle.copyWith(color: _secondaryColor(context))
|
||||
: Theme.of(
|
||||
context,
|
||||
).textTheme.bodySmall?.copyWith(color: _secondaryColor(context));
|
||||
|
||||
TextStyle? _statusStyle(BuildContext context) => _metaStyle(
|
||||
context,
|
||||
)?.copyWith(color: _statusColor(context), fontWeight: FontWeight.w600);
|
||||
TextStyle? _statusStyle(BuildContext context) =>
|
||||
_metaStyle(context)?.copyWith(color: _statusColor(context));
|
||||
|
||||
Color _secondaryColor(BuildContext context) => cupertino
|
||||
? CupertinoColors.secondaryLabel.resolveFrom(context)
|
||||
|
||||
@@ -169,8 +169,7 @@ class ScheduleListToolbar extends StatelessWidget {
|
||||
}
|
||||
|
||||
TextStyle? _metaStyle(BuildContext context) => cupertino
|
||||
? CupertinoTheme.of(context).textTheme.textStyle.copyWith(
|
||||
fontSize: 14,
|
||||
? CupertinoTheme.of(context).textTheme.tabLabelTextStyle.copyWith(
|
||||
color: CupertinoColors.secondaryLabel.resolveFrom(context),
|
||||
)
|
||||
: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||
|
||||
Reference in New Issue
Block a user