configure static method

void configure(
  1. String companyKey, {
  2. bool debugEnabled = false,
  3. String? url,
})

Configure the Invoice Ninja package The key can be generated on Settings > Client Portal

Implementation

static void configure(
  String companyKey, {
  bool debugEnabled = false,
  String? url,
}) {
  InvoiceNinja.companyKey = companyKey;
  InvoiceNinja.debugEnabled = debugEnabled;

  if (url != null) {
    if (!url.startsWith('http')) {
      url = 'https://$url';
    }

    InvoiceNinja.url = url;
  }
}