🧠 smartx_dropdown_plus

A fully customizable dropdown widget for Flutter — built with overlay-based positioning, advanced styling options, and full control over label, hint, icon, and color behavior.


✨ Features

Category Description
🧩 Overlay dropdown Works like native dropdown but with custom overlay for flexible UI
🎨 Full customization Colors, shapes, border, shadows, icons, animation — all customizable
🪄 Label & Hint modes Show labeled dropdown or hint-only mode easily
🌈 Background colors Single color, looping List<Color>, or Map<value, Color>
⚡ Smooth animations Built-in open/close animation control
🧭 Scroll support Fixed height with auto-scrolling if items exceed view height
🧱 Material 3 friendly Clean design, supports custom themes

🚀 Getting Started

Add dependency in your pubspec.yaml:

dependencies:
  smartx_dropdown_plus: ^1.0.0


Then import it:

import 'package:smartx_dropdown_plus/smartx_dropdown_plus.dart';

💡 Example Usage
AppDropdownLabeled<String>(
  labelText: 'Course:',
  hintText: 'Select a course',
  items: ['Math', 'Science', 'History'],
  selectedItem: selectedCourse,
  getTitle: (v) => v,
  getValue: (v) => v,
  onSelect: (v) => setState(() => selectedCourse = v),

  // optional styling
  labelStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
  iconColor: Colors.deepPurple,
  backgroundColors: [
    Colors.deepPurple.shade50,
    Colors.orange.shade50,
    Colors.teal.shade50,
  ],
);

🧱 Example App Preview

The package includes a working example in /example/lib/main.dart.

Run it with:

cd example
flutter run


Preview UI:

⚙️ Customization Options
Parameter	Type	Description
labelText	String?	Optional label before value
hintText	String?	Hint when no label/value selected
labelStyle, hintStyle, valueStyle	TextStyle?	Customize text appearances
leadingIcon, trailingIcon	Widget?	Add icons to dropdown field
backgroundColors	Color / List<Color> / Map<dynamic, Color>	Controls dropdown item colors
dropdownDecoration	BoxDecoration?	Custom dropdown container decoration
selectedItemDecoration	BoxDecoration?	Style for selected item row
borderRadius, borderColor, borderWidth	double, Color, double	Shape and border control
iconColor, iconSize, iconRotation	Various	Icon behavior and design
itemHeight, maxListHeight	double	Controls dropdown list size
openAnimationDuration, closeAnimationDuration	Duration	Customize dropdown open/close timing
🧰 Example Screenshot
┌──────────────────────────────┐
│ Course:  ▼                  │
│ ┌──────────────────────────┐ │
│ │ Mathematics              │ │
│ │ Science ✔️               │ │
│ │ History                  │ │
│ └──────────────────────────┘ │
└──────────────────────────────┘

Libraries

smartx_dropdown_plus
Main library file for smartx_dropdown_plus. Exports all internal components for public use.