pottery library

Classes

LocalPottery
A widget that associates existing Pots with new values and makes them accessible from descendants in the tree via the pots.
Pot<T>
A class that instantiates and caches an object of type T until it is removed.
PotDescription
A class that describes the details of a Pot.
PotEvent
A class that represents an event related to Pot.
PotOverride<T>
The signature of the pair of a pot and its factory used for LocalPottery.
PotReplacement<T>
The signature of the pair of a replaceable pot and its new factory used for Pottery.
Pottery
A widget that controls the availability of particular Pots according to the widget lifecycle.
ReplaceablePot<T>
A variant of Pot with the replace method that allows its factory to be replaced.

Enums

PotEventKind
The types of events that can occur in relation to Pot.

Extensions

NearestLocalPotObjectOf on Pot<T>
An extension on Pot to integrate with LocalPottery.
PotExtensionForLocalPottery on Pot<T>
Extension on Pot, used for LocalPottery.
PotExtensionForPottery on ReplaceablePot<T>
Extension on ReplaceablePot, used for Pottery.

Typedefs

LocalPotteryObjects = Map<Pot<Object?>, Object?>
The signature of a map consisting of pots and the objects they hold.
PotDisposer<T> = void Function(T)
The signature of a callback that receives an object of type T to clean up resources associated with it.
PotListenerRemover = Future<void> Function()
The signature of a function that removes the listener added by listen().
PotObjectFactory<T> = T Function()
The signature of a Singleton factory that creates and returns an object of type T.

Exceptions / Errors

LocalPotteryNotFoundException
The error that is thrown when of is called but no surrounding LocalPottery ancestor provides a localized value for the pot.
PotNotReadyException
Exception thrown if a pot with no factory is used.