AppPrimaryHeader class final
Cabeçalho primário de página: um child centralizado com slots opcionais de
leading e trailing, participando do eixo de estilo AppStyle
(filled/outlined/elevated) com semântica de barra (borda/sombra só
na aresta de baixo). Participa também do eixo glass (glass ou o global):
glass = blur + gradiente estilo Notes.
- Altura fixa (kAppHeaderContentHeight + safe-area do topo); não cresce com o conteúdo.
- Centralização real: com centerChild e só um dos lados, o título permanece centralizado (trunca em vez de deslocar).
- Glass sobrepõe o conteúdo via AppScaffold (efeito Notes).
Slots leading/trailing são Widget? livres. Convenção: no glass use um
FAB glass; nos demais um AppButton neutro do style — ver action.
AppPrimaryHeader(
glass: true,
leading: AppPrimaryHeader.action(context, icon: AppIconToken.chevronLeft, onTap: back, glass: true),
child: AppText('Detalhes'),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- AppPrimaryHeader
Constructors
- AppPrimaryHeader({required Widget child, bool centerChild = true, AppStyle style = AppStyle.filled, bool? glass, AppRadiusMode? radiusMode, BoxConstraints? constraints, BoxDecoration? decoration, Widget? leading, EdgeInsets? padding, Widget? trailing, Key? key})
-
Cria um AppPrimaryHeader.
const
Properties
- barEdge → BarEdge
-
Aresta que encosta no conteúdo (
BarEdge.bottomheader /BarEdge.topfooter).no setter - barStyle → AppStyle
-
Estilo de container efetivo da barra no render não-glass (já resolvido
do tema, se aplicável).
no setter
- centerChild → bool
-
Se o child é centralizado (senão, alinhado à esquerda).
final
- child → Widget
-
Conteúdo central do cabeçalho.
final
- constraints → BoxConstraints?
-
Restrições.
maxHeightsobrescreve a altura fixa do conteúdo.final - decoration → BoxDecoration?
-
Decoração custom — escape hatch legado: quando não-nula, curto-circuita
o eixo de style e pinta como antes.
final
- glass → bool?
-
Override do eixo glass.
nullsegue o global (theme.glassTheme.enabled).final - hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leading → Widget?
-
Slot à esquerda (ex.: botão de voltar). Ver action.
final
- padding → EdgeInsets?
-
Padding interno. Default all
s4(bem pequeno).final - radiusMode → AppRadiusMode?
-
Modo de forma (só relevante se o header algum dia flutuar).
null= band quadrada full-bleed.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → AppStyle
-
Tratamento de container (AppStyle) do render não-glass. Default
filled(visual atual).final - trailing → Widget?
-
Slot à direita (ex.: ação). Ver action.
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
-
overlaysContent(
BuildContext context) → bool -
Se a barra deve ser sobreposta ao conteúdo (só quando o glass está ligado).
inherited
-
resolveBarExtent(
BuildContext context) → double - Altura total que a barra ocupa (faixa de safe-area + conteúdo), para o scaffold reservar padding no conteúdo sob a barra sobreposta.
-
resolveGlassOn(
BuildContext context) → bool -
Eixo glass resolvido: override por instância (
glass) ou o global da marca (theme.glassTheme.enabled). Delega ao resolvedor único do eixo.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
Static Methods
-
action(
BuildContext context, {required String icon, required VoidCallback? onTap, bool glass = false, String? semanticLabel}) → Widget -
Monta o botão de slot recomendado: um FAB glass quando
glass, senão um ícone ghost (só ícone, sem fundo) com alvo de toque generoso (kAppHeaderSlotReserve) e realce de hover/press no radius global. Ícone em tamanho normal (AppIconSize.m). Retorna umWidget— o tipo do slot continua livre.