custom_single_select 1.0.0 copy "custom_single_select: ^1.0.0" to clipboard
custom_single_select: ^1.0.0 copied to clipboard

A flexible and customizable single-select package for Flutter. You have 2 options, one with search capability if your list is long enough and the second for a short list without search. Offer a perfec [...]

🚀 Custom Single Select 👋 #

Pub Version Relative date Pub Score

A flexible and customizable single select package for Flutter. You have 2 options, one with search capability if your list is long enough and the second for a short list without search. Offer a perfect selection solution for your applications.

🛠 Examples #

  • Import library
        import 'package:custom_single_select/custom_single_select.dart';
    

Use package

  • Without search option
        CustomSingleSelect<String>(
            isBarrierDismissible: true,
            onSelect: (value) {
                setState(() {
                    initialValue = value;
                });
             },
            items: dataString,
            cancelText: "Fermer",
            cancelBackgroundColor: Colors.green,
            itemBackgroundColor: Colors.white,
            titleBackgroundColor: Colors.orange,
            separatorColor: Colors.blueGrey,
            separatorHeight: 3,
            cancelTextStyle: const TextStyle(
                color: Colors.white,
                fontSize: 20,
            ),
            itemTextStyle: const TextStyle(
                color: Colors.deepPurple,
                fontWeight: FontWeight.bold,
                fontSize: 20,
            ),
            title: "Country",
            titleTextStyle: const TextStyle(
                fontSize: 25,
                fontWeight: FontWeight.bold,
                color: Colors.white,
            ),
            selectedItemTextStyle: const TextStyle(
                fontSize: 20, fontWeight: FontWeight.bold
            ),
            decoration: const InputDecoration(
                suffixIcon: Icon(Icons.arrow_drop_down, size: 25),
                border: InputBorder.none,
                hintText: "Without search",
                hintStyle: TextStyle(
                    fontSize: 20,
                    color: Colors.black,
                )
            ),
            initialValue: initialValue
        )
    
  • With search option
        CustomSingleSearchSelect<String>(
            isBarrierDismissible: true,
            items: dataString,
            cancelText: "Fermer",
            cancelBackgroundColor: Colors.green,
            itemBackgroundColor: Colors.white,
            titleBackgroundColor: Colors.orange,
            separatorColor: Colors.blueGrey,
            separatorHeight: 3,
            cancelTextStyle: const TextStyle(
                color: Colors.white,
                fontSize: 20,
            ),
            itemTextStyle: const TextStyle(
                color: Colors.deepPurple,
                fontWeight: FontWeight.bold,
                fontSize: 20,
            ),
            title: "Country",
            titleTextStyle: const TextStyle(
                fontSize: 25,
                fontWeight: FontWeight.bold,
                color: Colors.black,
            ),
            selectedItemTextStyle: const TextStyle(
                fontSize: 20, fontWeight: FontWeight.bold
            ),
            decoration: const InputDecoration(
                suffixIcon: Icon(Icons.arrow_drop_down, size: 25),
                border: InputBorder.none,
                hintText: "With search",
                hintStyle: TextStyle(
                    fontSize: 20,
                    color: Colors.black,
                )
            ),
            searchStyle: const TextStyle(
                fontSize: 20,
                color: Colors.black,
            ),
            searchDecoration: const InputDecoration(
                border: InputBorder.none,
                hintText: "Search country",
                hintStyle: TextStyle(
                    fontSize: 20,
                    color: Colors.black,
                )
            ),
            onSelect: (value) {
                setState(() {
                    searchInitialValue = value;
                });
            },
            valueSelected: searchInitialValue
        )
    

👩‍💻 Screenshots #

1 2 3 4 5 6

😄 Author #

Agbetogor Germain (Germinator)

3
likes
140
pub points
44%
popularity

Publisher

unverified uploader

A flexible and customizable single-select package for Flutter. You have 2 options, one with search capability if your list is long enough and the second for a short list without search. Offer a perfect selection solution for your applications.

Homepage

Documentation

API reference

License

Unlicense (license)

Dependencies

flutter

More

Packages that depend on custom_single_select