BlueConicNativeResult.fromNative constructor
BlueConicNativeResult.fromNative(
- dynamic nativeResult
Parses the native response format: success, data, error
Implementation
factory BlueConicNativeResult.fromNative(dynamic nativeResult) {
if (nativeResult is List && nativeResult.length >= 3) {
return BlueConicNativeResult._(
success: nativeResult[0] as bool? ?? false,
data: nativeResult[1],
error: nativeResult[2] as String?,
);
}
// Fallback for unexpected format
return BlueConicNativeResult._(
success: false,
error: 'Unexpected native response format: $nativeResult',
);
}