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 bg = background ?? theme.secondary;
  final fg = foreground ?? theme.onSecondary;
  final style = _copyStyle(textStyle ?? theme.labelSmall)..foreground(fg);
  return Frame(
    padding:
        padding ?? const EdgeInsets.symmetric(horizontal: 1, vertical: 0),
    background: bg,
    child: Text(label, style: style),
  );
}