4647b9c43e
Keep the Material-only schedules implementation while preserving public Cupertino parameters for callers. Remove Cupertino-only test hosts and variants because the app runs every schedule screen under MaterialApp.
33 lines
1.1 KiB
Dart
33 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// Material text roles and standard buttons for the pipeline schedule section.
|
|
/// No palette, font family or explicit point size is introduced.
|
|
TextStyle? schedulePipelineHeadingStyle(BuildContext context) =>
|
|
Theme.of(context).textTheme.titleMedium;
|
|
|
|
TextStyle? schedulePipelineMutedStyle(BuildContext context) {
|
|
final theme = Theme.of(context);
|
|
return theme.textTheme.bodySmall?.copyWith(
|
|
color: theme.colorScheme.onSurfaceVariant,
|
|
);
|
|
}
|
|
|
|
TextStyle? schedulePipelineStatusStyle(BuildContext context, bool enabled) {
|
|
final base = schedulePipelineMutedStyle(context);
|
|
if (!enabled) return base;
|
|
return base?.copyWith(color: Theme.of(context).colorScheme.primary);
|
|
}
|
|
|
|
TextStyle? schedulePipelineErrorStyle(BuildContext context) =>
|
|
TextStyle(color: Theme.of(context).colorScheme.error);
|
|
|
|
/// A standard text action.
|
|
Widget schedulePipelineTextButton(
|
|
BuildContext context, {
|
|
required String label,
|
|
required VoidCallback? onPressed,
|
|
Key? key,
|
|
}) {
|
|
return TextButton(key: key, onPressed: onPressed, child: Text(label));
|
|
}
|