Skip to content

Latest commit

 

History

History
94 lines (68 loc) · 3.81 KB

File metadata and controls

94 lines (68 loc) · 3.81 KB

🧠 Quizzler

A dynamic True/False trivia quiz app built with Flutter, powered by the Open Trivia Database API. Quizzler challenges players across three progressively harder difficulty levels — Easy, Medium, and Hard — while tracking their score in real time.

Flutter Dart License Platform


📱 Overview

Quizzler fetches live trivia questions from a public REST API and presents them one at a time as simple True/False prompts. As players clear all 10 questions in a round, they automatically progress to the next difficulty tier — from Easy, to Medium, to Hard — with the option to restart from the beginning at any point.

✨ Features

  • Live trivia data — Questions are fetched in real time from the Open Trivia DB API (opentdb.com)
  • Three difficulty phases — Easy → Medium → Hard, unlocked progressively as the player advances
  • Real-time score tracking — Correct and incorrect answer counters update as you play
  • Visual answer history — A running row of ✅ / ❌ icons shows how each question was answered
  • Interactive end-of-round dialogs — Prompts to advance to the next difficulty or restart the quiz entirely
  • Clean, responsive UI — Built entirely with Flutter's Material widgets

🛠️ Tech Stack

Category Technology
Framework Flutter
Language Dart
Networking http package
Alerts / Dialogs rflutter_alert
Data Source Open Trivia Database API

📂 Project Structure

lib/
├── main.dart          # App entry point, UI, state management, and API calls
├── question.dart       # Question model class
└── quizz_brain.dart    # Quiz logic: tracking progress, current question, and completion state

🚀 Getting Started

Prerequisites

  • Flutter SDK (compatible with Dart SDK ^3.12.2)
  • An emulator, simulator, or physical device to run the app

Installation

  1. Clone the repository

    git clone https://github.com/YoucefMebAmaneEllahGherbal/quizzler.git
    cd quizzler
  2. Install dependencies

    flutter pub get
  3. Run the app

    flutter run

🎮 How It Works

  1. On launch, the app fetches 10 Easy-difficulty True/False questions from the Open Trivia DB API.
  2. The player answers each question by tapping True or False.
  3. Each answer is checked against the correct answer, updating the score and appending an icon to the answer-history row.
  4. After the final question in a round, a dialog appears letting the player either move on to the next difficulty level or restart the quiz from the beginning.
  5. After completing the Hard round, the app displays a completion message.

🔮 Potential Improvements

  • Add a countdown timer per question
  • Persist high scores locally (e.g. with shared_preferences)
  • Support multiple question types beyond True/False
  • Add category selection before starting a quiz
  • Improve error handling and offline/retry states for API calls
  • Add unit tests for QuizzBrain logic

📄 License

This project is licensed under the MIT License — feel free to use, modify, and distribute it.

🙋‍♂️ Author

Built by Joseph — feel free to connect or reach out with questions or feedback.