defaultLinkActionPickerDelegate function

Future<LinkMenuAction> defaultLinkActionPickerDelegate(
  1. BuildContext context,
  2. String link,
  3. Node node
)

Implementation

Future<LinkMenuAction> defaultLinkActionPickerDelegate(
    BuildContext context, String link, Node node) async {
  switch (defaultTargetPlatform) {
    case TargetPlatform.iOS:
      return _showCupertinoLinkMenu(context, link);
    case TargetPlatform.android:
      return _showMaterialMenu(context, link);
    default:
      assert(
          false,
          'defaultShowLinkActionsMenu not supposed to '
          'be invoked for $defaultTargetPlatform');
      return LinkMenuAction.none;
  }
}