import 'package:flutter/material.dart'; /// Host-native typography and colour for the approval and question cards. /// /// The cards share one hierarchy: the card title uses the host's title style, /// field/answer labels sit visibly below it, and recorded prose uses the body /// style. Keeping the styles here stops each card file from inventing its own /// size and colour; everything still comes from the active Material theme, so /// light, dark and text scaling follow the host. /// /// All helpers use the shared Material theme roles. TextStyle? chatCardTitleStyle(BuildContext context) => Theme.of(context).textTheme.titleMedium; TextStyle? chatCardBodyStyle(BuildContext context) => Theme.of(context).textTheme.bodyMedium; /// A field or recorded-answer label: `titleSmall`, so labels sit visibly /// below the card title without reading as extra headings. TextStyle? chatCardLabelStyle(BuildContext context) => Theme.of(context).textTheme.titleSmall; /// Body text that supports a control, such as a field description. TextStyle? chatCardSecondaryStyle(BuildContext context) => (chatCardBodyStyle(context) ?? const TextStyle()).copyWith( color: chatCardSecondaryColor(context), ); Color chatCardSecondaryColor(BuildContext context) => Theme.of(context).colorScheme.onSurfaceVariant; Color chatCardErrorColor(BuildContext context) => Theme.of(context).colorScheme.error; /// The amber risk hue: the host's warning role, never a bespoke palette. Color chatCardWarningColor(BuildContext context) => Theme.of(context).colorScheme.tertiary; /// A quiet inset surface for resource blocks and risk panels. Color chatCardFillColor(BuildContext context) => Theme.of(context).colorScheme.surfaceContainerHighest; Color chatCardWarningFillColor(BuildContext context) => Theme.of(context).colorScheme.tertiaryContainer;