FLUTTER ECOSYSTEM

optimist-dev/scrolls_to_top

iOS स्क्रॉल टू टॉप फीचर के साथ काम करने के लिए डार्ट पैकेज

ऊपर स्क्रॉल करता है प्रोजेक्ट कवर
Stars
22
Forks
11
अंतिम पुश (UTC)
15 मार्च 2024
प्रोजेक्ट स्थिति
सक्रिय
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