initialize method

  1. @override
Future<void> initialize(
  1. HumanDetectionOptions options
)
override

Initialize the human detection model.

Implementation

@override
Future<void> initialize(HumanDetectionOptions options) async {
  try {
    await methodChannel.invokeMethod<void>('initialize', options.toMap());
  } on PlatformException catch (e) {
    throw HumanDetectionException(
      e.message ?? 'Failed to initialize human detection',
      code: HumanDetectionErrorCode.initializationFailed,
      details: e.details,
    );
  }
}