showAnchoredHelper method
This shows an AnchoredHelper above your page as overlay
requires anchorKeyId
that must have been generated within a widget using
HelperOrchestrator.of(context).generateKey('myKeyId')
Implementation
Future showAnchoredHelper(
String anchorKeyId,
AnchoredHelper helper, {
HelperAlignment? align,
}) async {
try {
//final key = getAnchorKey(anchorKeyId) as ValueKey<String>;
final anchor = await findAnchor(anchorKeyId, align: align);
if (anchor == null) {
debugPrint("anchor cannot be found. show anchored failed");
return;
}
_overlayHelper.showHelper(
context,
(context) => AnchorHelperWrapper(
anchor: anchor,
child: helper,
),
);
} catch (e) {
debugPrint("show anchored helper failed: $e");
}
}