getAllActions method

Future<List<HoverAction>> getAllActions()

Retrieve a list of available actions.

Implementation

Future<List<HoverAction>> getAllActions() async {
  try {
    final result = await _methodChannel.invokeListMethod("getAllActions");
    if (result != null) {
      List<HoverAction> actions = result
          .map((item) => HoverAction.fromMap(item.cast<String, dynamic>()))
          .toList();
      return actions;
    } else {
      return [];
    }
  } catch (e) {
    print('Error retrieving actions: $e');
    return [];
  }
}