Buscar pacotes, repositórios e categorias de apps

Repositório GitHubdasRicardo/flutter_paperfold

flutter_paperfold

dasRicardo/flutter_paperfold open-source repository details.

Capa do projeto flutter_paperfold
Estrelas
16
Forks
1
Último push (UTC)
22 de set. de 2024
Status do projeto
Ativo

README original

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

Paperfold

Pub Style Style Style


This package provides a widget which applies a paper fold effect on it's child. You can choose between horizontal and vertical fold direction. The number of strips has to be at least two.

preview

Getting started

Installation

Add paperfold as a dependency in your pubspec.yaml file. Or run pub add paperfold in your terminal.

Usage

Just add the widget to your tree and you're done :). Take a look at example to see more.

PaperFold(
  mainAxis: PaperFoldMainAxis.vertical,
  strips: 4,
  foldValue: .5,
  pixelRatio: 1,//works best if you query the device pixel ration with MediaQuery.of
  child: ClipRRect(
    borderRadius: BorderRadius.all(Radius.circular(20)),
    child: Container(
      color: Colors.green,
      height: 150,
      child: ListView.builder(
        itemCount: 30,
        itemBuilder: (context, index) {
          return Column(
            children: [
              Row(
                children: const [
                  Icon(
                    Icons.translate,
                    size: 50,
                  ),
                  Text("hello world, hello world")
                ],
              ),
            ],
          );
        },
      ),
    ),
  ),
);

Limitation

  • User interactions (gestures etc.) with child only possible in unfold state. (0 <= fold value < 1)
  • Child widgets can't be animated. This is also valid for videos. You can wrap it by the paperfold, but the content will not update in folded state.

Issues

Feel free to file any issues, bugs, or feature requests. All contributions are welcome :)

License

BSD-3-Clause

Special thx

Special thanks to GwaedGlas for reviewing and sparring this package

dasRicardo GitHub avatar
Autor no GitHub

dasRicardo ↗

LinguagensDart

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 4 itens

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 ↗