core/network — HTTP Networking
CommunityRobust Dio client and connectivity guard
AuthorVantoan252003
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Provides a consistent, production-ready HTTP networking foundation for Flutter apps so API calls are authenticated, reliable, and resilient to connectivity issues.
Core Features & Use Cases
- ApiClientFactory: central factory to create a fully-configured Dio client with base options and ordered interceptors.
- NetworkInfo: connectivity abstraction over connectivity_plus to check online status and stream connectivity changes.
- Interceptors: Auth interceptor with token refresh queuing, Error interceptor mapping Dio errors to typed app exceptions, and conditional Logging interceptor for debug builds.
- Use Case: Integrate into the DataSource layer to ensure all API calls include auth, handle 401 refresh flow safely, map network/server errors to app-level exceptions, and avoid requests when offline.
Quick Start
Initialize the network stack by calling ApiClientFactory.create with your baseUrl and a FlutterSecureStorage instance to obtain the Dio client for dependency injection.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: core/network — HTTP Networking Download link: https://github.com/Vantoan252003/Mozi/archive/main.zip#core-network-http-networking Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.