Search packages, repositories and app categories

direct_select_flutter cover
Package detailsv1.2.0

direct_select_flutter

Direct Select Widget Implementation inspired by https://dribbble.com/shots/3876250-DirectSelect-Dropdown-ux

AndroidiOSWebmacOSWindowsLinux
30-day downloads
440
Likes
321
Pub points
160

Install package

flutter pub add direct_select_flutter

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package that implements a direct select widget inspired by a Dribbble design, offering an intuitive and visually appealing dropdown experience. It enables users to directly interact with options through a smooth, gesture-driven interface, enhancing UX on mobile and web platforms. The widget supports customization and integrates seamlessly into forms and data entry flows. Built for modern UI/UX standards, it emphasizes clarity and responsiveness across all supported platforms.

Use cases

  • Form inputs with dropdowns
  • Enhanced user experience in mobile apps
  • Customizable selection interfaces
  • Data entry with visual feedback
  • Interactive web and desktop forms

Key features

  • Gesture-driven selection
  • Smooth animations
  • Cross-platform compatibility
  • Customizable styling
  • Responsive design
  • Easy integration with existing forms

Suitable for

  • Developers seeking modern dropdowns
  • UX-focused app designers
  • Mobile-first application development
  • Web and desktop Flutter applications
  • Projects requiring intuitive input components

Considerations

  • May require additional styling for complex themes
  • Limited to single-selection mode
  • Performance impact with very large datasets
  • Not ideal for nested or hierarchical selections
  • Requires careful handling of accessibility features

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

direct-select-flutter

DirectSelect is a selection widget with an ethereal, full-screen modal popup displaying the available choices when the widget is interact with. Inspired by dribble shot.

Made in lanars.com.

pub package Awesome Flutter

iOS

Android

Usage

Create DirectSelectList and fill it with items using itemBuilder

    final dsl = DirectSelectList<String>(
        values: _cities,
        defaultItemIndex: 3,
        itemBuilder: (String value) => getDropDownMenuItem(value),
        focusedItemDecoration: _getDslDecoration(),
        onItemSelectedListener: (item, index, context) {
          Scaffold.of(context).showSnackBar(SnackBar(content: Text(item)));
        });

Create items like this

  DirectSelectItem<String> getDropDownMenuItem(String value) {
    return DirectSelectItem<String>(
        itemHeight: 56,
        value: value,
        itemBuilder: (context, value) {
          return Text(value);
        });
  }

Create decorations for focused items

  _getDslDecoration() {
   return BoxDecoration(
     border: BorderDirectional(
       bottom: BorderSide(width: 1, color: Colors.black12),
       top: BorderSide(width: 1, color: Colors.black12),
     ),
   );
 }

Create DirectSelectContainer and fill it with your data

Scaffold(
      appBar: appBar,
      body: DirectSelectContainer(
        child: Padding(
          padding: const EdgeInsets.all(16.0),
          child: Column(
            mainAxisSize: MainAxisSize.min,
            verticalDirection: VerticalDirection.down,
            children: <Widget>[
              SizedBox(height: 150.0),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: Column(
                  children: <Widget>[
                    Container(
                      alignment: AlignmentDirectional.centerStart,
                      margin: EdgeInsets.only(left: 4),
                      child: Text("City"),
                    ),
                    Padding(
                      padding: const EdgeInsets.fromLTRB(0, 8, 0, 0),
                      child: Card(
                        child: Row(
                          mainAxisSize: MainAxisSize.max,
                          children: <Widget>[
                            Expanded(
                                child: Padding(
                                    child: DirectSelectList<String>(
                                                     values: _cities,
                                                     defaultItemIndex: 3,
                                                     itemBuilder: (String value) => getDropDownMenuItem(value),
                                                     focusedItemDecoration: _getDslDecoration(),
                                                     onItemSelectedListener: (item, index, context) {
                                                       Scaffold.of(context).showSnackBar(SnackBar(content: Text(item)));
                                                     }),
                                    padding: EdgeInsets.only(left: 12))),
                            Padding(
                              padding: EdgeInsets.only(right: 8),
                              child: Icon(
                                Icons.unfold_more,
                                color: Colors.black38,
                              ),
                            )
                          ],
                        ),
                         ),
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );

Categories

Source repository

Projects using this package

No data available yet.