init method

dynamic init({
  1. required String url,
  2. required String consumerKey,
  3. required String consumerSecrete,
})

Implementation

init(
    {required String url, // Domain Inforamtion (URL with scheme)
    required String consumerKey, // Key for Woo REST API from WordPress
    required String consumerSecrete // Secrete for Woo REST API from WordPress
    }) {
  consumerKey = consumerKey;
  consumerSecret = consumerSecrete;
  baseUrl = '$url/wp-json/wc/v3/';
}