Photo class
A photo uploaded to unsplash.
See: Unsplash docs
Constructors
-
Photo({Map<
String, dynamic> ? source, required String id, required DateTime createdAt, required DateTime updatedAt, required PhotoUrls urls, required int width, required int height, required String color, required String? blurHash, required int? downloads, required int likes, required bool likedByUser, required String? description, required Exif? exif, required GeoLocation? location, required User user, required List<Collection> currentUserCollections, required PhotoLinks links, required List<Tag> ? tags}) -
const
-
Photo.fromJson(Map<
String, dynamic> json) -
factory
Properties
- blurHash → String?
-
final
- color → String
-
final
- createdAt → DateTime
-
final
-
currentUserCollections
→ List<
Collection> -
final
- description → String?
-
final
- downloads → int?
-
final
- exif → Exif?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
final
- id → String
-
final
- likedByUser → bool
-
final
- likes → int
-
final
- links → PhotoLinks
-
final
- location → GeoLocation?
-
final
- ratio → double
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
source
→ Map<
String, dynamic> ? -
The raw JSON response from the API which was used to construct this
object.
finalinherited
-
final
- updatedAt → DateTime
-
final
- urls → PhotoUrls
-
final
- user → User
-
final
- width → int
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Returns the json representation of this model in the unsplash api.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited