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
# query | |
curl \ | |
-X POST \ | |
-H "x-api-key: xxx-xxxx" \ | |
-H "Content-Type: application/json" \ | |
-d '{ "query": "query { listUsers { name } }" }' \ | |
https://app-id.appsync-api.us-east-1.amazonaws.com/graphql | |
# mutation with variables | |
curl \ |
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
Future<Null> _downloadNetworkImage() async { | |
Dio dio = Dio(); | |
try { | |
var dir = await getTemporaryDirectory(); | |
print(dir); | |
Scaffold.of(context).showSnackBar( | |
SnackBar(content: Text("Downloading image. Please wait..."))); | |
await dio.download(url, '${dir.path}/image.jpeg', | |
onReceiveProgress: (rec, total) { |