FLUTTER ECOSYSTEM

davidsdearaujo/select_dialog

एक ऐसा Flutter पैकेज जो सूची से एक आइटम को चुनने के लिए डिज़ाइन किया गया है, जिसमें आइटम को फ़िल्टर करने और ऑनलाइन खोजने का विकल्प भी है।

चयन डायलॉग प्रोजेक्ट कवर
Stars
64
Forks
43
अंतिम पुश (UTC)
19 जून 2024
प्रोजेक्ट स्थिति
सक्रिय
David Araujo GitHub avatar
GITHUB User

David Araujo ↗

Front End Developer at Autonation | Flutter Google Mentor | Flutterando Founder

Autonation
भाषाएँDartC++CMakeHTMLCSwiftKotlinObjective-C

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

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

निर्भरता सूची 2 आइटम
  • flutter{"sdk":"flutter"}
  • testडेवलपमेंट^1.24.6

मूल README

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

README खोलें / बंद करें

select_dialog Package

Package designed to select an item from a list, with the option to filter and even search the items online.

https://user-images.githubusercontent.com/16373553/94357714-95d4fc80-0071-11eb-8b99-9cff034a1ece.png https://user-images.githubusercontent.com/16373553/94357674-4098eb00-0071-11eb-8985-45edf99b9812.png

Versions

Non Null Safety Version: 1.2.3 or less

Null Safety Version: 2.0.0 or more

pubspec.yaml

select_dialog: <last version>

import

import 'package:select_dialog/select_dialog.dart';

Simple example

String ex1 = "No value selected";

SelectDialog.showModal<String>(
  context,
  label: "Simple Example",
  selectedValue: ex1,
  items: List.generate(50, (index) => "Item $index"),
  onChange: (String selected) {
    setState(() {
      ex1 = selected;
    });
  },
);

Multiple items select

List<String> ex5 = [];

SelectDialog.showModal<String>(
  context,
  label: "Multiple Items Example",
  multipleSelectedValues: ex5,
  items: List.generate(50, (index) => "Item $index"),
  onMultipleItemsChange: (List<String> selected) {
    setState(() {
      ex5 = selected;
    });
  },
); 
MORE EXAMPLES

Attention

To use a template as an item type, you need to implement toString, equals and hashcode, as shown below:

class UserModel {
  final String id;
  final DateTime createdAt;
  final String name;
  final String avatar;

  UserModel({this.id, this.createdAt, this.name, this.avatar});

  @override
  String toString() => name;

  @override
  operator ==(o) => o is UserModel && o.id == id;

  @override
  int get hashCode => id.hashCode^name.hashCode^createdAt.hashCode;

}

Getting Started

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.