remedi_net_new

Last updated:

0 purchases

remedi_net_new Image
remedi_net_new Images
Add to Cart

Description:

remedi net new

This package is a wrapper of dio
How to use.

Implement ApiService

class GoogleApiService extends ApiService<GoogleData> {
GoogleApiService()
: super(
request: DioRequest(
builder: DioBuilder.json(
baseUrl: 'https://www.googleapis.com',
),
),
);

get() async {
return requestGet(path: '/books/v1/volumes', queries: {'q': '{http}'});
}

@override
GoogleData? fromJson(json) {
return GoogleData.fromJson(json);
}

@override
HttpError onError(HttpError error) {
// TODO: customize error data.
return super.onError(error);
}
}

class GoogleData extends IDto {
// TODO add properties.
GoogleData();

static GoogleData? fromJson(json) {
return GoogleData();
}
}
copied to clipboard

Use the api.

var res = await GoogleApiService().get();
if(res is HttpError) {
// TODO Handle error case
return;
}

// TODO handle success case;
copied to clipboard
return;

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.