GitHub रिपॉज़िटरीdridino/smooth_list_view

smooth_list_view

Flutter में ListViews का स्मूथ अनुकूलन।

smooth_list_view प्रोजेक्ट कवर
स्टार
4
फ़ोर्क
1
अंतिम पुश (UTC)
22 दिस॰ 2024
प्रोजेक्ट स्थिति
सक्रिय

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

A flutter plugin to implement smooth scrolling on desktop and web.

Comparison

Without
without the package
With
with the package

Features

  • Like the standard ListView but better
  • Scroll smoothly no matter what platform you're using (web, desktop, mobile)
  • Support scroll switching between mouse and trackpad

Constructors

  • SmoothListView(...) : behave exactly like a classic ListView(...) except that it makes scrolling with a mouse wheel smoother.
  • SmoothListView.builder(...) : behave exactly like a classic ListView.builder(...) except that it makes scrolling with a mouse wheel smoother.
  • SmoothListView.adapative(...) : behave exactly like a classic ListView(...) except that it allows you to easily switch between smooth scroll and classic scroll.
  • SmoothListView.adaptiveBuilder(...) : behave exactly like a classic ListView.builder(...) except that it allows you to easily switch between smooth scroll and classic scroll.

Getting started

First, add the package to your pubspec.yaml :

flutter pub add smooth_list_view

Then import it inside your Dart code :

import 'package:smooth_list_view/smooth_list_view.dart';

Usage

Import the package :

import 'package:smooth_list_view/smooth_list_view.dart';
ListView

Replace :

// ...
@override
Widget build(BuildContext context) {
    return ListView(...);
}
// ...

With :

// ...
@override
Widget build(BuildContext context) {
    // You can keep the exact same parameters
    return SmoothListView(...);
}
// ...
ListView.builder()

Replace :

// ...
@override
Widget build(BuildContext context) {
    return ListView.builder(...);
}
// ...

With :

// ...
@override
Widget build(BuildContext context) {
    // You can keep the exact same parameters
    return SmoothListView.builder(...);
}
// ...
ListView.separated()

Replace :

// ...
@override
Widget build(BuildContext context) {
    return ListView.separated(...);
}
// ...

With :

// ...
@override
Widget build(BuildContext context) {
    // You can keep the exact same parameters
    return SmoothListView.separated(...);
}
// ...
ListView.custom()

Replace :

// ...
@override
Widget build(BuildContext context) {
    return ListView.custom(...);
}
// ...

With :

// ...
@override
Widget build(BuildContext context) {
    // You can keep the exact same parameters
    return SmoothListView.custom(...);
}
// ...

Additional information

Feel free to check the Example panel for a richer implementation.

If you encounter any issue feel free to open one on GitHub :)

dridino GitHub avatar
GitHub लेखक

dridino ↗

भाषाएँDartC++CMakeHTMLSwiftCKotlinObjective-C

श्रेणियाँ

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 3 आइटम

  • flutter{"sdk":"flutter"}
  • flutter_testडेवलपमेंट{"sdk":"flutter"}
  • flutter_lintsडेवलपमेंट^5.0.0

अपने प्रोजेक्ट के लिए रिपॉज़िटरी कैसे चुनें?

उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।

  1. नाम, लेखक या विवरण से खोजें और तकनीकी विषय से परिणाम सीमित करें।
  2. स्टार, फ़ोर्क और हाल के पुश की तुलना करें। स्टार रुचि दर्शाते हैं, गुणवत्ता की गारंटी नहीं।
  3. उपयोग से पहले GitHub पर README, लाइसेंस और Issues जाँचें।

स्रोत और रखरखाव

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗