Last active
December 15, 2019 12:18
-
-
Save smokelaboratory/7d53a249ecb0b752b810aade9e07a982 to your computer and use it in GitHub Desktop.
ApiUtil
This file contains hidden or 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 ApiUtil { | |
| ApiConnector _apiConnector; | |
| ApiUtil() { | |
| _apiConnector = ApiConnector(); | |
| } | |
| void cancelRequests({CancelToken cancelToken}) { | |
| _apiConnector.cancelRequests(cancelToken: cancelToken); | |
| } | |
| dynamic getData() async { | |
| return (await _apiConnector.get("/todos/1")).data; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment