Orientação gerada a partir de informações públicas. Apenas para referência.
Floating Bubbles é um pacote Flutter que permite aos desenvolvedores adicionar bolhas flutuantes animadas sobre qualquer widget no plano de fundo. Essas bolhas podem ser personalizadas com cores, tamanhos e padrões de movimento, criando efeitos visuais dinâmicos ideais para fundos ou interfaces interativas. O pacote suporta todas as principais plataformas, incluindo Android, iOS, Web, macOS, Windows e Linux, tornando-o versátil para aplicativos multiplataforma. É leve e fácil de integrar usando um simples wrapper de widget.
Casos de uso
Melhorando telas de inicialização do aplicativo
Criando elementos de interface do usuário divertidos
Adicionando animação de fundo a painéis
Melhorando o engajamento do usuário com movimentos sutis
Design de páginas de destino temáticas
Principais recursos
Cores e tamanhos de bolhas personalizáveis
Animações suaves de flutuação
Compatibilidade multiplataforma
Integração fácil com widgets existentes
Velocidade e direção configuráveis
Indicado para
Designers de UI em busca de charme visual
Desenvolvedores criando experiências de onboarding envolventes
Aplicativos que exigem animações leves e não intrusivas
Produtos digitais criativos com temas artísticos
Projetos com foco em design de interface moderna e fluida
Considerações
Pode afetar o desempenho em dispositivos de baixa gama
Bolhas podem distrair do conteúdo principal se usadas em excesso
Requer contraste de cor cuidadoso para legibilidade
Não adequado para aplicativos com foco em acessibilidade
Controle limitado sobre o comportamento individual de cada bolha
README original
Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.
Floating Bubbles
A Flutter Package for adding Floating bubbles in the Foreground to a widget.
Getting Started
In your flutter project(in pubspec.yaml) add the dependency:
Here is an snippet on how to use Floating Bubbles to any Widget.
Creating FloatingBubbles() (this creates the animation and plays for amount of time you give as the duration.)
returnStack(
children: [
Positioned.fill(
child: Container(
color: Colors.red,
),
),
Positioned.fill(
child: FloatingBubbles(
noOfBubbles: 25,
colorsOfBubbles: [
Colors.green.withAlpha(30),
Colors.red,
],
sizeFactor: 0.16,
duration: 120, // 120 seconds.
opacity: 70,
paintingStyle: PaintingStyle.stroke,
strokeWidth: 8,
shape: BubbleShape.circle, // circle is the default. No need to explicitly mention if its a circle.
speed: BubbleSpeed.normal, // normal is the default
),
);
Creating FloatingBubbles.alwaysRepeating() (Creates Floating Bubbles that always floats and doesn't stop.)
As the Gifs here are converted from mp4, there are some stutters. To see the MP4 format of these Gifs
Click Here.
Platforms on which this package was tested.
Platform
Supported
Comments
Android
Yes
Works without any issues
IOS
Yes
Works without any issues
Web
Yes (kinda)
Works when using web renderer engine as html. use the command flutter run -d chrome --web-renderer html / flutter build web --web-renderer html
Windows
Yes
Works without any issues
Linux
Not yet tested
-
MacOS
Not yet tested
-
Stress Test
Stress Test has been done on this package. Below is the information(fps) on how the performance of the package when the animation was coupled with a heavy rive animation.
Average FPS of the UI when the package was stress tested on a low-end Android Phone
APP build in Debug Mode
APP build in Release Mode
Average FPS of the UI when the package was stress tested on a High-end Android Phone
APP build in Release Mode
Performance improvements will be made in the coming updates to make this package more suitable for low end devices. If you have any suggestions or ideas, just pull request :)