Skip to content

Instantly share code, notes, and snippets.

View neiljaywarner's full-sized avatar
💭
fluttering

Neil Jay Warner neiljaywarner

💭
fluttering
  • Carrollton, TX
View GitHub Profile
@omerasif57
omerasif57 / networkresdown.dart
Created February 28, 2021 12:08
Download A Network Image In Flutter using Dio Library
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) {
@dabit3
dabit3 / testing-graphql.sh
Created September 17, 2020 15:28
GraphQL requests using CURL
# 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 \