API SDK REST
REST needs a generic function for CRUD operations so these functions are placed in the api_base_helper.dart
file under the ApiBaseHelper class. The exceptions for this API go into the api_exception.dart
file.
rest_api_handler_data.dart
contains all the generic functions that the app needs to access:
For post, we need to send the path which is in api_constants.dart
and a body. Whereas for get, we need to only send the path.
main.dart
for API SDK contains all the functions that the app needs to access. For example if the app wants to access data for a particular user, it will call this function inside the ApiSdk class:
To call this function anywhere, do the following: