ZetaTab constructor

ZetaTab(
  1. {Widget? icon,
  2. String? text,
  3. Key? key}
)

Creates a Zeta Design tab bar.

Implementation

ZetaTab({
  Widget? icon,
  String? text,
  super.key,
}) : super(
        child: Row(
          mainAxisSize: MainAxisSize.min,
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            if (icon != null) ...[
              const SizedBox(width: ZetaSpacing.medium),
              icon,
            ],
            if (text != null)
              Padding(
                padding: icon != null ? const EdgeInsets.only(left: ZetaSpacing.small) : EdgeInsets.zero,
                child: Text(text),
              ),
            if (icon != null) const SizedBox(width: ZetaSpacing.medium),
          ],
        ),
      );