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

Related tags

UI select_dialog
Overview

select_dialog Package

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

Versions

Non Null Safety Version: 1.2.3 or less

Null Safety Version: 2.0.0 or more

pubspec.yaml

select_dialog: 
   

import

import 'package:select_dialog/select_dialog.dart';

Simple example

( context, label: "Simple Example", selectedValue: ex1, items: List.generate(50, (index) => "Item $index"), onChange: (String selected) { setState(() { ex1 = selected; }); }, ); ">
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

"Item $index"), onMultipleItemsChange: (List selected) { setState(() { ex5 = selected; }); }, ); ">
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.

Comments
  • Update rxdart to ^0.24.1

    Update rxdart to ^0.24.1

    Facing the below issue: Because select_dialog >=1.0.7 depends on rxdart ^0.23.1 and flutter_plugin_pdf_viewer 1.0.7 depends on rxdart ^0.24.1, select_dialog >=1.0.7 is incompatible with flutter_plugin_pdf_viewer 1.0.7. And because no versions of flutter_plugin_pdf_viewer match >1.0.7 <2.0.0, select_dialog >=1.0.7 is incompatible with flutter_plugin_pdf_viewer ^1.0.7.

    opened by DevyankShaw 1
  • Is it possible to add

    Is it possible to add "AlwaysShowScrollBar" option?

    As the title suggests.

    For example: final bool alwaysShowScrollBar; // like this

    Scrollbar( isAlwaysShown: alwaysShowScrollBar, child: ... )

    Thank you!

    opened by jiazeh 1
  • Error: Type 'Observable' not found

    Error: Type 'Observable' not found

    I had this problem today,could you help me solve it?

    Compiler message: ../../Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/find_dropdown-0.1.7+1/lib/find_dropdown_bloc.dart:9:3: Error: Type 'Observable' not found. Observable get validateMessageOut => _validateMessage$; ^^^^^^^^^^ ../../Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/find_dropdown-0.1.7+1/lib/find_dropdown_bloc.dart:9:3: Error: Expected 0 type arguments. Observable get validateMessageOut => _validateMessage$; ^ ../../Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/select_dialog-1.0.6+1/lib/select_bloc.dart:8:3: Error: Type 'Observable' not found. Observable<List> filteredListOut; ^^^^^^^^^^ ../../Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/select_dialog-1.0.6+1/lib/select_bloc.dart:8:3: Error: Expected 0 type arguments. Observable<List> filteredListOut;

    bug 
    opened by zangen 1
  • Error After Flutter Upgrade

    Error After Flutter Upgrade

    After Upgrading to the latest flutter stable release 1.12.3 my project is not buildable anymore because of the following error:

    ../flutter/.pub-cache/hosted/pub.dartlang.org/select_dialog-1.0.6+1/lib/select_bloc.dart:9:3: Error: 'Observable' isn't a type. Observable<List<T>> _filteredListOnlineOut;

    bug 
    opened by mmmaxi 1
  • Update select_dialog.dart

    Update select_dialog.dart

    Padronizado o texto para português, o campo de texto já usa a palavra fixa "Procurar" e quando não encontra itens tem a mensagem em inglês, o que dificulta a utilização em qualquer lingua, por hora feito o fix pra poder usar ao menos em portugues, o ideal é usar o localization, mas pode ser feito em um segundo momento.

    opened by rafaelcorbellini-egsys 1
  • Method

    Method "showDialog" is not closing as it used to

    A new attribute of the material's showDialog was added 10 months ago. Basically, when this attribute is true, the opened dialog doesn't close when we tap Back in our device. It'll only close if we tap outside the dialog.

    opened by BlackLeg15 0
  • Updates

    Updates

    Added web size adaptation

    image

    Added callbacks

    • emptyBuilder [Closes #11]
    • loadingBuilder
    • errorBuilder

    Added constraints property

    image

    image

    Added in-code documentation

    image

    Added autofocus property [Closes #5]

    opened by davidsdearaujo 0
  • - library new functionality

    - library new functionality

    • Migration to AndroidX
    • Add new functrion "ItemAsString" to prevent the override of toString method and make possible to work on the same object with different UI (itemAsStringFn1, itemAsStringFn2, ...)
    opened by salim-lachdhaf 0
  • Observable<List<T>> filteredListOut;

    Observable> filteredListOut;

    Observable<List> filteredListOut; Compiler message: ../../../flutterApp/flutter/.pub-cache/hosted/pub.dartlang.org/select_dialog-1.0.6+1/lib/select_bloc.dart:8:3: Error: Type 'Observable' not found. Observable<List> filteredListOut;

    bug 
    opened by plovdev201 0
  • Auto-focus text field for searching

    Auto-focus text field for searching

    Hello,

    It would be great if the text field for typing in search text would get focus automatically when you open the dialog, so that the user does not have to first tap in the field every time he wants to type in search text. Perhaps as an "autoFocusSearchField" option...

    Thanks.

    opened by Laban1 0
  • Reset Button

    Reset Button

    Hi everyone,

    I would like to help your project by adding some features like:

    • Reset Button (I have already implemented this one)
    • Visualise selected items before in multi selection mode (Done this too)

    If you are interested please tell me 👍

    Regards

    opened by domenicrz 3
  • Custom Search Filtering

    Custom Search Filtering

    Hi guys! :heart:

    Thank you so much for this amazing tool!

    I would like to know if we can please override the default filtering. I am using the itemBuilder to build a list of a ICD10 model of mine. The documentation did not really go into detail about that part. The model has an id, code and description in its fields.

    _showICD10Dialog() {
        List<ICD10> ex5 = [];
        SelectDialog.showModal<ICD10>(
          context,
          label: "ICD10 Codes",
          multipleSelectedValues: ex5,
          items: _allICD10,
          onMultipleItemsChange: (List<ICD10> selected) {
            setState(() {
              ex5 = selected;
            });
          },
          itemBuilder: (BuildContext context, ICD10 icd10, bool isSelected) {
            return Container(
              decoration: !isSelected
                  ? null
                  : BoxDecoration(
                      borderRadius: BorderRadius.circular(5.0),
                      color: Colors.white,
                      border: Border.all(
                        color: Theme.of(context).primaryColor,
                      ),
                    ),
              child: ListTile(
                selected: isSelected,
                title: Text(icd10.icd10Code),
                subtitle: Text(icd10.icd10Description),
              ),
            );
          },
        );
    

    How can I make sure that it filters the code and description of the search?

    opened by TylerByte666 0
Owner
David Araujo
Flutter Google Mentor | Manager and Flutter Specialist at F-Team
David Araujo
A Horizontal List view With Lots of modification including a scaled current item.

Pub.dev Scaled List A Horizontal List view With Lots of modification including a scaled current item. Provided with curved custom painting and Dots in

Hosain Mohamed 35 Nov 5, 2022
A ecommerce app created in flutter implementing the features add to cart, total ,add, remove item and a login function

catalog A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

null 0 Nov 27, 2021
Instagram UI designed with Flutter; it is compatible and responsive with any type of Android and iOS devices.

instagram Instagram clone UI designed with Flutter; it is compatible and responsive with any type of Android and iOS devices . Getting Started This pr

Mustafa Nabavi 4 Oct 28, 2021
I designed the animated e-scooter app UI with flutter.

I designed the animated e-scooter app UI with flutter. Also i used the Provider state management and animated widgets. And it's fully responsive.

Soner Karaevli 32 Nov 28, 2022
An app which has only UI of a multimedia app. Designed with Flutter.

multimedia_app ---ScreenShots--- | | | | Getting Started This project is a starting point for a Flutter application. A few resources to get you starte

Resül Çay 3 Jul 14, 2022
Nice and clean Online Shop app UI by using #Flutter.

On our E-commerce app UI has two pages one for the product page which has a horizontal list of categories then a list of our products. Then on the details page, it shows the price and short description of the product with the Buy Now button. The best part of our E-commerce app is, each product has its own color which looks great.

Abu Anwar 1.7k Jan 3, 2023
A nice clean Motorcycle Helmets Online Store Mobile App UI

Motorcycle Helmets Online Store - Mobile App Watch it on YouTube Motorcycle Helmets Online Store A nice clean Motorcycle Helmets Online Store Mobile A

Tushar Mahmud 4 Mar 29, 2022
flutter mutli search 👋

flutter mutli search ??

mejdi hafiane 19 Nov 7, 2022
A Very Good Infinite List Widget created by Very Good Ventures. Great for activity feeds, news feeds, etc. 🦄

InfiniteList comes in handy when building features like activity feeds, news feeds, or anywhere else where you need to lazily fetch and render content for users to consume.

Very Good Open Source 102 Dec 12, 2022
This Dart package offers developers a streamlined library of Flutter widgets, useful for expanding widgets and text views, when users interact with them.

This Dart package offers developers a streamlined library of Flutter widgets, useful for expanding widgets and text views, when users interact with them.

Jesús Rodríguez 44 Dec 6, 2022
A flutter package that contains a collection of icon decoration tools (i.e. gradient, opacity) and icon transition features with cool animation effects.

Advanced Icon A flutter package that contains a collection of icon decoration tools (i.e. gradient, opacity) and icon transition features with cool an

Ankit Mishra 8 Dec 24, 2021
A new Flutter package support scroll to index for Listview, Gridview and NestedScrollView

easy_scroll_to_index A new Flutter package support scroll to index for Listview, Gridview and NestedScrollView Author: DinhVanHung Demo Example: Displ

Dinh Hung 4 Nov 19, 2021
A simple package that provides you with some widgets and cutom clippers which implements the shape of a coupon card.

Coupon UI Kit A simple package that provides you with some widgets and cutom clippers which implements the shape of a coupon card. The example contain

AbdulMuaz Aqeel 15 Dec 20, 2022
A flutter package which makes it easier to display the difference between two images.

?? Before After A flutter package which makes it easier to display the differences between two images.. The source code is 100% Dart, and everything r

Sahil Kumar 741 Dec 30, 2022
A flutter package to help you beautify your app popups.

flutter_beautiful_popup 中文 A flutter package to help you beautify your app popup, can be used in all platform.Live Demo. Preview: Getting Started Add

朱嘉伟 568 Dec 30, 2022
A flutter package for building card based forms.

Card Settings NOTE: THIS IS EFFECTIVELY NULLSAFE BUT CANNOT REFLECT THIS UNTIL cupertino_settings IS UPGRADED. A flutter package for building settings

CodeGrue 445 Dec 26, 2022
A powerful & easy to use timeline package for Flutter! 🚀

A powerful & easy to use timeline package for Flutter! ?? Caveat: This package is an early stage. Not enough testing has been done to guarantee stabil

Chulwoo Park 566 Dec 30, 2022
A package to help build customisable timelines in Flutter.

TimelineTile A package to help build customisable timelines in Flutter. Example You can access the example project for a Timeline Showcase. The Beauti

null 549 Jan 6, 2023
A Flutter package that provides an Emoji picker widget with 1500+ emojis in 8 categories.

emoji_picker_flutter Yet another Emoji Picker for Flutter ?? Note: This package is based on emoji_picker which has been deprecated and not maintained

Stefan Humm 99 Dec 24, 2022