getWalletList method

Future<bool> getWalletList(
  1. String userToken
)

Implementation

Future<bool> getWalletList(String userToken) async {
  String deviceId = await UserInfo.getBootpayUUID();

  var res = await _provider.getWalletList(deviceId, userToken);

  BootpayPrint("getWalletList : ${res.body}");

  if(res.statusCode == HttpStatus.ok) {
    resWallet.value = ResWalletList.fromJson(res.body);
    resWallet.refresh();
    return true;
  }

  Fluttertoast.showToast(
      msg: res.body?.toString() ?? '지갑정보 조회에 실패하였습니다',
      toastLength: Toast.LENGTH_SHORT,
      gravity: ToastGravity.BOTTOM,
      timeInSecForIosWeb: 1,
      backgroundColor: Colors.black54,
      textColor: Colors.white,
      fontSize: 14.0
  );
  return false;
}