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

flutter_smart_dialog कवर
पैकेज विवरणv5.3.0

flutter_smart_dialog

एक शानदार Flutter डायलॉग समाधान, आसानी से टोस्ट, लोडिंग और कस्टम डायलॉग का उपयोग करें, डायलॉग के उपयोग को आसान बनाएं!

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

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

flutter pub add flutter_smart_dialog

पैकेज अवलोकन

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

flutter_smart_dialog एक हल्का और आकर्षक Flutter पैकेज है जिसका उद्देश्य डायलॉग के कार्यान्वयन को सरल बनाना है, जिसमें टोस्ट संदेश, लोडिंग इंडिकेटर और कस्टम डायलॉग शामिल हैं। यह विभिन्न प्रकार के पॉप-अप यूआई तत्वों को विभिन्न प्लेटफॉर्मों पर प्रदर्शित करने के लिए एक साफ और सुसंगत API प्रदान करता है। न्यूनतम सेटअप और स्पष्ट विधियों के साथ, डेवलपर्स बिना दोहराव वाला कोड लिखे बिना उपयोगकर्ता प्रतिक्रिया और इंटरैक्शन को त्वरित रूप से बढ़ा सकते हैं। यह पैकेज Android, iOS, Web, macOS, Windows और Linux को समर्थन देता है, जो क्रॉस-प्लेटफॉर्म एप्लिकेशन के लिए एक समान डायलॉग अनुभव प्राप्त करने के लिए आदर्श है।

उपयोग

  • टॉस्ट नोटिफिकेशन दिखाएं
  • एसिंक ऑपरेशन के दौरान लोडिंग इंडिकेटर दिखाएं
  • कस्टमाइज़ेबल डायलॉग ओवरले बनाना
  • त्वरित उपयोगकर्ता प्रतिक्रिया तंत्र का अनुप्रयोग
  • बहु-स्क्रीन एप्लिकेशन में मॉडल डायलॉग का प्रबंधन करना

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

  • सरल और स्पष्ट एपीआई
  • टोस्ट, लोडिंग और कस्टम डायलॉग का समर्थन करता है
  • प्लेटफॉर्म के अनुकूलता
  • न्यूनतम बॉयलरप्लेट कोड
  • कॉन्फ़िगरेबल एनीमेशन और थीम
  • मौजूदा Flutter प्रोजेक्ट्स के साथ आसान एकीकरण

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

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

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

  • अतिस्पष्ट उपस्थिति के लिए अतिरिक्त स्टाइलिंग की आवश्यकता हो सकती है
  • डायलॉग-प्रकार के UI घटकों तक सीमित
  • फ्लटर के रेंडरिंग पाइपलाइन पर निर्भर करता है
  • जटिल नेविगेशन वर्कफ्लो के लिए उपयुक्त नहीं
  • अन्य अवस्था प्रबंधन समाधानों के साथ उपयोग करने पर सबसे अच्छा है

मूल README

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

pub stars issues commit

Feature and Usage(Must read!):super detailed guide

功能和用法(必看!): 超详细指南


Language: English | 中文

Migrate doc:3.x migrate 4.0 | 3.x 迁移 4.0

Flutter 2:Please use flutter_smart_dialog: 4.2.5

Introduction

An elegant Flutter Dialog solution.

Some Effect

attachLocationAndPoint

attachHighlight

dialogStack

loadingCustom

toastCustom

Advantage

  • Do not need BuildContext

  • Can penetrate dark background, click on the page behind dialog

  • Support dialog stack,close the specified dialog

  • Support positioning widget, display the specified location dialog

  • Support highlight feature,dissolve the specified location mask

  • Easily implement toast,loading,attach dialog,custome dialog,custome notify

Quick start

Install

Initialization

initialization

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: HomePage,
      // here
      navigatorObservers: [FlutterSmartDialog.observer],
      // here
      builder: FlutterSmartDialog.init(),
    );
  }
}

Advanced initialization: configure global custom Loading and Toast

SmartDialog's showLoading and showToast provide a default style. Of course, custom param are definitely supported.

  • SmartDialog custom Loading or Toast is very simple: However, when using it, it may make you feel a little troublesome
  • for example
    • Use custom Loading: SmartDialog.showLoading(builder: (_) => CustomLoadingWidget);
    • The effect we want must be like this: SmartDialog.showLoading();
  • In view of the above considerations, I added the function of setting custom default Loading and Toast styles at the entrance

Let me show you the following

  • The entry needs to be configured: implement toastBuilder and loadingBuilder, and pass in custom Toast and Loading
void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: HomePage,
      // here
      navigatorObservers: [FlutterSmartDialog.observer],
      // here
      builder: FlutterSmartDialog.init(
        //custom default toast widget
        toastBuilder: (String msg) => CustomToastWidget(msg: msg),
        //custom default loading widget
        loadingBuilder: (String msg) => CustomLoadingWidget(msg: msg),
        //custom default notify widget
        notifyStyle: FlutterSmartNotifyStyle(
          successBuilder: (String msg) => CustomSuccessWidget(msg: msg),
          failureBuilder: (String msg) => CustomFailureWidget(msg: msg),
          warningBuilder: (String msg) => CustomWarningWidget(msg: msg),
          alertBuilder: (String msg) => CustomAlertWidget(msg: msg),
          errorBuilder: (String msg) => CustomErrorWidget(msg: msg),
        ),
      ),
    );
  }
}
  • SmartDialog supports default global configuration
SmartDialog.config
  ..custom = SmartConfigCustom(
    maskColor: Colors.black.withOpacity(0.35),
    useAnimation: true,
  )
  ..attach = SmartConfigAttach(
    animationType: SmartAnimationType.scale,
    usePenetrate: false,
  )
  ..loading = SmartConfigLoading(
    clickMaskDismiss: false,
    leastLoadingTime: const Duration(milliseconds: 0),
  )
  ..toast = SmartConfigToast(
    intervalTime: const Duration(milliseconds: 100),
    displayTime: const Duration(milliseconds: 2000),
  );

Easy usage

  • toast usage💬
SmartDialog.showToast('test toast');

toastDefault

  • loading usage⏳
SmartDialog.showLoading();
await Future.delayed(Duration(seconds: 2));
SmartDialog.dismiss(); 

loadingDefault

  • dialog usage🎨
SmartDialog.show(builder: (context) {
  return Container(
    height: 80,
    width: 180,
    decoration: BoxDecoration(
      color: Colors.black,
      borderRadius: BorderRadius.circular(10),
    ),
    alignment: Alignment.center,
    child:
    Text('easy custom dialog', style: TextStyle(color: Colors.white)),
  );
});

dialogEasy

श्रेणियाँ

निर्भरताएँ

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

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

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