dropdown_kit 0.0.1 copy "dropdown_kit: ^0.0.1" to clipboard
dropdown_kit: ^0.0.1 copied to clipboard

A complete dropdown kit with search, multi-select and three display modes

example/lib/main.dart

import 'package:flutter/material.dart';
import 'screens/single_select_screen.dart';
import 'screens/multi_select_screen.dart';

void main() => runApp(const DropdownKitExampleApp());

class DropdownKitExampleApp extends StatelessWidget {
  const DropdownKitExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'dropdown_kit example',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: const Color(0xFF6366F1)),
        useMaterial3: true,
        scaffoldBackgroundColor: const Color(0xFFF3F4F6),
        appBarTheme: const AppBarTheme(
          backgroundColor: Colors.white,
          foregroundColor: Color(0xFF111827),
          elevation: 0,
          centerTitle: false,
          titleTextStyle: TextStyle(
            fontSize: 17,
            fontWeight: FontWeight.w600,
            color: Color(0xFF111827),
          ),
        ),
      ),
      home: const HomeScreen(),
    );
  }
}

/// Entry screen — simple nav to single and multi demos.
class HomeScreen extends StatelessWidget {
  const HomeScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('dropdown_kit')),
      body: Padding(
        padding: const EdgeInsets.all(24),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            const Text(
              'Examples',
              style: TextStyle(
                fontSize: 13,
                fontWeight: FontWeight.w600,
                color: Color(0xFF6B7280),
                letterSpacing: 0.5,
              ),
            ),
            const SizedBox(height: 12),
            _NavCard(
              icon: Icons.radio_button_checked_rounded,
              title: 'Single Select',
              subtitle: 'KitDropdown — overlay, bottom sheet & dialog modes',
              onTap: () => Navigator.push(
                context,
                MaterialPageRoute(
                  builder: (_) => const SingleSelectScreen(),
                ),
              ),
            ),
            const SizedBox(height: 12),
            _NavCard(
              icon: Icons.check_box_rounded,
              title: 'Multi Select',
              subtitle:
                  'KitDropdownMulti — chips, live checkboxes, all three modes',
              onTap: () => Navigator.push(
                context,
                MaterialPageRoute(
                  builder: (_) => const MultiSelectScreen(),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

class _NavCard extends StatelessWidget {
  const _NavCard({
    required this.icon,
    required this.title,
    required this.subtitle,
    required this.onTap,
  });

  final IconData icon;
  final String title;
  final String subtitle;
  final VoidCallback onTap;

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Container(
        padding: const EdgeInsets.all(16),
        decoration: BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.circular(14),
          boxShadow: [
            BoxShadow(
              color: Colors.black.withValues(alpha: 0.05),
              blurRadius: 10,
              offset: const Offset(0, 2),
            ),
          ],
        ),
        child: Row(
          children: [
            Container(
              width: 44,
              height: 44,
              decoration: BoxDecoration(
                color: const Color(0xFFEEF2FF),
                borderRadius: BorderRadius.circular(10),
              ),
              child: Icon(icon, color: const Color(0xFF6366F1), size: 22),
            ),
            const SizedBox(width: 14),
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text(
                    title,
                    style: const TextStyle(
                      fontSize: 15,
                      fontWeight: FontWeight.w600,
                      color: Color(0xFF111827),
                    ),
                  ),
                  const SizedBox(height: 2),
                  Text(
                    subtitle,
                    style: const TextStyle(
                      fontSize: 12,
                      color: Color(0xFF6B7280),
                    ),
                  ),
                ],
              ),
            ),
            const Icon(
              Icons.chevron_right_rounded,
              color: Color(0xFF9CA3AF),
              size: 20,
            ),
          ],
        ),
      ),
    );
  }
}
9
likes
160
points
108
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A complete dropdown kit with search, multi-select and three display modes

Repository (GitHub)
View/report issues

Topics

#multi-select #search #overlay #bottom-sheet #dialog

License

MIT (license)

Dependencies

flutter

More

Packages that depend on dropdown_kit