FlenxFloatingButton class

Botão de ação flutuante e fixo (canto da tela) — para WhatsApp ou qualquer chat/ação (Telegram, Messenger, chat próprio, telefone…). Só Dart.

FlenxFloatingButton.whatsapp(href: 'https://wa.me/5511...')
FlenxFloatingButton(href: '/chat', label: 'Chat', icon: '💬', background: '#111')
Inheritance

Constructors

FlenxFloatingButton({required String href, String label = '', String icon = '💬', String? iconImage, String background = '#2563eb', String textColor = '#ffffff', FlenxCorner corner = FlenxCorner.bottomRight, bool newTab = true, double offset = 20, bool pulse = false, String pulseColor = 'rgba(37,99,235,.55)', String? trackEvent, Key? key})
const
FlenxFloatingButton.messenger({required String href, String label = 'Messenger', FlenxCorner corner = FlenxCorner.bottomRight, bool newTab = true, double offset = 20, String? trackEvent = FlenxEvent.contact, Key? key})
Preset Messenger.
const
FlenxFloatingButton.telegram({required String href, String label = 'Telegram', FlenxCorner corner = FlenxCorner.bottomRight, bool newTab = true, double offset = 20, String? trackEvent = FlenxEvent.contact, Key? key})
Preset Telegram.
const
FlenxFloatingButton.whatsapp({required String href, String label = 'Fale no WhatsApp', FlenxCorner corner = FlenxCorner.bottomRight, bool newTab = true, double offset = 20, String? trackEvent = FlenxEvent.contact, Key? key})
Preset WhatsApp (verde + ícone de balão).
const

Properties

background → String
final
corner → FlenxCorner
final
hashCode → int
The hash code for this object.
no setterinherited
href → String
final
icon → String
Ícone como emoji/texto (ignorado se iconImage for informado).
final
iconImage → String?
URL de uma imagem/ícone (ex.: SVG). Se nulo, usa icon.
final
key → Key?
Controls how one component replaces another component in the tree.
finalinherited
label → String
final
newTab → bool
final
offset → double
final
pulse → bool
Animação de pulso (anel expansivo) para chamar atenção. Inclui elevação no hover. Respeita prefers-reduced-motion.
final
pulseColor → String
Cor do anel do pulso (aceita rgba para o fade ficar suave).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
textColor → String
final
trackEvent → String?
Evento de flenx.track disparado no clique (ex.: FlenxEvent.contact). Nulo = não rastreia. Os presets de contato já usam Contact.
final

Methods

build(BuildContext context) → Component
Describes the part of the user interface represented by this component.
override
createElement() → Element
Creates a StatelessElement to manage this component's location in the tree.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRebuild(covariant Component newComponent) → bool
Implement this method to determine whether a rebuild can be skipped.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited