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

A lightweight Flutter selection package with single select, multi select, toggle selection, select all and clear selection.

zeba_academy_selection ๐ŸŽฏ #

A lightweight and reusable Flutter selection management package that provides powerful selection utilities including single selection, multi selection, toggle selection, select all, and clear selection.

Built with โค๏ธ for Flutter developers by Zeba Academy.


โœจ Features #

zeba_academy_selection provides simple and flexible selection handling for Flutter applications.

Available Features #

โœ… Single selection โœ… Multi selection โœ… Toggle selection โœ… Select all items โœ… Clear selections โœ… Remove selected items โœ… Generic type support โœ… Null safety support โœ… Lightweight and dependency free โœ… Controller-based architecture


๐Ÿš€ Installation #

Add the package to your pubspec.yaml file:

dependencies:
  zeba_academy_selection: ^1.0.0

Run:

flutter pub get

๐Ÿ“– Usage #

Single Selection #

Create a selection controller:

final controller = SelectionController<String>();

Use the single selection widget:

ZebaSingleSelection<String>(
  items: [
    "Flutter",
    "Dart",
    "Firebase",
  ],

  controller: controller,

  builder: (context, item, selected) {

    return ListTile(
      title: Text(item),

      trailing: selected
          ? const Icon(Icons.check)
          : null,
    );

  },
);

Multiple Selection #

Create a multi-selection controller:

final controller = MultiSelectionController<String>();

Use:

ZebaMultiSelection<String>(

  items: [
    "Flutter",
    "Dart",
    "Firebase",
  ],

  controller: controller,

  builder: (context, item, selected) {

    return CheckboxListTile(

      title: Text(item),

      value: selected,

      onChanged: null,

    );

  },

);

๐ŸŽฏ Controller APIs #

SelectionController #

Used for handling single selection.


Select Item #

controller.select("Flutter");

Check Selection #

controller.isSelected("Flutter");

Toggle Selection #

controller.toggle("Flutter");

Clear Selection #

controller.clear();

MultiSelectionController #

Used for handling multiple selections.


Add Selection #

controller.select("Flutter");

Remove Selection #

controller.remove("Flutter");

Toggle Selection #

controller.toggle("Flutter");

Select All #

controller.selectAll([
  "Flutter",
  "Dart",
  "Firebase",
]);

Clear All #

controller.clear();

๐Ÿ’ก Use Cases #

This package is useful for:

  • Category selection
  • Filter chips
  • Tags selection
  • Multi-choice forms
  • Permission selection
  • Interest selection
  • Product filtering
  • Quiz options
  • Dashboard filters
  • Settings screens

๐Ÿ“‚ Package Structure #

lib/
โ”‚
โ”œโ”€โ”€ zeba_academy_selection.dart
โ”‚
โ””โ”€โ”€ src/
    โ”‚
    โ”œโ”€โ”€ selection_controller.dart
    โ”œโ”€โ”€ multi_selection.dart
    โ”œโ”€โ”€ single_selection.dart
    โ””โ”€โ”€ selection_group.dart

๐Ÿงช Testing #

Run package tests:

flutter test

Analyze the package:

flutter analyze

Check publishing:

flutter pub publish --dry-run

๐ŸŒŸ Why Zeba Academy Packages? #

Zeba Academy Flutter packages are created with:

  • Clean and simple APIs
  • Developer-friendly architecture
  • Production-ready code
  • Easy integration
  • Open-source learning approach

๐Ÿ‘จโ€๐Ÿ’ป About Me #

โœจ Iโ€™m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.

You can learn more about me and my work at:

https://sufyanism.com/

or connect with me on LinkedIn:

https://www.linkedin.com/in/sufyanism


๐Ÿš€ Your all-in-one learning hub! #

Zeba Academy is a learning platform dedicated to coding, technology, and development.

Explore courses, tutorials, and practical resources designed to help developers build real-world skills.

โžก Main website:

https://zeba.academy

โžก Coding courses and resources:

https://code.zeba.academy

โžก YouTube tutorials:

https://www.youtube.com/@zeba.academy

โžก Instagram:

https://www.instagram.com/zeba.academy/


๐Ÿ“œ License #

This project is licensed under the GNU General Public License v3.0 (GPL-3.0).

You are free to:

โœ… Use this package โœ… Study the source code โœ… Modify the package โœ… Share improvements

Any distributed modified version must also be released under the same GPL-3.0 license.

Full license:

https://www.gnu.org/licenses/gpl-3.0.html


โค๏ธ Support #

If you find this package useful:

โญ Star the project ๐Ÿ“ข Share it with Flutter developers ๐Ÿค Contribute improvements


Thank you for visiting!

Built with โค๏ธ by Zeba Academy

0
likes
140
points
81
downloads

Documentation

API reference

Publisher

verified publisherzeba.academy

Weekly Downloads

A lightweight Flutter selection package with single select, multi select, toggle selection, select all and clear selection.

Homepage

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on zeba_academy_selection