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

Powerful offline quiz engine with analytics.

zeba_academy_quiz_engine #

A powerful, modular, and offline‑first Flutter quiz engine designed for education apps, learning platforms, and assessment systems.


✨ Overview #

zeba_academy_quiz_engine is a reusable Flutter package that provides a complete quiz infrastructure including question handling, timers, analytics, offline storage, scoring, and result presentation.

It is built with scalability and clean architecture principles so it can be integrated into small learning apps or enterprise‑level academy platforms.


🚀 Features #

  • ✅ Multiple Question Types

    • MCQ (Multiple Choice Questions)
    • True / False
    • Fill in the Blank
  • ✅ Question randomization

  • ✅ Timer support

    • Per question
    • Full quiz timer
  • ✅ Automatic score calculation

  • ✅ Performance analytics

  • ✅ Offline quiz storage

  • ✅ Result summary screen UI

  • ✅ Clean and extensible API

  • ✅ Null‑safe & production ready


📦 Installation #

Add the package to your pubspec.yaml:

dependencies:
  zeba_academy_quiz_engine:
    path: ../zeba_academy_quiz_engine

Then run:

flutter pub get

🧠 Basic Concepts #

Question Types #

enum QuestionType {
  mcq,
  trueFalse,
  fillBlank,
}

Quiz Flow #

  1. Create questions
  2. Initialize QuizEngine
  3. Submit answers
  4. Finish quiz
  5. Show result screen

🧩 Creating Questions #

final questions = [
  QuizQuestion(
    id: "1",
    question: "Capital of France?",
    type: QuestionType.mcq,
    options: ["Paris", "London", "Rome"],
    correctAnswer: "Paris",
    marks: 2,
  ),
];

⚙️ Initialize Quiz Engine #

final engine = QuizEngine(
  questions,
  shuffle: true,
);

⏱ Timer Usage #

engine.startTimer(() {
  print("Timer tick");
});

Stop timer automatically when quiz finishes:

final result = engine.finishQuiz();

✅ Submitting Answers #

engine.submitAnswer("Paris");
engine.nextQuestion();

📊 Get Quiz Result #

final result = engine.finishQuiz();

print(result.score);
print(result.correct);
print(result.wrong);

📈 Analytics #

final accuracy = QuizAnalytics.accuracy(result);
final level = QuizAnalytics.performanceLevel(result);

Performance Levels:

Accuracy Level
80%+ Excellent
60–79% Good
40–59% Average
<40% Needs Improvement

💾 Offline Quiz Storage #

Save Quiz #

await QuizStorage.saveQuiz(questions);

Load Quiz #

final storedQuestions = await QuizStorage.loadQuiz();

🖥 Result Screen UI #

Navigator.push(
  context,
  MaterialPageRoute(
    builder: (_) => QuizResultScreen(result: result),
  ),
);

🏗 Architecture #

lib/
 ├── models      → Data models
 ├── engine      → Quiz logic
 ├── analytics   → Performance calculations
 ├── storage     → Offline persistence
 ├── ui          → Ready‑made screens
 └── public API

🧪 Testing #

Run tests using:

flutter test

Static analysis:

flutter analyze

🔧 Customization #

You can extend:

  • Custom scoring systems
  • Negative marking
  • Difficulty levels
  • Adaptive quizzes
  • Remote sync providers

📚 Example Use Cases #

  • Learning apps
  • Online academies
  • Certification exams
  • Practice test apps
  • School assessment systems

🛡 Null Safety #

This package fully supports Dart null safety.


🤝 Contributing #

Contributions, issues, and feature requests are welcome.

Steps:

  1. Fork repository
  2. Create feature branch
  3. Commit changes
  4. Submit pull request

📄 License #

MIT License


👨‍💻 Author #

Zeba Academy


⭐ Support #

If this package helps your project, consider giving it a star and sharing feedback.


Production‑ready Flutter Quiz Engine for modern education apps.

0
likes
130
points
90
downloads

Documentation

API reference

Publisher

verified publisherzeba.academy

Weekly Downloads

Powerful offline quiz engine with analytics.

Homepage

License

unknown (license)

Dependencies

flutter, shared_preferences, uuid

More

Packages that depend on zeba_academy_quiz_engine