Skip to content

Instantly share code, notes, and snippets.

@obadajasm
Last active April 12, 2020 12:34
Show Gist options
  • Save obadajasm/ecf0e6ff848415a86868349c2d0cca0c to your computer and use it in GitHub Desktop.
Save obadajasm/ecf0e6ff848415a86868349c2d0cca0c to your computer and use it in GitHub Desktop.
class MyProvider with ChangeNotifier {
var id;
Future<void> getid(String moviename) async {
try {
Dio dio = Dio();
Response res = await dio.get(
"http://www.omdbapi.com/?t=$moviename&apikey=4b25eb47",
);
id = res.data['imdbID'];
print(id.toString());
} catch (e) {}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment