PhotoRestDataSource class Null safety
REST implementation of the photo data source.
- Implemented types
- Annotations
- @LazySingleton(as: PhotoDataSource)
- @RestApi()
Constructors
- PhotoRestDataSource(Dio dio, {@Named("baseUrl") String baseUrl})
-
Creates photo REST data source.
factory
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
getAlbumPhotos(
{required int albumId}) → Future< List< PhotoModel> > -
Returns list with all photo models of a given album.
@GET("/albums/{albumId}/photos"), override
-
getAllPhotos(
) → Future< List< PhotoModel> > -
Returns list with all available photo models.
@GET("/photos"), override
-
getPhoto(
{required int photoId}) → Future< PhotoModel> -
Returns a single photo model.
@GET("/photos/{photoId}"), override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
A string representation of this object. [...]
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited