getEnumDeclaration method

Future<EnumDeclaration?> getEnumDeclaration(
  1. EnumFragment fragment
)
inherited

Returns the class declaration for the given fragment, or null if there is no such class.

Implementation

Future<EnumDeclaration?> getEnumDeclaration(EnumFragment fragment) async {
  var result = await sessionHelper.getFragmentDeclaration(fragment);
  var node = result?.node;
  if (node is EnumDeclaration) {
    return node;
  }
  return null;
}