Search code examples
flutterdartide

How to check the subclasses of an abstract class from the IDE


During coding, the hint shows us what type the property takes, for example: enter image description here

This makes coding faster, but what if property takes subclasses of the abstract class given in the hint, example: enter image description here

How to check from the IDE (VS Code) what subclasses can be used?


Solution

  • The Best way that I use it is:

    Using Android Studio (In VScode I think there is no way to do this since it is text editor not an IDE)

    Hold ctrl (command on MAC), and click on the Class(Widget), which will take you to where the widget is defined.

    then, near line numbers, you can find this icon shown in the image below, when click on it you will be able to see all available sub-classes.
    enter image description here