performRequest method
Implementation
@override
Future<FittorResponse> performRequest(FittorRequest request) async {
final stopwatch = Stopwatch()..start();
try {
// Use WASM if available and enabled
if (_wasmBridge != null && _wasmBridge.isInitialized) {
return await _performWasmRequest(request, stopwatch);
}
// Fallback to platform-specific implementation
return await _performPlatformRequest(request, stopwatch);
} catch (e, stackTrace) {
stopwatch.stop();
if (e is FittorException) {
rethrow;
} else {
throw FittorNetworkException('Request failed: $e', e, stackTrace);
}
}
}