This Flutter Network Repository is a template designed to simplify the setup of network handling in your Flutter applications. It provides a robust and reusable network module that integrates Dio for HTTP requests, along with comprehensive error handling and retry mechanisms. This setup allows developers to focus on building features rather than getting bogged down in network configuration.
- Automatic Error Handling: Centralized error management for API responses.
- Network Repository: Real-time connectivity checks to handle network status changes effectively.
- Retries and Network interceptors: Configurable retry mechanism for failed requests, ensuring resilience in network communication.
- Dio Client Setup: Pre-configured Dio client with base options.
- Network Monitoring: Real-time connectivity checks to handle network status changes effectively.
To use this template in your Flutter project, follow these steps:
-
Clone the repository:
git clone https://github.com/as3hr/Flutter-Network-Repository.git cd Flutter-Network-Repository
-
Install dependencies: Ensure you have Flutter and Dart installed, then run:
flutter pub get
-
Integrate the network module: Import the network module into your Flutter app and use the provided classes and methods to handle network requests.
Contributions are welcome! If you have suggestions or improvements, please open an issue or submit a pull request.