Skip to content

akankshacore/TriviaX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 TriviaX – Flutter Quiz App

TriviaX ✨

A beautifully designed Flutter Quiz App powered by Riverpod and the Trivia API
Clean UI • Custom Quiz Builder • Dark Mode • Confetti Results

Flutter Riverpod API Status


📱 App Preview


🚀 Features

🎮 Quiz Modes

• API-based quiz (Easy / Medium / Hard) • Custom Admin-created quiz • 10 questions per quiz

🛠 Admin Panel

• Create 4-option MCQ questions • Mark correct answers • Edit questions • Delete questions • Auto-limit to 10 questions • Completion dialog when quiz is ready

🎯 Gameplay

• ❤️ 3 Lives system • Skip question with score penalty • Back & Next navigation • Instant green/red answer feedback • Automatic score calculation

🎨 UI Features

• Professional gradient theme • Dark & Light mode toggle • Smooth card animations • Clean Material 3 UI • Confetti celebration on results • Fully responsive layout


🧠 App Architecture

flowchart LR
A[User Opens App] --> B[Splash Screen]
B --> C[Welcome Screen]
C --> D{Select Mode}

D -->|API Quiz| E[Fetch Questions from Trivia API]
D -->|Custom Quiz| F[Load Admin Questions]

E --> G[Play Quiz Screen]
F --> G

G --> H[Answer Questions]
H --> I[Calculate Score]
I --> J[Result Screen]
J --> K[Confetti Celebration]
Loading

📊 Quiz Gameplay Flow

flowchart TD
A[Start Quiz] --> B[Load Questions]
B --> C[Display Question]
C --> D{User Answer}

D -->|Correct| E[Increase Score]
D -->|Wrong| F[Lose Life]

E --> G[Next Question]
F --> G

G --> H{Questions Left?}

H -->|Yes| C
H -->|No| I[Show Result Screen]
Loading

⚙️ State Management Flow

flowchart LR
A[UI Widgets] --> B[Riverpod Providers]
B --> C[Quiz State]
C --> D[Question Controller]
D --> E[API / Local Quiz Data]
E --> C
Loading

🧠 Tech Stack

Technology Purpose
Flutter UI Framework
Riverpod State Management
GetX Navigation + Theme
HTTP API Requests
Lottie Splash Animation
Confetti Result Celebration

🌐 Trivia API

Questions are fetched from:

https://the-trivia-api.com/api/questions?limit=10&difficulty=easy

Supported difficulty levels:

• easy • medium • hard


🏗 Project Structure

lib/
 ├── main.dart
 ├── splash_screen.dart
 ├── welcome_screen.dart
 ├── create_quiz_screen.dart
 ├── play_quiz_screen.dart
 ├── result_screen.dart

🔥 Why TriviaX Is Unique

✔ Dual quiz system (API + Custom) ✔ Admin quiz builder ✔ Lives-based gameplay system ✔ Skip penalty feature ✔ Beautiful Flutter UI ✔ Dark mode support ✔ Confetti celebration ✔ Structured Flutter architecture

This is not a simple quiz app — It is a well-structured Flutter project demonstrating real-world app architecture.


🚀 How to Run

Clone the repository

git clone https://github.com/akankshacore/TriviaX.git

Navigate to project folder

cd TriviaX

Install dependencies

flutter pub get

Run the app

flutter run

👩‍💻 Developed By

Akanksha

About

TriviaX is a modern Flutter quiz app powered by Riverpod and Trivia API, featuring difficulty-based quizzes, a custom admin quiz builder, life-based gameplay, dark mode, and a premium Material 3 UI experience.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors