getWallet method

Future<TransactionItem> getWallet()

Implementation

Future<TransactionItem> getWallet() async {
  var headers = {'authorization': token};
  var request = dio.Dio();
  var response = await request.request(
    '$baseUrl/wallet/uw/get',
    options: dio.Options(
      method: 'GET',
      headers: headers,
    ),
  );
  if (response.statusCode == 200) {
    return TransactionItem.fromJson(response.data);
  } else {
    throw Exception('Failed to fetch Checklists data');
  }
}