MyDoc class

나의 문서가 변하면 위젯을 re-build 한다.

주의, 이 위젯은 로그인한 사용자의 문서 /users/<uid> 를 listen 하지 않는다. 정확히는 UserService.instance.changes 를 listen 한다.

즉, DB 업데이트가 있으면 listener 에 의해서 UserService.instance.user 가 업데이트 되고, UserService.instance.changes 이벤트가 발생한다.

사용자 로그인을 하지 않았거나, 로그인 중이거나, 사용자 문서가 존재하지 않으면, builder 파라메타로 전달되는 House User 는 null 이 될 수 있다.

사용자가 로그 아웃이나 계정을 변경하는 경우, UserService.instance.user 가 변하고, UserService.instance.changes 이벤트가 발생하여 잘 동작한다.

initialDataUserService.instance.changes 를 사용하여, 깜빡거림이 없도록 한다.

Inheritance

Constructors

MyDoc({Key? key, required Widget builder(User?)})
const

Properties

builder Widget Function(User?)
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited