Buscar pacotes, repositórios e categorias de apps

Repositório GitHubletsar/visual_effect

efeito visual

API VisualEffect para Flutter

Capa do projeto efeito visual
Estrelas
75
Forks
2
Último push (UTC)
15 de ago. de 2023
Status do projeto
Ativo

README original

Texto original em inglês. Visite o GitHub para a versão atual.

visual_effect

VisualEffect API for Flutter to easily add paint effects on your widgets.

Warning This package is experimental for the moment. The API can change at any time.

Scroll Effect

The main purpose of this API is to provide an easy and efficiently way to apply scroll animations.

Warning The addRepaintBoundaries MUST be set to false in the parent Sliver/ScrollView because we explicitely want in that case to repaint for every single scroll so we can add the effect.

For example this Card Stack effect can be obtained with the code below:

Card Stack

class _ScrolledItem extends StatelessWidget {
  const _ScrolledItem();

  @override
  Widget build(BuildContext context) {
    return ScrollEffect(
      onGenerateVisualEffect: (effect, phase) {
        return effect
            .grayscale(phase.leadingLerp(to: 0.5))
            .scale(
              x: phase.isLeading ? phase.leadingLerp(from: 1, to: 0.9) : 1,
              anchor: Alignment.topCenter,
            )
            .translate(y: effect.childSize.height * phase.leading);
      },
      child: const _CardItem(),
    );
  }
}
Romain Rastel GitHub avatar
Autor no GitHub

Romain Rastel ↗

Flutter Developer

Rennes, FranceSite oficial ↗
LinguagensDartGLSLHTMLSwiftKotlinObjective-C

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 4 itens

  • flutter{"sdk":"flutter"}
  • meta^1.9.1
  • vector_math^2.1.4
  • flutter_testDesenvolvimento{"sdk":"flutter"}

Como escolher um repositório para seu projeto?

Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.

  1. Busque por nome, autor ou descrição e filtre por tema.
  2. Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
  3. Confira o README, a licença e as issues no GitHub antes de usar o projeto.

Fontes e manutenção

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗