पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv1.2.0

flex_list

एक लचीले सूचियों के लिए एक Flutter लेआउट विजेट। यह एक व्रैप में Expand विजेट्स के रूप में व्यवहार करता है।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
1.8 हज़ार
लाइक
30
Pub अंक
150

पैकेज इंस्टॉल करें

flutter pub add flex_list

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

FlexList एक Flutter विंडजेट है जिसका उपयोग लचीले, प्रतिक्रियाशील सूचियों को बनाने के लिए किया जाता है जो लेआउट सीमाओं के भीतर गतिशील रूप से अनुकूलित होती हैं। इसका काम एक Wrap में Expand विंडजेट के जैसा होता है, जिससे आइटम उपलब्ध स्थान के आधार पर बढ़ और घट सकते हैं। विभिन्न स्क्रीन आकारों और दिशाओं पर तरल, स्केलेबल सूची लेआउट बनाने के लिए उपयुक्त है, जटिल कस्टम कोडिंग के बिना UI लचीलेपन को बढ़ावा देता है। यह पैकेज सभी प्रमुख प्लेटफॉर्मों को समर्थन देता है, जिससे एडेप्टिव सूची व्यवहार की आवश्यकता वाले क्रॉस-प्लेटफॉर्म एप्लिकेशन के लिए उपयुक्त है।

उपयोग

  • प्रतिक्रियाशील सूची व्यवस्था
  • गतिशील आइटम आकार
  • क्रॉस-प्लेटफॉर्म यूआई डिज़ाइन
  • अनुकूल सामग्री कंटेनर
  • लचीले ग्रिड-जैसे सूचियाँ
  • नेस्टेड लेआउट एंटीग्रेशन

मुख्य विशेषताएँ

  • स्वचालित आकार के सूची आइटम
  • सभी फ्लटर प्लेटफॉर्म का समर्थन करता है
  • स्वचालित एवं लपेटने जैसा व्यवहार
  • आवश्यक न्यूनतम सेटिंग
  • मौजूदा लेआउट के साथ निरंतर एकीकरण
  • उपकरणों के माध्यम से एकसमान व्यवहार

इनके लिए उपयुक्त

  • प्रतिक्रियाशील UI विकसित करने वाले विकासकर्मी
  • स्वयं-अनुकूलित सूची डिज़ाइन की आवश्यकता वाले ऐप्स
  • क्रॉस-प्लेटफ़ॉर्म प्रोजेक्ट्स
  • लेआउट-भारी एप्लिकेशन
  • गतिशील अंतराल की आवश्यकता वाले UI घटक

विचार योग्य बातें

  • जटिल नेस्टेड संरचनाओं में सावधानीपूर्वक समायोजन की आवश्यकता हो सकती है
  • बहुत बड़े डेटासेट के साथ प्रदर्शन प्रभाव
  • मूल लचीलापन व्यवहार के आगे सीमित कस्टमाइजेशन
  • स्थिर आकार या कठोर लेआउट के लिए उपयुक्त नहीं
  • मध्यम सूची आकार के लिए सबसे उपयुक्त
  • पैरेंट कंटेनर की सीमाओं पर निर्भर करता है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Flex List

Pub Points Pub Points Pub Points

Provides a flexible list layout that behaves as you would expect from Expand widgets within a Wrap.

Features

FlexList puts as many provided elements as possible in one row (like Wrap), but also extends the width of the elements by the remaining space per row. This means that each row is filled to the maximum width.

Getting started

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  flex_list: <latest_version>

In your library add the following import:

import 'package:flex_list/flex_list.dart';

Usage

The following example shows how to use FlexList. Beside the children property, you can set horizontalSpacing and verticalSpacing to define the spacing between the elements.

Note: Both spacing values are 10 by default.

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'FlexList Demo',
        theme: ThemeData(),
        home: Scaffold(
          body: Center(
            child: SizedBox(
                width: 300,
                child: FlexList(
                  horizontalSpacing: 5,
                  verticalSpacing: 10,
                  children: [
                    for (var i = 0; i < 10; i++)
                      Container(
                        color: Theme
                            .of(context)
                            .colorScheme.surfaceContainer,
                        padding: EdgeInsets.symmetric(
                            horizontal: 20 + 20 * (i % 4), vertical: 10),
                        child: Text("Item $i"),
                      )
                  ],
                )),
          ),
        ));
  }
}
Rendering of above Example
Example Rendering

Additional information

This package was written because of the lack of such layout function. The package repository is maintained on Github and published on pub.dev

श्रेणियाँ

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट