Nop<C> class

当前共享对象的存储位置 page: 指定一个 虚拟 page,并不是所谓的页面,是一片区域; 在一个页面中可以有多个区域,每个区域单独管理,由shared指定是否共享; 在全局中有一个依赖链表,里面的对象都是共享的; 在查找过程中,会在当前 page 依赖添加一个引用,即使是从其他 page 依赖获取的; 如果没有 page,那么创建的对象只在特定的上下文共享

Inheritance

Constructors

Nop({Key? key, required Widget child, NopWidgetBuilder? builder, List<NopWidgetBuilder>? builders, C create(BuildContext context)?, List<Type> initTypes = const [], List<Type> initTypesUnique = const []})
const
Nop.page({Key? key, required Widget child, NopWidgetBuilder? builder, List<NopWidgetBuilder>? builders, List<Type> initTypes = const [], List<Type> initTypesUnique = const []})
page 共享域 shared == false, 也会共享 page 与 page 之间存在隔离
const
Nop.value({Key? key, C? value, required Widget child, NopWidgetBuilder? builder, List<NopWidgetBuilder>? builders, List<Type> initTypes = const [], List<Type> initTypesUnique = const []})
const

Properties

builder NopWidgetBuilder?
final
builders List<NopWidgetBuilder>?
final
child Widget
final
create → (C Function(BuildContext context)?)
final
hashCode int
The hash code for this object.
no setterinherited
initTypes List<Type>
final
initTypesUnique List<Type>
final
isPage bool
final
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
value → C?
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<Nop<C>>
Creates the mutable state for this widget at a given location in the tree.
override
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}) 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

Static Properties

print bool
getter/setter pair
stricted bool
stricted mode.
getter/setter pair

Static Methods

clear() → void
链表会自动管理生命周期
find<T>() → T?
findwithContext<T>(BuildContext context) → T?
maybeOf<T>(BuildContext context) → T?
of<T>(BuildContext context) → T