redactFile method
Future<String>
redactFile({
- required String inputPath,
- required List<
Map< detections,String, Object?> > - required String mode,
- required double intensity,
- String? outputPath,
override
Redact an image file on disk. outputPath when null writes to a sibling
temporary file. Returns the on-disk path of the redacted output. Default
throws.
Implementation
@override
Future<String> redactFile({
required String inputPath,
required List<Map<String, Object?>> detections,
required String mode,
required double intensity,
String? outputPath,
}) async {
final result = await _methodChannel.invokeMethod<String>(
'redactFile',
{
'inputPath': inputPath,
'detections': detections,
'mode': mode,
'intensity': intensity,
if (outputPath != null) 'outputPath': outputPath,
},
);
if (result == null || result.isEmpty) {
throw StateError('redactFile returned no output path');
}
return result;
}