FLUTTER ECOSYSTEM

optimist-dev/scrolls_to_top

Um pacote Dart para trabalhar com o recurso de rolagem para o topo no iOS

Capa do projeto rola até o topo
Stars
22
Forks
11
Último push (UTC)
15 de mar. de 2024
Status do projeto
Ativo
Optimist GitHub avatar
GITHUB Organization

Optimist ↗

LinguagensDartHTMLSwiftKotlinObjective-C

Tópicos técnicos

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 3 itens
  • flutter{"sdk":"flutter"}
  • flutter_lintsDesenvolvimento^2.0.3
  • flutter_testDesenvolvimento{"sdk":"flutter"}

README original

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

Expandir / recolher README

Scrolls to top

pub package

A dart package for working with scrolls-to-top iOS feature

Why is this needed? This is necessary for those cases when you have several nested Scaffolds or you need to distinguish the tap event in the status bar from other scroll events

https://github.com/optimist-dev/scrolls_to_top/blob/main/arts/example.gif?raw=true

Usage

Just wrap any widget with ScrollsToTop and provide onScrollsToTop argument

  @override
  Widget build(BuildContext context) {
    return ScrollsToTop(
      onScrollsToTop: _onScrollsToTop,
      scaffold: Scaffold(
        appBar: AppBar(title: const Text('Scroll to top')),
        body: Container(),
      ),
    );
  }

  Future<void> _onScrollsToTop(ScrollsToTopEvent event) async {
    //TODO: Your code
  }

Warning

  • You need to have at least one Scaffold in your application
  • If you use several Navigators, the tap events will come only to the widgets inside the main Navigator