getExternalAnnotation method
get external annotation object.
Parameter annotationId
Annotation ID. Max length is 128 bytes
Returns
- non-null: a pointer to the external annotation object
- others: Failure
Note
- Annotation ID must start with "pano-annotation-ext-".
- When call this interface with annotationId not set before, AnnotationManager will create new annotation internal.
获取外部标注对象
Parameter annotationId
标注ID。最大长度128字节
Returns
- 非空指针: 指向外部标注对象的指针。
- 空指针: 失败
Note
- 标注ID必须以"pano-annotation-ext-"作为前缀。
- 当传入的annotationId之前没被设置过,AnnotationManager会生成新的标注对象
Implementation
@override
Future<RtcAnnotation?> getExternalAnnotation(String annotationId) async {
var annoId = await _invokeMethod(
'getExternalAnnotation', {'annotationId': annotationId}) as String;
if (annoId.isNotEmpty) {
annotations[annoId] ??= RtcAnnotation(annoId);
return annotations[annoId];
}
return null;
}