Last active
April 12, 2020 12:34
-
-
Save obadajasm/ecf0e6ff848415a86868349c2d0cca0c 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
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