woo_api 0.0.4 copy "woo_api: ^0.0.4" to clipboard
woo_api: ^0.0.4 copied to clipboard

Woocommerce rest api package.

example/lib/main.dart

// ignore_for_file: public_member_api_docs, lines_longer_than_80_chars
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:woo_api/woo_api.dart';

/// This is a reimplementation of the default Flutter application using provider + [ChangeNotifier].

void main()async{
  final wooApi = WooApi(
      scheme: 'YOUR_SCHEMA',
      host: 'www.yourwordpressdomain.com',
      consumerKey: 'YOUR_CONSUMER_KEY',
      consumerSecret: 'YOUR_SECRET_KEY');

  final response = await wooApi.getProductById(140);

  print(response.id); //eg 140
  print(response.name); //eg "Product name"
  print(response.description); //eg "Product description"
}
6
likes
130
points
37
downloads

Publisher

verified publisheralfatih.dev

Weekly Downloads

Woocommerce rest api package.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dio, flutter, http, logger, meta, retrofit

More

Packages that depend on woo_api