Asset class
Individual asset definition.
Constructors
-
Asset({String? id, required String path, required AssetType type, String? name, String? description, String? mimeType, String encoding = 'utf-8', String? content, String? contentRef, String? hash, int? size, Map<
String, dynamic> metadata = const {}}) -
const
-
Asset.fromJson(Map<
String, dynamic> json) -
factory
Properties
- content → String?
-
Inline content (for small assets).
final
- contentRef → String?
-
Content reference (URL or file path).
final
- description → String?
-
Asset description.
final
- encoding → String
-
Content encoding.
final
- hasExternalContent → bool
-
Check if asset references external content.
no setter
- hash → String?
-
Content hash for integrity.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasInlineContent → bool
-
Check if asset has inline content.
no setter
- id → String?
-
Asset identifier.
final
-
metadata
→ Map<
String, dynamic> -
Asset metadata.
final
- mimeType → String?
-
MIME type.
final
- name → String?
-
Asset name.
final
- path → String
-
Asset path within bundle.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int?
-
Asset size in bytes.
final
- type → AssetType
-
Asset type.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited