GitHub Repository for Flutter Random Game Project
This Flutter project is a simple quiz game where users are challenged to guess a random number within a specified time limit. The game includes features such as a countdown timer, display cards for information, and buttons for starting, attempting, and resetting the game.
- Developer: Amanullah Bahram
![](https://private-user-images.githubusercontent.com/41961773/302048456-069c63f6-15b6-4374-af46-cc1e9e9f6fed.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI1ODM1MzcsIm5iZiI6MTcyMjU4MzIzNywicGF0aCI6Ii80MTk2MTc3My8zMDIwNDg0NTYtMDY5YzYzZjYtMTViNi00Mzc0LWFmNDYtY2MxZTllOWY2ZmVkLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODAyVDA3MjAzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEyZjQ1M2M2ODI0Nzg3ZTRmZmYxNDE4NWFmOWVmOTdjNjE3ODA5ZWYyNzg2N2JkNmM3MDRkNzM1ODYyMzZlNDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Fd4zrSpFkee-G3eoCyiC6JtuNaBq57zrjZm5HqeSccc)
The project is organized into multiple Dart files to enhance modularity and readability:
-
main.dart: The entry point of the application, defining the main
MyApp
widget. -
home.dart: Contains the
HomePage
widget, which serves as the main screen of the quiz game. It includes various components like display cards, circular timer, and custom buttons. -
displayCard.dart: Defines the
DisplayCard
widget, responsible for displaying information in a card format. The card type determines the card's appearance. -
customButton.dart: Implements the
CustomStartButton
widget, creating a custom-styled button with a specified title and onPressed function. -
circularTimer.dart: Provides the
CircularTimer
widget, utilizing thecircular_countdown_timer
package to display a circular countdown timer. -
GameModel.dart: Represents the game's data model, extending
ChangeNotifier
for state management. It includes methods for resetting, starting, and checking results, as well as a timer for tracking game duration. -
GameController.dart: Manages the game's logic, utilizing the
GameModel
for data manipulation. It includes methods for resetting the game, starting the game, checking results, and handling timeouts. -
pubspec.yaml: Specifies project details, dependencies, and version information.
To run this Flutter project locally, follow these steps:
-
Ensure you have Flutter and Dart installed on your machine.
-
Clone the repository:
git clone [repository_link]
-
Navigate to the project directory:
cd random_quiz
-
Run the project using Flutter:
flutter run
- Make sure to check the pubspec.yaml file for project dependencies.
- Feel free to explore and customize the code according to your preferences.
If you have any feedback or suggestions, feel free to open an issue or submit a pull request. Contributions are always welcome!
This project is licensed under the MIT License. See the LICENSE file for more details.