sensitive_content_analysis 0.0.4 sensitive_content_analysis: ^0.0.4 copied to clipboard
Dart package for interacting with Apple's Sensitive Content Analysis.
WIP! Sensitive Content Analysis #
Dart package for interacting with Apple's SensitiveContentAnalysis Framework.
Minimum requirements
iOS/iPadOS >=17.0+
Usage #
Analyze File Image:
try {
final sca = SensitiveContentAnalysis.instance;
final ImagePicker picker = ImagePicker();
// Pick an image.
final XFile? image = await picker.pickImage(source: ImageSource.gallery);
if (image != null) {
Uint8List imageData = await image.readAsBytes();
// Analyze the image for sensitive content.
final bool? isSensitive = await sca.analyzeImage(imageData);
if (isSensitive != null) {
return isSensitive;
}else {
debugPrint("Enable ”Sensitive Content Warning” in Settings -> Privacy & Security.");
}
} catch (e) {
return false;
}
}
Analyze Network Image:
- todo
Analyze Video:
- todo
Notice: This package was initally created to be used in-house, as such the development is first and foremost aligned with the internal requirements.