Skip to content

Jocelin-La-Roch/flutter_dropdown_input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter DROPDOWN INPUT

A simple dropdown input widget.

Installation

Add dropdown_input as a dependency in your pubspec.yaml file (what?).

dropdown_input: ^0.0.1

Import Dropdown Input:

import 'package:dropdown_input/dropdown_input.dart';

Basic usage

Given a List<Map<String, dynamic> optionsList and String filterField as parameters:

  List<Map<String, dynamic>> optionsList = [
    {
      "name": "grey",
      "id": "1"
    },
    {
      "name": "green",
      "id": "2"
    },
    {
      "name": "red",
      "id": "3"
    },
    {
      "name": "orange",
      "id": "4"
    }
  ];
@override
Widget build(BuildContext context) {
  return DropdownInput(
    optionsList: optionsList,
    filterField: "name",
    onItemSelected: (item) {
      print(item);
    },
  );
}

Result

| In action | In action | | In action | In action |

About

A flutter package to easly create a dropdown input

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published