initialize method
- SegmenterConfig config = const SegmenterConfig()
override
Initialize the segmenter with optional configuration.
This may download models, allocate GPU resources, etc. Returns a Future that completes when ready.
Implementation
@override
Future<void> initialize([
SegmenterConfig config = const SegmenterConfig(),
]) async {
if (!_warningShown && kDebugMode) {
debugPrint(
'⚠️ StubSegmenter: Virtual backgrounds not supported on this platform.\n'
' Supported platforms: Android, iOS (with google_mlkit_selfie_segmentation)',
);
_warningShown = true;
}
_isReady = true;
}