build method

  1. @override
Widget build(
  1. BuildContext context
)
override

Describes the part of the UI represented by this widget.

Implementation

@override
Widget build(BuildContext context) {
  final theme = ThemeScope.of(context);
  final sbTheme = theme.statusBarTheme;

  final kBg = keyBackground ?? sbTheme?.keyBackground ?? theme.muted;
  final kFg = keyForeground ?? sbTheme?.keyForeground ?? theme.onSurface;
  final dFg = descriptionForeground ?? theme.muted;

  final kStyle = _copyStyle(keyStyle ?? sbTheme?.keyStyle ?? theme.labelSmall)
    ..foreground(kFg);
  final dStyle = _copyStyle(
    descriptionStyle ?? sbTheme?.labelStyle ?? theme.bodySmall,
  )..foreground(dFg);

  return Row(
    gap: gap,
    children: [
      Frame(
        padding: const EdgeInsets.symmetric(horizontal: 1, vertical: 0),
        background: kBg,
        child: Text(keyLabel, style: kStyle),
      ),
      Text(description, style: dStyle),
    ],
  );
}