AppPickerAnchor class
Âncora genérica de "picker": um trigger (qualquer widget) que abre um
panel flutuante ancorado logo abaixo, num AppCard elevado, fechando ao
clicar fora / Esc.
É a máquina de overlay dos pickers do DS, desacoplada do input — use no
AppInput (como os *PickerInput) ou em qualquer outro widget (um
botão, um chip…). Ambos os builders recebem um AppPickerHandle para
abrir/fechar/rebuildar.
AppPickerAnchor(
width: const AppPickerWidth.matchTrigger(min: 300),
trigger: (context, h) => AppButton(label: 'Data', onPressed: h.open),
panel: (context, h) => AppDatePicker(
onDateSelected: (d) { setState(() => _date = d); h.close(); },
),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AppPickerAnchor
Constructors
- AppPickerAnchor({required Widget trigger(BuildContext context, AppPickerHandle handle), required Widget panel(BuildContext context, AppPickerHandle handle), AppPickerWidth width = const AppPickerWidth.matchTrigger(), AppOverlayPlacement placement = AppOverlayPlacement.bottomStart, AppStyle panelStyle = AppStyle.elevated, bool? panelGlass, Color? panelAccentColor, EdgeInsetsGeometry panelPadding = const EdgeInsets.all(AppSpacings.s8), Key? key})
-
Cria um AppPickerAnchor.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- panel → Widget Function(BuildContext context, AppPickerHandle handle)
-
Constrói o conteúdo do painel (ex.:
AppDatePicker), dentro do AppCard.final - panelAccentColor → Color?
-
Cor de acento da borda do painel (render não-glass). Default: um stop
legível do
secondarysobre a superfície (readableStopOn) — contrasta em claro/escuro nas duas marcas.final - panelGlass → bool?
-
Override do eixo glass só deste painel.
nullsegue o global (theme.glassTheme.enabled).final - panelPadding → EdgeInsetsGeometry
-
Padding interno do painel. Default
EdgeInsets.all(s8); passeEdgeInsets.zeroquando o painel já traz o próprio padding.final - panelStyle → AppStyle
-
Eixo AppStyle do painel no render não-glass. Default
AppStyle.elevated.
final
- placement → AppOverlayPlacement
-
Posição do painel relativa ao trigger.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trigger → Widget Function(BuildContext context, AppPickerHandle handle)
-
Constrói o trigger. Envolvido pela âncora (CompositedTransformTarget +
TapRegion); chame
handle.open/close/togglea partir dele.final - width → AppPickerWidth
-
Largura do painel. Default: casa com o trigger.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< AppPickerAnchor> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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