Last active
March 30, 2020 23:55
-
-
Save Ticore/fee1aa1af39cb8043157447993aa16bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
skinparam monochrome true | |
left to right direction | |
scale 0.8 | |
abstract Widget { | |
:: 描述 Element 設定 :: | |
== | |
+ Widget({Key key}) | |
.. | |
+ Key key | |
== | |
+ createElement() → Element | |
+ debugFillProperties(\n\ | |
DiagnosticPropertiesBuilder properties\n\ | |
) → void | |
+ toStringShort() → String | |
== Static == | |
+ canUpdate(\n\ | |
Widget oldWidget, Widget newWidget\n\ | |
) → bool | |
} | |
abstract StatelessWidget { | |
:: 無可變狀態 :: | |
== | |
+ StatelessWidget({Key key}) | |
== | |
+ **build(BuildContext context) → Widget** | |
+ createElement() → StatelessElement | |
== Implementers == | |
- AboutDialog | |
- AlertDialog | |
- Text | |
- Theme | |
- Title | |
- ... | |
} | |
abstract StatefulWidget { | |
:: 具有可變狀態 :: | |
== | |
+ StatefulWidget({Key key}) | |
.. | |
+ createElement() → StatefulElement | |
+ **createState() → State<StatefulWidget>** | |
== Implementers == | |
- AnimatedList | |
- AnimatedWidget | |
- AppBar | |
- CupertinoApp | |
- CupertinoButton | |
- ... | |
} | |
abstract ProxyWidget { | |
:: 可代理一個 Widget :: | |
== | |
+ ProxyWidget({Key key, @required Widget child}) | |
.. | |
+ child → Widget | |
} | |
abstract InheritedWidget { | |
:: 可往下傳播資訊 :: | |
== | |
+ InheritedWidget({Key key, Widget child}) | |
== | |
+ createElement() → InheritedElement | |
+ updateShouldNotify(\n\ | |
covariant InheritedWidget oldWidget\n\ | |
) → bool | |
== Implementers == | |
- Actions | |
- ButtonBarTheme | |
- ScrollConfiguration | |
- MediaQuery | |
- ... | |
} | |
abstract ParentDataWidget<T extends RenderObjectWidget> { | |
:: 可 hook ParentData 給下面的 RenderObjectWidget :: | |
== | |
+ ParentDataWidget({Key key, Widget child}) | |
== | |
+ applyParentData(RenderObject renderObject) → void | |
+ createElement() → ParentDataElement<T> | |
+ debugCanApplyOutOfTurn() → bool | |
+ debugDescribeInvalidAncestorChain({\n\ | |
String description,\n\ | |
DiagnosticsNode ownershipChain,\n\ | |
bool foundValidAncestor,\n\ | |
Iterable<Widget> badAncestors\n\ | |
}) → Iterable<DiagnosticsNode> | |
+ debugIsValidAncestor(RenderObjectWidget ancestor) → bool | |
== Implementers == | |
- Flexible | |
- KeepAlive | |
- LayoutId | |
- Positioned | |
- TableCell | |
} | |
abstract PreferredSizeWidget { | |
:: 如無限制,可指定 Widget 期望尺寸 :: | |
== | |
+ PreferredSizeWidget() | |
-- | |
+ preferredSize → Size | |
== Implementers == | |
- AppBar | |
- PreferredSize | |
- TabBar | |
- ... | |
} | |
abstract RenderObjectWidget { | |
:: 用來設定 RenderObjectElement :: | |
== | |
+ RenderObjectWidget({Key key}) | |
== | |
+ createElement() → RenderObjectElement | |
+ createRenderObject(BuildContext context) → RenderObject | |
+ didUnmountRenderObject(\n\ | |
covariant RenderObject renderObject\n\ | |
) → void | |
+ updateRenderObject(\n\ | |
BuildContext context,\n\ | |
covariant RenderObject renderObject\n\ | |
) → void | |
== Implementers == | |
- ConstrainedLayoutBuilder | |
- SingleChildRenderObjectWidget | |
- SliverWithKeepAliveWidget | |
- Table | |
- ... | |
} | |
abstract State<T extends StatefulWidget> { | |
+ State() | |
-- | |
+ context → BuildContext | |
+ mounted → bool | |
+ widget → T | |
== | |
+ **build(BuildContext context) → Widget** | |
+ deactivate() → void | |
+ debugFillProperties(\n\ | |
DiagnosticPropertiesBuilder properties\n\ | |
) → void | |
+ didChangeDependencies() → void | |
+ didUpdateWidget(covariant T oldWidget) → void | |
+ dispose() → void | |
+ **initState() → void** | |
+ reassemble() → void | |
+ **setState(VoidCallback fn) → void** | |
== Implementers == | |
- AnimatedListState | |
- DrawerControllerState | |
... | |
} | |
StatelessWidget --|> Widget | |
StatefulWidget --|> Widget | |
ProxyWidget --|> Widget | |
InheritedWidget --|> ProxyWidget | |
ParentDataWidget --|> ProxyWidget | |
PreferredSizeWidget --|> Widget | |
RenderObjectWidget --|> Widget | |
State "1" *--* "1" StatefulWidget | |
@enduml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment