Created
August 4, 2019 05:59
-
-
Save SAGARSURI/2c9834bdda03a4ae8116b608ca816af8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:typed_data'; | |
import 'image_provider.dart'; | |
import '../models/state.dart'; | |
class Repository { | |
static final Repository _repository = Repository._private(); | |
Repository._private(); | |
factory Repository() => _repository; | |
ImageProvider _imageProvider = ImageProvider(); | |
Future<State> imageData(query) => _imageProvider.getImagesByName(query); | |
Future<Uint8List> getImageToShare(String url) { | |
return _imageProvider.getImageFromUrl(url); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment