enhanced_drop_down 0.2.0 copy "enhanced_drop_down: ^0.2.0" to clipboard
enhanced_drop_down: ^0.2.0 copied to clipboard

A completely customizable drop down widget that comes with a label built in. You can customize the label, the data, the default value and more.

example/example.dart

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.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(key: UniqueKey(), title: 'Flutter Demo Home Page'),
    );
  }
}

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

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  String _selected = "";

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text('Requesting Location Permission'),
        ),
        body:Column(
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              Center(
                child: new EnhancedDropDown.withData(
                  dropdownLabelTitle: "Label",
                  defaultOptionText: "Select One",
                  dataSource: ["Option A", "Option B"],
                  valueReturned: (chosen) {
                    _selected = chosen;
                    print(_selected);
                  },
                ),
              )]
        )
    );
  }
}
6
likes
0
pub points
68%
popularity

Publisher

unverified uploader

A completely customizable drop down widget that comes with a label built in. You can customize the label, the data, the default value and more.

Homepage

License

unknown (LICENSE)

Dependencies

flutter, http

More

Packages that depend on enhanced_drop_down