configure method

  1. @override
Future<bool?> configure({
  1. required String key,
  2. SmKitPoseModelChoice poseModelChoice = SmKitPoseModelChoice.adaptiveChoice,
  3. bool includesHighlights = false,
  4. void onHandle(
    1. SMKitStatus
    )?,
})
override

Implementation

@override
Future<bool?> configure({
  required String key,
  SmKitPoseModelChoice poseModelChoice = SmKitPoseModelChoice.adaptiveChoice,
  bool includesHighlights = false,
  void Function(SMKitStatus)? onHandle,
}) async {
  final arg = {
    'apiPublicKey': key,
    'poseModelChoice': poseModelChoice.nativeValue,
    'includesHighlights': includesHighlights,
  };
  bool? res = false;
  try {
    return await methodChannel.invokeMethod<bool?>('configure', arg);
  } on PlatformException catch (e) {
    debugPrint('PlatformException: ${e.code} ${e.message}');
  }
  return res;
}