getClassDeclaration method

Future<ClassDeclaration?> getClassDeclaration(
  1. ClassFragment fragment
)
inherited

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

Implementation

Future<ClassDeclaration?> getClassDeclaration(ClassFragment fragment) async {
  var result = await sessionHelper.getFragmentDeclaration(fragment);
  var node = result?.node;
  if (node is ClassDeclaration) {
    return node;
  }
  return null;
}