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.
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.
- 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
| Category | Technology |
|---|---|
| Framework | Flutter |
| Language | Dart |
| Networking | http package |
| Alerts / Dialogs | rflutter_alert |
| Data Source | Open Trivia Database API |
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
- Flutter SDK (compatible with Dart SDK
^3.12.2) - An emulator, simulator, or physical device to run the app
-
Clone the repository
git clone https://github.com/YoucefMebAmaneEllahGherbal/quizzler.git cd quizzler -
Install dependencies
flutter pub get
-
Run the app
flutter run
- On launch, the app fetches 10 Easy-difficulty True/False questions from the Open Trivia DB API.
- The player answers each question by tapping True or False.
- Each answer is checked against the correct answer, updating the score and appending an icon to the answer-history row.
- 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.
- After completing the Hard round, the app displays a completion message.
- 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
QuizzBrainlogic
This project is licensed under the MIT License — feel free to use, modify, and distribute it.
Built by Joseph — feel free to connect or reach out with questions or feedback.