1, The inheritance of Flutter Object

The inheritance diagram is the latest inheritance diagram of flutter2.2.

Video explanation address

Video explanation address

2, Flutter Widget component inheritance diagram

Diagram of Flutter relationship inheritance. Xmind

WidgetThere are five subclasses,PreferredSizeWidgetThere are six components in total,ProxyWidgetThere are 47 components in total,RenderObjectWidgetThere are 94 components in total,StateFulWidgetThere are 167 components in total,StatelessWidgetThere are a total of 108 components, plus its own five components, so there are a total of 427 components. This is probably one of the reasons why many people find Flutter difficult to learn.
  • PreferredSizeWidget: Mainly used forAppBarTabBarBy inheriting this class, you can achieve a custom size.
  • ProxyWidget: is an abstract class that is mainly used to provide childrenWidgetThe abstractWidget
  • RenderObjectWidget: is an abstract class,RenderObjectWidgetsRenderObjectElementsProvide the configuration it packsRenderObjectsTo provide the actual rendering of the application.
  • StateFulWidget: having a mutable stateWidget
  • StatelessWidget: does not require mutable stateWidget

3,PreferredSizeWidget

4,ProxyWidget

5,RenderObjectWidget

6,StateFulWidget

7, StatelessWidget