FBadge constructor

FBadge({
  1. required Widget child,
  2. FBadgeVariant variant = .primary,
  3. FBadgeStyleDelta style = const .context(),
  4. Key? key,
})

Creates a FBadge.

Implementation

FBadge({required Widget child, this.variant = .primary, this.style = const .context(), super.key})
  : builder = ((_, style) => Center(
      child: Padding(
        padding: style.padding,
        child: DefaultTextStyle.merge(style: style.labelTextStyle, child: child),
      ),
    ));