DirectusFile class
- Annotations
-
- @JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false)
Constructors
-
DirectusFile({String? id, String? storage, String? filenameDisk, String? filenameDownload, String? title, String? type, Object? folder, Object? uploadedBy, DateTime? uploadedOn, Object? modifiedBy, DateTime? modifiedOn, String? charset, Object? filesize, int? width, int? height, int? duration, String? embed, String? description, String? location, String? tags, Map<
String, Object?> ? metadata}) -
DirectusFile.fromJson(Map<
String, Object?> json) -
Used for code generation
factory
Properties
- charset ↔ String?
-
getter/setter pair
- description ↔ String?
-
getter/setter pair
- duration ↔ int?
-
getter/setter pair
- embed ↔ String?
-
getter/setter pair
- filenameDisk ↔ String?
-
getter/setter pair
- filenameDownload ↔ String?
-
getter/setter pair
- filesize ↔ Object?
-
IDK Why but API returns string
So I will simply make it an object for now
Error: type 'String' is not a subtype of type 'int?' in type cast
getter/setter pair
- folder ↔ Object?
-
Folder. Either String or DirectusFolder.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- height ↔ int?
-
getter/setter pair
- id ↔ String?
-
getter/setter pair
- location ↔ String?
-
getter/setter pair
-
metadata
↔ Map<
String, Object?> ? -
getter/setter pair
- modifiedBy ↔ Object?
-
Either String or DirectusUser.
getter/setter pair
- modifiedOn ↔ DateTime?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- storage ↔ String?
-
getter/setter pair
-
getter/setter pair
- title ↔ String?
-
getter/setter pair
- type ↔ String?
-
getter/setter pair
- uploadedBy ↔ Object?
-
Either String or DirectusUser.
getter/setter pair
- uploadedOn ↔ DateTime?
-
getter/setter pair
- width ↔ int?
-
getter/setter pair
Methods
-
downloadUrl(
String baseUrl) → String? - Return root url.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
thumbnailUrl(
String baseUrl, {required int width, required int height, DirectusThumbnailFit fit = DirectusThumbnailFit.cover, int? quality, DirectusThumbnailFormat? format}) → String? - Return thumbnail url.
-
toJson(
) → Map< String, Object?> - Used for code generation
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited