Skip to content

Instantly share code, notes, and snippets.

@bdshadow
Created March 25, 2019 09:36
Show Gist options
  • Save bdshadow/6be6f96ff8618ddae832aa8ef5eb1a1d to your computer and use it in GitHub Desktop.
Save bdshadow/6be6f96ff8618ddae832aa8ef5eb1a1d to your computer and use it in GitHub Desktop.
Retrieve DartType
DartReturnType returnType = PsiTreeUtil.getChildOfType(component, DartReturnType.class);
DartType dartType = PsiTreeUtil.getChildOfType(component, DartType.class);
String typeText = returnType == null ? DartPresentableUtil.buildTypeText(component, dartType, null) : DartPresentableUtil.buildTypeText(component, returnType, null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment