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 resolvedStyle = (textStyle != null || foreground != null)
      ? (_copyStyle(textStyle ?? theme.bodyMedium)
          ..foreground(foreground ?? theme.onSurface))
      : null;
  return Frame(
    padding: padding ?? const EdgeInsets.all(1),
    margin: margin,
    background: background ?? theme.surface,
    border: border ?? Border.rounded,
    borderColor: borderColor ?? theme.border,
    style: resolvedStyle,
    child: child,
  );
}