getProductAttributes method

Future<List<WooProductAttribute>> getProductAttributes()

Implementation

Future<List<WooProductAttribute>> getProductAttributes() async {
  List<WooProductAttribute> productAttributes = [];
  _setApiResourceUrl(
    path: 'products/attributes',
  );
  final response = await get(queryUri.toString());
  for (var a in response) {
    var att = WooProductAttribute.fromJson(a);
    _printToLog('prod gotten here : ' + att.toString());
    productAttributes.add(att);
  }
  return productAttributes;
}