Buscar pacotes, repositórios e categorias de apps

Capa de colorful_safe_area
Detalhes do pacotev1.0.0

colorful_safe_area

Uma substituição mais personalizável para o widget SafeArea. Permite definir a cor do seu SafeArea sem afetar a cor de seu filho.

AndroidiOSWebmacOSWindowsLinux
Downloads em 30 dias
10 mil
Curtidas
59
Pontos Pub
150

Instalar pacote

flutter pub add colorful_safe_area

Visão geral do pacote

Orientação gerada a partir de informações públicas. Apenas para referência.

ColorfulSafeArea é uma alternativa personalizável ao widget SafeArea padrão, permitindo que os desenvolvedores definam uma cor de fundo distinta para a área segura sem afetar a aparência do widget filho. Ele oferece controle fino sobre o preenchimento e estilização visual, tornando-o ideal para aplicativos que exigem layouts de interface precisos em diferentes dispositivos. O pacote suporta todas as principais plataformas e se integra perfeitamente ao pipeline de renderização do Flutter.

Casos de uso

  • Personalizando fundos de área segura
  • Criar barras de navegação visualmente distintas
  • Criando experiências imersivas em tela cheia
  • Implementando ajustes de preenchimento específicos por plataforma
  • Melhorando a consistência da interface em dispositivos diferentes

Principais recursos

  • Controle de cor separado para área segura
  • Nenhum impacto no estilo do widget filho
  • Suporte multiplataforma
  • Integração simples com código existente
  • Configuração de preenchimento flexível

Indicado para

  • Designers de interface buscando precisão visual
  • Desenvolvedores construindo layouts responsivos
  • Aplicativos com barras de navegação complexas
  • Projetos que exigem preenchimento de borda consistente
  • Equipes direcionadas para múltiplas plataformas

Considerações

  • Pode exigir testes adicionais em casos extremos
  • Não adequado para cenários de área segura aninhada
  • Limitado à personalização da cor de fundo
  • Não substitui a funcionalidade central do SafeArea
  • Melhor usado quando a cor de fundo precisar de controle independente

README original

Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.

ColorfulSafeArea

Pub

A more customizable replacement for the SafeArea widget. It lets you set the color of your SafeArea without affecting the color of its child.

Example of ColorfulSafeArea

Use it just like a regular SafeArea widget.

Scaffold(
    body: ColorfulSafeArea(
        child: SomeWidget(),
    ),
);

Setting Color

The color of ColorfulSafeArea widgets are transparent by default. To change their color, set the color property.

Scaffold(
    body: ColorfulSafeArea(
        color: Colors.red,
        child: SomeWidget(),
    ),
);

Using Transparent Colors

You can use any color that has transparency

Scaffold(
    body: ColorfulSafeArea(
        color: Colors.red.withOpacity(0.7),
        child: SomeWidget(),
    ),
);

Overflow Rules

If you are using a transparent color and want the child of the ColorfulSafeArea to appear behind it, you can set overflowRules to define how the ColorfulSafeArea's child should appear. The default value is OverflowRules.all(false). The OverflowRules class works much like EdgeInsets.

// allows the child to overflow behind all sides
overflowRules: OverflowRules.all(true)

// allows the child to overflow only on the left and bottom sides
overflowRules: OverflowRules.only(left: true, bottom: true)

// allows the child to overflow on the top and bottom
overflowRules: OverflowRules.symmetric(vertical: true)

Blurring Overflow Area

If you want to apply a blur effect to the ColorfulSafeArea, you can apply a filter.

Scaffold(
    body: ColorfulSafeArea(
        overflowRules: OverflowRules.all(true),
        filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
        child: SomeWidget(),
    ),
);

Making Overflow Area Interactive

When you set overflowRules and would like for the parts of the child that have overflowed to be interactable behind the ColorfulSafeArea, you can set overflowTappable to true.

Scaffold(
    body: ColorfulSafeArea(
        overflowRules: OverflowRules.all(true),
        overflowTappable: true
        child: SomeWidget(),
    ),
);

Categorias

Repositório-fonte

Projetos que usam este pacote

Ainda não há dados.