ResourceContent class
Represents a Resource Content
Constructors
- ResourceContent(Resource? resource, [String? _content])
Properties
- hasContent → bool
-
Returns
true
if has content/body.no setter - hashCode → int
-
The hash code for this object.
no setteroverride
- isLoaded → bool
-
Returns
true
if loaded.no setter - isLoadedWithError → bool
-
Returns
true
if 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
url
using 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
url
before instantiate fromURI. -
fromURI(
Object? uri, [String? content]) → ResourceContent? -
Constructor with
Resource
fromuri
. -
resolveURLFromReference(
ResourceContent? reference, String? url) → Future< Uri?> -
Resolves an
url
using another ResourceContent asreference
(base Uri).