MPSBuilder<T> class
MPSBuilder allows you to subscribe to multiple MinPubSub topics.
GraphX has a global mts
object that you can use to easily publish data or events to topics.
This widget listens to the topics list and rebuilds when an event is dispatched in any of them.
You can publish without parameters (ems.emit(topic)
) or with a single parameter ems.emit1(topic, value)
.
Experimental! "MPS" is discouraged to use in GraphX. Use ValueNotifier or other Listenable objects instead to create the communication.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MPSBuilder
Constructors
-
MPSBuilder({Key? key, required MPSFunctionBuilder<
T> builder, required List<String> topics, required MPS mps, Widget? child}) -
Creates a new MPSBuilder instance.
const
Properties
-
builder
→ MPSFunctionBuilder<
T> -
The builder function to build the widget tree.
final
- child → Widget?
-
The optional child widget to be included in the builder.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- mps → MPS
-
The MPS object instance to be used for subscription.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
topics
→ List<
String> -
The list of topics to be subscribed to.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _MPSBuilderState< T> -
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