BackgroundRemovalService class

On-device background removal using native_cutout.

Android uses Google ML Kit Subject Segmentation. iOS uses Vision and needs iOS 17+ on a real device. Output is always a transparent PNG.

Constructors

BackgroundRemovalService()
const

Properties

downloadProgress Stream<ModelDownloadProgress>
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearCache() Future<bool>
clearModel() Future<bool>
downloadModel() Future<bool>
isModelAvailable() Future<bool>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeBackground(String imagePath, {bool cropToSubject = true}) Future<String>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited