Zeba Academy Voting

A reusable Flutter classroom voting package for creating live polls, MCQ voting, anonymous responses, real-time results, and poll history.

Build interactive learning experiences with a simple and customizable voting system.

Flutter Dart License


✨ Features

✅ Classroom live polls
✅ Multiple choice questions
✅ Anonymous voting support
✅ Real-time voting results UI
✅ Dynamic percentage calculation
✅ Poll history screen
✅ Reusable Flutter widgets
✅ BLoC state management
✅ Material 3 compatible
✅ Easy integration


📦 Installation

Add dependency:

dependencies:
  zeba_academy_voting: ^1.0.0

Run:

flutter pub get

🚀 Getting Started

Import the package:

import 'package:zeba_academy_voting/zeba_academy_voting.dart';

🗳️ Create a Poll

final poll = Poll(

  id: "flutter_poll",

  question: "What is Flutter?",

  options: [

    PollOption(
      id: "1",
      title: "UI Framework",
    ),

    PollOption(
      id: "2",
      title: "Programming Language",
    ),

    PollOption(
      id: "3",
      title: "Database",
    ),

  ],

);

🎓 Display Voting Screen

VotingScreen(

  poll: poll,

)

The screen provides:

  • Question display
  • Voting options
  • Vote handling
  • Live result updates

📊 Result Example

The package automatically calculates:

Flutter UI Framework

██████████ 70%

Programming Language

████ 20%

Database

█ 10%

🕵️ Anonymous Voting

Enable anonymous voting:

Poll(

 anonymous: true,

)

Students can participate without identity tracking.


📚 Poll History

Display previous polls:

HistoryScreen(

 history: [

 "Flutter Basics",
 "Dart Quiz",
 "Widget Poll"

 ]

)

🏗️ Architecture

Built with:

  • Flutter
  • Dart
  • flutter_bloc
  • Equatable

Structure:

lib/

 ├── models

 ├── bloc

 ├── widgets

 └── screens

🔮 Roadmap

Coming soon:

  • Firebase realtime synchronization
  • WebSocket classroom mode
  • Teacher dashboard
  • Student join code
  • Poll timer
  • Quiz leaderboard
  • Export results
  • Analytics dashboard

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 on LinkedIn:

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


Zeba Academy

🚀 Your all-in-one learning hub!

Explore courses and resources in coding, technology, and development at:

https://zeba.academy

Learn practical skills through curated tutorials, real-world projects, and hands-on experience.

Visit:

➡ Main website
https://zeba.academy

➡ Coding resources
https://code.zeba.academy

➡ YouTube tutorials
https://www.youtube.com/@zeba.academy

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


🤝 Contributing

Contributions are welcome.

Steps:

  1. Fork this repository

  2. Create a feature branch

git checkout -b feature/new-feature
  1. Commit changes
git commit -m "Add new feature"
  1. Push
git push origin feature/new-feature
  1. Open a Pull Request

📄 License

This project is licensed under the GNU General Public License v3.0.

You are free to use, modify, and distribute this package under GPL-3.0 terms.

See:

LICENSE

for details.


⭐ Support

If this package helps your project, consider giving it a star ⭐.

Thank you for using Zeba Academy Voting 🚀