build method

  1. @override
dynamic build(
  1. dynamic context
)

Implementation

@override
Widget build(BuildContext context) {
  final l10n = AppLocalizations.of(context)!;
  final p = probe.provenance;
  final theme = Theme.of(context);
  return Card(
    child: Padding(
      padding: const EdgeInsets.all(16),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Text(
            l10n.inferenceProvenanceTitle,
            style: theme.textTheme.titleMedium,
          ),
          const SizedBox(height: 8),
          if (!probe.ok)
            Padding(
              padding: const EdgeInsets.only(bottom: 8),
              child: Text(
                l10n.inferenceUnavailable(inferenceErrorText(l10n, probe)),
                key: const Key('inference-refusal'),
                style: TextStyle(color: theme.colorScheme.error),
              ),
            ),
          if (p != null) _rows(l10n, p),
        ],
      ),
    ),
  );
}