
Useful-Templates
A template folder for common widgets and useful scripts
Co-author: PratikJH153
- REST API Dart Code:
A ready to use repository containing code for calling GET, POST, DELETE and PATCH methods using the Dio package.
Working:
a. database.dart: The file is where you specify the endpoint of your application. It contains variables for toggling
between Debug mode and production as well as custom messages made for various errors.
b. rest_apis.dart: The file containing the REQUEST function responsible for handling an asynchronous API call.
Returns a Map containing local_result and local_status parameters.
local_status: 200 If the server responds 500 in case of a Timeout
c. apis.dart: A file containing all APIs you will be using throughout the project. These functions need to be
custom made according to the project and yet follow a simple pattern.