Skip to content
On this page

ToggleButtonGroup

A coordinated group of selectable buttons.

ToggleButtonGroup in FluttyUIToggleButtonGroup 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.

ToggleButtonGroup

const ToggleButtonGroup({
  super.key,
  required this.children,
  this.direction = Axis.horizontal,
  this.isAttached = true,
  this.fill = false,
  this.spacing,
});
ParameterTypeRequiredDefault
keyKey?Nonull
childrenList<ToggleButton>Yes—
directionAxisNoAxis.horizontal
isAttachedboolNotrue
fillboolNofalse
spacingdouble?Nonull

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/buttons/toggle_button_group/toggle_button_group.dart

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

DartFlutter

Get started with FluttyUI