Tile<TState> class abstract

Represents a single tile.

Tiles are contained inside TileService.

Tiles are expected to be immutable and stateless. When a Tile is requested, a new instance of the entire app will be created and destroyed right after.

As of writing this doc, the state of the tile is passed around by serializing it to json. If the ClickableActions.setState is planned on being used, supply a Tile.fromJson function, and implement toJson method as well.

Constructors

Tile({TState fromJson(Map<String, dynamic>)?})
const

Properties

freshness TileFreshness
The freshness of the tile. See TileFreshness for more information.
no setter
fromJson → TState Function(Map<String, dynamic>)?
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(TileContext context, TState? state) TileWidget
Builds the tile.
createState() Future<TState?>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resources(TileContext context, TState? state) Map<String, TileResourceProvider>
Provides resources for the tile.
toString() String
A string representation of this object.
inherited

Operators

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