v0.5.0scroll_pos
ScrollController के कुछ अतिरिक्त कार्यों को प्रदान करता है जो स्क्रीन के संबंध में आइटम स्थिति को परिभाषित करता है।
75लाइक 1.9 लाख30-दिन डाउनलोड160Pub अंक
AndroidiOSWebmacOSWindowsLinux
ScrollController के कुछ अतिरिक्त कार्यों को प्रदान करता है जो स्क्रीन के संबंध में आइटम स्थिति को परिभाषित करता है।
यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
Provides some additional functions to ScrollController to define item position relative to the screen.
A live version is available here.
Note: this works on condition that all items have the same height !
// Create a ScrollPosController (don't forget to set and update itemCount !)
final controller = ScrollPosController(itemCount: itemCount);
// Assign the controller to a scrollable item (like an ListView)
ListView(
controller: controller,
children: [
...
];
);
// Control the controller
TextButton(
child: Text('To item'),
onPressed: () {
setState(() {
controller.scrollToItem(index);
});
},
);
void scrollTop({bool? animate}) : Go to the first itemvoid scrollBottom({bool? animate}) : Go to the last itemvoid scrollToItem(int index, {bool? animate, bool center = false}) : Makes the item visible on the screenनिर्भरता सूची 3 आइटम
{"sdk":"flutter"}{"sdk":"flutter"}^1.0.0उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗