ResourceContent class
Represents a Resource Content
Constructors
- ResourceContent(Resource? resource, [String? _content])
Properties
- hasContent → bool
-
Returns
trueif has content/body.no setter - hashCode → int
-
The hash code for this object.
no setteroverride
- isLoaded → bool
-
Returns
trueif loaded.no setter - isLoadedWithError → bool
-
Returns
trueif loaded with error.no setter -
onLoad
→ EventStream<
String?> -
Notifies events when load is completed.
final
- resource → Resource?
-
The resource (with Uri).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uri → Uri?
-
The
Resource.uri.no setter - uriFileExtension → String?
-
Returns uri file extension.
no setter
- uriMimeType → MimeType?
-
Returns a MimeType based into the uri file name extension.
no setter
-
uriResolved
→ Future<
Uri?> -
Return resolved Uri from
Resource.uriResolved.no setter
Methods
-
getContent(
) → Future< String?> - Returns the content after resolve it.
-
getContentIfLoaded(
) → String? - Returns the content if isLoaded.
-
load(
) → Future< void> - Triggers content load.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Reset and disposes any loaded content.
-
resolveURL(
String url) → Future< Uri?> -
Resolves
urlusing this ResourceContent as reference (base Uri). -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Properties
- patternUrlInit → RegExp
-
final
Static Methods
-
from(
Object? rsc) → ResourceContent? -
fromResolvedUrl(
String? url, {String? baseURL, String? content}) → ResourceContent? -
Resolved
urlbefore instantiate fromURI. -
fromURI(
Object? uri, [String? content]) → ResourceContent? -
Constructor with
Resourcefromuri. -
resolveURLFromReference(
ResourceContent? reference, String? url) → Future< Uri?> -
Resolves an
urlusing another ResourceContent asreference(base Uri).