startCamera method
Starts the camera with the specified configuration.
Implementation
@override
Future<int?> startCamera({
double quality = 1.0,
String facing = 'back',
String aspectRatio = '3:4',
}) async {
try {
return await _channel.invokeMethod<int>('startCamera', {
'quality': quality,
'facing': facing,
'frontCamera': facing == 'front',
'aspectRatio': aspectRatio,
});
} on PlatformException catch (e) {
throw PlatformException(
code: e.code,
message: 'macOS camera error: ${e.message}',
details: e.details,
);
}
}