FLUTTER ECOSYSTEM

optimist-dev/scrolls_to_top

iOS 스크롤 투 톱 기능과 함께 작업하기 위한 다트 패키지

맨 위로 스크롤 프로젝트 이미지
Stars
22
Forks
11
최근 푸시(UTC)
2024. 3. 15.
프로젝트 상태
활성
Optimist GitHub avatar
GITHUB Organization

Optimist ↗

언어DartHTMLSwiftKotlinObjective-C

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • flutter_lints개발 의존성^2.0.3
  • flutter_test개발 의존성{"sdk":"flutter"}

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

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