resolve method

PrismStateViewStyle resolve(
  1. BuildContext context
)

Returns a copy with unset fields resolved against context.

Implementation

PrismStateViewStyle resolve(BuildContext context) {
  final theme = Theme.of(context);
  final tokens = PrismTokens.of(context);
  final colors = PrismColors.of(context);
  return PrismStateViewStyle(
    messageStyle: messageStyle ?? theme.textTheme.titleMedium,
    errorColor: errorColor ?? colors.error,
    iconColor: iconColor ?? theme.colorScheme.outline,
    accentColor: accentColor ?? theme.colorScheme.primary,
    transitionDuration: transitionDuration ?? tokens.durationMedium,
    iconSize: iconSize ?? tokens.spaceXxl,
    padding: padding ?? EdgeInsets.all(tokens.spaceLg),
    gap: gap ?? tokens.spaceSm,
    retryLabel: retryLabel ?? 'Retry',
  );
}