refactoring
security update
This commit is contained in:
parent
1747ab0245
commit
78fe9e7b09
39 changed files with 289 additions and 132 deletions
|
@ -7,10 +7,15 @@ import '../data/dtos/image_model_dto.dart';
|
|||
/// 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<ImageModelDTO>> fetchImageUri({required String token});
|
||||
ImagesApi({required String token}) : _token = token;
|
||||
|
||||
/// Access token provided to be used with API calls
|
||||
final String _token;
|
||||
|
||||
/// Returns images fetched through an API as [ImageModelDTO]s.
|
||||
FutureOr<Iterable<ImageModelDTO>> fetchImageUri();
|
||||
|
||||
FutureOr<Iterable<ImageModelDTO>> searchImages({
|
||||
required String searchStr,
|
||||
required String token,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue