get<T> method
Sends a GET request to endpoint, with params appended as query
parameters. Pass fromJson to get back a typed SmartApiResponse.
Implementation
Future<SmartApiResponse<T>> get<T>(String endpoint,
{Map<String, dynamic>? params,
T Function(dynamic)? fromJson,
bool showLoader = true}) =>
call<T>(SmartApiRequest(endpoint: endpoint, method: ApiMethod.get, body: params, showLoader: showLoader),
fromJson: fromJson);