Favourites

This commit is contained in:
Mguy13 2022-12-25 01:55:53 +01:00
parent 6a84a9bef0
commit 1747ab0245
23 changed files with 469 additions and 67 deletions

View file

@ -1,13 +1,15 @@
import 'dart:async';
import '../data/dtos/image_model_dto.dart';
/// Interface for implementing image-fetching strategies, specific to a resource location on the internet.
///
/// Since I used a site that was more obscure than the ones in the examples, this (otherwise pointless
/// and convoluting) interface is for adding a bit of flexibility to change strategy to some other site.
abstract class ImagesApi {
FutureOr<Iterable<Map<String, dynamic>>> fetchImageUri({required String token});
FutureOr<Iterable<ImageModelDTO>> fetchImageUri({required String token});
FutureOr<Iterable<Map<String, dynamic>>> searchImages({
FutureOr<Iterable<ImageModelDTO>> searchImages({
required String searchStr,
required String token,
});