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


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/
    mainUrl: endpoint of your data base adress. You will understand when you use the methods.
    id: id is a descriptive for your data.
    example: https://SECRET.mockapi.io/users/name.json

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');
  • Use getData() method
    final result =
        await _helper.getData('users', '4');
    print(result?['name']); // result is a map. I will convert list later.
  • Use getDataList() method
    final result =
        await service.getDataList('users');
    print(result); // result is map list. Y will convert list later. :(
  • Use postData() method
    await service.postData(model, 'newUsers')
        ? print('Correct')
        : print('NoCorrect');
  • Use putData() method
    await service.putData(model, '5', 'users')
        ? print('Correct')
        : print('NoCorrect');
  • Use deleteData() method
    await service.deleteData('5', 'users')
        ? print('Correct')
        : print('NoCorrect');


Support for doing something awesome.