A Flutter application for remotely controlling color-based target shooting and playing games like Tic Tac Toe through a backend server.
- Hit Target Game: Control color-based target shooting with red, blue, and yellow targets
- Tic Tac Toe Game: Play Tic Tac Toe through the remote server
- Server Management: Start and stop games from the application
- Dynamic Configuration: Update server URL for flexible deployment
- Flutter SDK (version ^3.7.0)
- Dart SDK
- Android Studio / VS Code with Flutter extensions
- A compatible backend server (Python-based target control server)
-
Clone the repository:
git clone https://github.com/yourusername/zengbary.git cd zengbary -
Install dependencies:
flutter pub get
-
Run the application:
flutter run
The application uses Dio for HTTP requests with the following features:
- 7-second timeout for all API connections
- Comprehensive error handling for various network scenarios
- JSON-based communication with the server
/start- Activates the server/stop- Stops the server/color- Fires a specific color (red, blue, or yellow)/changeGame?game=xo- Changes to Tic Tac Toe game/changeGame?game=idle- Returns to idle state
The application follows a clean architecture with:
- Separation of UI and business logic
- Dedicated HTTP client with proper error handling
- Responsive UI design that works on multiple device sizes
- Start the application and navigate to "Hit Target" from the home screen
- Enter your server's base URL in the input field
- Click "Activate" to start the server
- Select a color (red, blue, or yellow)
- Press the "Shoot" button to fire at the target
- Click "Stop" when finished
- Navigate to "Tic Tac Toe" from the home screen
- Click "Activate" to start the game
- Play according to the server's implementation
- Click "Stop" when finished
If you encounter connection issues:
- Verify the server URL is correct
- Ensure the server is running
- Check your network connection
- Review the error messages displayed in the UI
This project is licensed under the MIT License - see the LICENSE file for details.
- Iconsax for the icon pack
- Flutter and Dart teams for the amazing framework