nishtha_dropdown_kit

A fully customizable Flutter dropdown widget with search, debounce, server-side pagination, and automatic theme-aware styling — no hardcoded colors.

Created by Nishtha Desai @Flutter Developer.

Features

  • Optional inline search with debounce
  • Pagination via onFetch for server-backed lists
  • Auto up/down positioning based on available screen space
  • Fully overridable styling — falls back to your app's Theme when nothing is passed

Getting started

dependencies:
  nishtha_dropdown_kit: ^0.0.5

Usage

SmartDropDown<String>(
  items: const ['Apple', 'Banana', 'Cherry'],
  hintText: 'Pick a fruit',
  isSearch: true,
  onItemSelected: (item) => print(item),
)

Pagination Usage

SmartDropDown<Product>(
    loaderColor: Colors.blue,
    isPagination: true,
    onFetch: ({page = 1, query}) async {
    final result = await apiRepo.products(
    page: page,
    search: query,
    return result.data?? [];
    },
    controller: searchController,
    hintText: 'Search Product..',
    isSearch: true,
    itemBuilder: (context, item, isSelected) {
    return Padding(
    padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 20),
    child: Row(
    mainAxisSize: MainAxisSize.max,
    mainAxisAlignment: MainAxisAlignment.spaceBetween,
    children: [
    Flexible(child: Text("${item.name}", maxLines: 1, overflow: TextOverflow.ellipsis, softWrap: true)),
    const SizedBox(width:12),
    const Icon(Icons.arrow_forward_ios, size: 15, color: AppColors.greyColors),
    ],),);},
    onItemSelected: (item) {
    searchController.text = item.name ?? "";
    
    },
),