mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Toggle buttons docs (#38635)
* Add toggle buttons assets * Reorder video location, reduce height of videos * Reduce height of toggle buttons assets
This commit is contained in:
parent
c161ac898c
commit
ff0eca6463
@ -26,6 +26,8 @@ import 'toggle_buttons_theme.dart';
|
||||
/// Each toggle's behavior can be configured by the [onPressed] callback, which
|
||||
/// can update the [isSelected] list however it wants to.
|
||||
///
|
||||
/// {@animation 700 150 https://flutter.github.io/assets-for-api-docs/assets/material/toggle_buttons_simple.mp4}
|
||||
///
|
||||
/// Here is an implementation that allows for multiple buttons to be
|
||||
/// simultaneously selected, while requiring none of the buttons to be
|
||||
/// selected.
|
||||
@ -45,6 +47,8 @@ import 'toggle_buttons_theme.dart';
|
||||
/// ),
|
||||
/// ```
|
||||
///
|
||||
/// {@animation 700 150 https://flutter.github.io/assets-for-api-docs/assets/material/toggle_buttons_required_mutually_exclusive.mp4}
|
||||
///
|
||||
/// Here is an implementation that requires mutually exclusive selection
|
||||
/// while requiring at least one selection. Note that this assumes that
|
||||
/// [isSelected] was properly initialized with one selection.
|
||||
@ -70,6 +74,8 @@ import 'toggle_buttons_theme.dart';
|
||||
/// ),
|
||||
/// ```
|
||||
///
|
||||
/// {@animation 700 150 https://flutter.github.io/assets-for-api-docs/assets/material/toggle_buttons_mutually_exclusive.mp4}
|
||||
///
|
||||
/// Here is an implementation that requires mutually exclusive selection,
|
||||
/// but allows for none of the buttons to be selected.
|
||||
/// ```dart
|
||||
@ -94,6 +100,8 @@ import 'toggle_buttons_theme.dart';
|
||||
/// ),
|
||||
/// ```
|
||||
///
|
||||
/// {@animation 700 150 https://flutter.github.io/assets-for-api-docs/assets/material/toggle_buttons_required.mp4}
|
||||
///
|
||||
/// Here is an implementation that allows for multiple buttons to be
|
||||
/// simultaneously selected, while requiring at least one selection. Note
|
||||
/// that this assumes that [isSelected] was properly initialized with one
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user