GitHub

    Table of contents

  1. 示例
  2. 相关链接

ToggleButtons

Edit this page

A horizontal set of toggle buttons.

示例

ToggleButtons(
  children: <Widget>[
    Icon(Icons.ac_unit),
    Icon(Icons.call),
    Icon(Icons.cake),
  ],
  onPressed: (int index) {
    setState(() {
      isSelected[index] = !isSelected[index];
    });
  },
  isSelected: isSelected,
),

相关链接