Skip to content
On this page

TagGroup

A collection of selectable or removable tags.

TagGroup in FluttyUITagGroup in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

TagGroup

const TagGroup({
  super.key,
  required this.tags,
  this.size,
  required this.onSelectionChanged,
  this.selectedValues = const [],
  this.onRemove,
  this.selectionMode = TagSelectionMode.multiple,
  this.spacing,
  this.runSpacing,
  this.padding = EdgeInsets.zero,
  this.backgroundColor,
  this.selectedBackgroundColor,
  this.foregroundColor,
  this.selectedForegroundColor,
  this.borderColor = const Color(0x00000000),
  this.selectedBorderColor = const Color(0x00000000),
  this.borderRadius,
  this.tagPadding,
  this.fontSize,
  this.iconSize,
  this.enabled = true,
});
ParameterTypeRequiredDefault
keyKey?Nonull
tagsList<TagItem<T>>Yes—
sizeComponentSize?Nonull
onSelectionChangedValueChanged<List<T>>Yes—
selectedValuesList<T>Noconst []
onRemoveValueChanged<T>?Nonull
selectionModeTagSelectionModeNoTagSelectionMode.multiple
spacingdouble?Nonull
runSpacingdouble?Nonull
paddingEdgeInsetsGeometryNoEdgeInsets.zero
backgroundColorColor?Nonull
selectedBackgroundColorColor?Nonull
foregroundColorColor?Nonull
selectedForegroundColorColor?Nonull
borderColorColorNoconst Color(0x00000000)
selectedBorderColorColorNoconst Color(0x00000000)
borderRadiusdouble?Nonull
tagPaddingEdgeInsetsGeometry?Nonull
fontSizedouble?Nonull
iconSizedouble?Nonull
enabledboolNotrue

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/collections/tag_group/tag_group.dart

This reference is generated from the TagGroup declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI