AppButton class final
Botão do Flocks — a ação com rótulo e/ou ícone, variando pelo eixo global
AppStyle: filled (primária preenchida), outlined (secundária
contornada) e elevated (preenchida com sombra simétrica, sem borda).
Fundo/realce por estado herdam o modelo de cor do DS (contraste AA garantido
em hover/press/disabled). Sobre FlocksInteraction (foco-Tab/anel,
Enter/Space), com press-scale via AppMotion e loading. Substitui os antigos
AppFillButton (→ AppStyle.filled) e AppLineButton (→ AppStyle.outlined).
AppButton(label: 'Salvar', onPressed: save) // filled
AppButton(style: AppStyle.outlined, label: 'Cancelar', onPressed: cancel)
AppButton(style: AppStyle.elevated, label: 'Publicar', onPressed: publish)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- AppButton
Constructors
- AppButton({required VoidCallback? onPressed, AppStyle? style, AppButtonColor color = AppButtonColor.primary, String? label, String? icon, Widget? trailing, AppButtonSize size = AppButtonSize.l, bool enabled = true, bool loading = false, bool? expandedWidth, double? fixedWidth, AppRadiusMode? radiusMode, BorderRadius? radius, String? semanticsLabel, Key? key})
-
Cria um AppButton. Exige
labelouicon.const
Properties
- color → AppButtonColor
-
Papel de cor. Default AppButtonColor.primary.
final
- enabled → bool
-
Se está habilitado.
final
- expandedWidth → bool?
-
Ocupa toda a largura disponível.
final
- fixedWidth → double?
-
Largura fixa.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → String?
-
URL do ícone (à esquerda do rótulo, ou só-ícone).
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String?
-
Rótulo textual.
final
- loading → bool
-
Se está em loading.
final
- onPressed → VoidCallback?
-
Ação de clique.
nulldesabilita.final - radius → BorderRadius?
-
Override cru do raio (vence radiusMode e o global).
final
- radiusMode → AppRadiusMode?
-
Sobrescreve o modo de forma só deste botão (vence o global).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticsLabel → String?
-
Rótulo de acessibilidade. Default: label.
final
- size → AppButtonSize
-
Tamanho (altura). Default AppButtonSize.l.
final
- style → AppStyle?
-
Tratamento de container do eixo global AppStyle.
null(default) seguetheme.styleTheme.style.filled=preenchido,outlined=contornado,elevated=preenchido + sombra.final - trailing → Widget?
-
Acessório à direita do rótulo, DENTRO do botão — tipicamente um
AppShortcutHint. O selo de atalho é decorativo e não recebe toque, então
é aqui que ele vira descoberto sem virar um segundo alvo de clique.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited