Files
alan 3933ff980c Remove Cupertino settings branches
Keep the Material settings implementation while preserving public Cupertino parameters for later cleanup. Narrow settings tests to the Material-only behavior.
2026-11-11 05:21:30 +00:00

25 lines
621 B
Dart

import 'package:flutter/material.dart';
Color settingsErrorColor(BuildContext context) =>
Theme.of(context).colorScheme.error;
/// Resolve the app's text roles from the Material theme.
TextStyle settingsTextStyle(
BuildContext context, {
bool title = false,
bool secondary = false,
bool error = false,
}) {
final theme = Theme.of(context);
final base = (title
? theme.textTheme.titleMedium
: theme.textTheme.bodyMedium)!;
return base.copyWith(
color: error
? theme.colorScheme.error
: secondary
? theme.colorScheme.onSurfaceVariant
: base.color,
);
}