dio_mini

Creator: coderz1093

Last updated:

0 purchases

dio_mini Image
dio_mini Images

Languages

Categories

Add to Cart

Description:

dio mini

Dio Mini #
Dio Mini have easy and simple components.
You can do primitive request and response operation like
get, post, put, delete, upload.
Also provide you change source code so you can change all code according to your preference.
Getting Started Setup #
Step-1 #
Now i will show you labels name and their means



baseURL: your data base web adress. You will define, when you use DioMini class.
example : https://SECRET.mockapi.io/
copied to clipboard



mainUrl: endpoint of your data base adress. You will understand when you use the methods.
example:https://SECRET.mockapi.io/users
copied to clipboard



id: id is a descriptive for your data.
example: https://SECRET.mockapi.io/users/name.json
copied to clipboard
Understanding Methods #

Firstly define object

ModelClass _model = ModelClass(...); // define model class object
DioMini _helper = DioMini(
model: _model,// or you can write like ModelClass(...)
baseURL: 'Your base URL');
copied to clipboard

Use getData() method

final result =
await _helper.getData('users', '4');
print(result?['name']); // result is a map. I will convert list later.
copied to clipboard

Use getDataList() method

final result =
await service.getDataList('users');
print(result); // result is map list. Y will convert list later. :(
copied to clipboard

Use postData() method

await service.postData(model, 'newUsers')
? print('Correct')
: print('NoCorrect');
copied to clipboard

Use putData() method

await service.putData(model, '5', 'users')
? print('Correct')
: print('NoCorrect');
copied to clipboard

Use deleteData() method

await service.deleteData('5', 'users')
? print('Correct')
: print('NoCorrect');
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.