get method
void
get(})
GET request to API
Perform a GET request to API with specific
path
, you can send the headers
, params
and a fromJson
method to parse the result
json to a specific object.
Implementation
void get(
String path, {
Map<String, String>? headers,
Map<String, String>? params,
bool withLoading = true,
dynamic Function(Map<String, dynamic>)? fromJson,
}) =>
add(
RestEvent.get(
path,
params: params,
fromJson: fromJson,
headers: headers,
withLoading: withLoading,
),
);