InternalIocInheritedWidget<T> class

An InheritedWidget that holds a dependency of type T for the IoC system.

This widget is used internally by IocWidget to provide dependencies to the widget tree.

Inheritance

Constructors

InternalIocInheritedWidget({required T factory(BuildContext context), required Widget child, required _IocWidgetState<T> state, bool isLazySingleton = false, void dispose()?, Key? key})

Properties

child Widget
The widget below this widget in the tree.
finalinherited
dispose → void Function()?
Optional dispose callback for cleaning up the dependency.
final
factory → T Function(BuildContext context)
The factory function to create the dependency.
final
hashCode int
The hash code for this object.
no setterinherited
isLazySingleton bool
Whether the dependency should be a lazy singleton.
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
state → _IocWidgetState<T>
The widget state that is holding the value/factory of the dependency.
final

Methods

createElement() InheritedElement
Inflates this configuration to a concrete instance.
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
get(BuildContext context) → T
Returns the dependency instance, creating it if necessary.
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
updateShouldNotify(covariant InternalIocInheritedWidget<T> old) bool
Whether the framework should notify widgets that inherit from this widget.
override

Operators

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