A modern quiz application built with Flutter and Spring Boot, featuring a clean UI and real-time question management.
- Interactive Quiz Interface: Clean and intuitive UI for answering questions
- Real-time Question Management: Questions are fetched from a Spring Boot backend
- Score Tracking: Keeps track of correct and incorrect answers
- Progress Tracking: Shows current question number and total questions
- Immediate Feedback: Visual feedback for correct/incorrect answers
- Responsive Design: Works across different screen sizes
- Flutter: For building the cross-platform mobile application
- Provider: For state management
- HTTP: For API communication with the backend
- Spring Boot: For serving quiz questions and managing the backend
- REST API: For communication between frontend and backend
lib/
├── main.dart # Application entry point
├── model/ # Data models
├── provider/ # State management
│ └── quiz_controller.dart
├── screens/ # UI screens
│ ├── quiz_page.dart
│ └── result_page.dart
└── widget/ # Reusable widgets
- Flutter SDK
- Dart SDK
- Java Development Kit (JDK)
- Spring Boot
- Android Studio / VS Code
- Clone the repository:
git clone [repository-url]- Install Flutter dependencies:
flutter pub get- Start the Spring Boot backend:
cd backend
./mvnw spring-boot:run- Run the Flutter application:
flutter run- Launch the application
- Questions will be automatically fetched from the backend
- Select your answer by tapping on one of the options
- The app will show whether your answer was correct (green) or incorrect (red)
- Tap "Next" to proceed to the next question
- View your final score on the results page
GET /quiz: Fetches all quiz questions- Response format:
[
{
"question": "Sample question?",
"option1": "Option 1",
"option2": "Option 2",
"option3": "Option 3",
"correctAnswer": "Option 1"
}
]The app uses Provider for state management with the following key states:
- Questions list
- Current question index
- Score (correct/wrong answers)
- Answer status
- Selected answer
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Flutter team for the amazing framework
- Spring Boot team for the robust backend framework
- Provider package for state management