enhanced_drop_down 0.1.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 82

Enhanced Dropdown Widget #

A completely customizable drop down widget, which wraps a label and a dropdown widget together into one component.

Usage #

To use this package add enhanced_drop_down as a dependency in your pubspec.yaml file..


An Enhanced Dropdown Widget (or EDW), is based on flutter's dropdown widget, but enhances it in the following manner:

  • Attached to the dropdown is a label, to help point out to the user what values the dropdown might have

  • You can pass in the data source from where the dropdown will get its values

  • You can pass a default value to be the visible choice when the dropdown is not selected

  • You want to know what choice the user made, so a callback function must be supplied to get the user's choice back

  • In case you are relying on an external source to provide the data for the dropdown, you can pass in the url to fetch that data

Please be aware that currently, the parsing of the url is in JSON and only valid for key-value pairs that are in String format and type

Instantiating an EDW is as follows: #

new EnhancedDropDownWidget(
    dropdownLabelTitle: "Label",
    defaultOptionText: "Select One",
    urlToFetchData: "https://pub.dev/",
    dataSource: ["Option A", "Option B"],
    valueReturned: (chosen) {


[0.1.2] - Shortened description of package and formatted main dart file #

[0.1.1] - Fixing initial values and changes according to Flutter package scoring. Enabled parsing of urls to populate drop down. #

[0.1.0] - Initial Version #


import 'package:flutter/material.dart';
import 'package:enhanced_drop_down/enhanced_drop_down.dart';

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      home: MyHomePage(title: 'Flutter Demo Home Page'),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  _MyHomePageState createState() => _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {

  String _selected = "";

  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text('Requesting Location Permission'),
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
                child: new EnhancedDropDown(
                  dropdownLabelTitle: "Label",
                  defaultOptionText: "Select One",
                  urlToFetchData: "https://pub.dev/",
                  dataSource: ["Option A", "Option B"],
                  valueReturned: (chosen) {
                    _selected = chosen;

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  enhanced_drop_down: ^0.1.2

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:enhanced_drop_down/enhanced_drop_down.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Apr 7, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
http ^0.12.0+2 0.12.0+4
Transitive dependencies
async 2.4.1
charcode 1.1.3
collection 1.14.11 1.14.12
http_parser 3.1.4
meta 1.1.8
path 1.6.4
pedantic 1.9.0
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies