data/network/network library

Network Services

Centralized network layer for RunAnywhere Flutter SDK. Uses the http package for HTTP requests.

Matches React Native SDK network layer structure.

Classes

APIClient
Production API client for backend operations.
AuthenticationResponse
Response model for authentication.
AuthTokenProvider
Protocol for providing authentication tokens. Implemented by AuthenticationService.
DevModeConfig
Development (Supabase) Configuration
HTTPService
HTTP Service - Core network implementation using dart:http
HTTPServiceConfig
HTTP Service Configuration
NetworkConfig
Network configuration options for SDK initialization
NetworkService
Protocol defining the network service interface.
SupabaseNetworkConfig
Supabase network configuration
TelemetryEvent
Telemetry event model
TelemetryService
TelemetryService - Event tracking for RunAnywhere SDK

Enums

APIEndpoint
API endpoints matching iOS APIEndpoint.swift exactly.
TelemetryCategory
Telemetry event categories (matches C++/Swift/React Native categories)

Functions

createNetworkConfig({required String apiKey, String? baseURL, String? environmentStr, SDKEnvironment? environment, String? supabaseURL, String? supabaseKey, int? timeoutMs}) NetworkConfig
Create network configuration from SDK init options
getEnvironmentName(SDKEnvironment env) String
Get environment name string
isDevelopment(SDKEnvironment env) bool
Check if environment is development
isProduction(SDKEnvironment env) bool
Check if environment is production
isStaging(SDKEnvironment env) bool
Check if environment is staging

Typedefs

RefreshTokenResponse = AuthenticationResponse
Response model for token refresh (same as AuthenticationResponse). Matches iOS RefreshTokenResponse typealias.