IWidgetModel class abstract interface

A basic interface for every WidgetModel.

The general approach for the WidgetModel is implement interface that expanded from IWidgetModel. This expanded interface describes the contract which the inheritor of the WidgetModel implemented this interface is providing for the ElementaryWidget. The contract includes all properties and methods which the ElementaryWidget can use for build a part of the tree it describes.

{@tool snippet}

The following is a an example for the top-level factory function that get dependencies using passed BuildContext.

abstract interface class IExampleWidgetModel implements IWidgetModel {
  ListenableState<int> get somePublisher;
  Stream<String> get anotherPublisher;
  Color get justProperty;

  Future<void> doSomething();
  Future<void> anotherOptionOfInteract();
}

{@end-tool}

Implementers

Constructors

IWidgetModel()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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