UIAsyncContent class

An asynchronous content.

Available Extensions

Constructors

UIAsyncContent.future(Future contentFuture, dynamic loadingContent, {dynamic errorContent, Duration? refreshInterval, Map<String, dynamic>? properties})
Constructs an UIAsyncContent using contentFuture (Future<dynamic>), that returns the content.
UIAsyncContent.provider(AsyncContentProvider? _asyncContentProvider, dynamic loadingContent, {dynamic errorContent, Duration? refreshInterval, Map<String, dynamic>? properties})
Constructs an UIAsyncContent using _asyncContentProvider (Function), that returns the content.

Properties

content → dynamic
Returns the already loaded content.
no setter
elapsedLoadTime int
Returns in milliseconds the amount of elapsed time since last load.
no setter
error → dynamic
The error instance when loaded with error.
no setter
errorContent → dynamic
no setter
hasAutoRefresh bool
Returns true if has a _refreshInterval.
no setter
hashCode int
The hash code for this object.
no setterinherited
isExpired bool
Returns true if this content is expired (elapsedLoadTime > _refreshInterval).
no setter
isLoaded bool
Returns true if the content is loaded.
no setter
isOK bool
Returns true if the content is loaded and OK.
no setter
isWithError bool
Returns true if the content is loaded and with error.
no setter
loadCount int
Returns the number of loads performed for this asynchronous content.
no setter
loadingContent → dynamic
no setter
loadTime DateTime?
Returns the DateTime of last load.
no setter
locale String?
no setter
maxIgnoredRefreshCount int
getter/setter pair
onLoadContent EventStream
final
parentUIComponent UIComponent?
getter/setter pair
properties Map<String, dynamic>
no setter
refreshInterval Duration?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stopped bool
no setter

Methods

equalsCurrentLocale() bool
equalsLocale(String locale) bool
equalsProperties(Map<String, dynamic>? properties) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refresh() → void
Refresh this content.
refreshAsync() → void
Calls refresh asynchronously.
reset([bool refresh = true]) → void
Resets the component.
stop() → void
Stops any attempt to load this content.
toString() String
A string representation of this object.
override

Operators

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

Static Methods

isNotValid(UIAsyncContent asyncContent, [Map<String, dynamic>? properties]) bool
isNotValidLocale(UIAsyncContent asyncContent) bool
isValid(UIAsyncContent? asyncContent, [Map<String, dynamic>? properties]) bool
isValidLocale(UIAsyncContent? asyncContent) bool