setDiscount static method

Future<void> setDiscount(
  1. double amount,
  2. String name
)

Implementation

static Future<void> setDiscount(double amount, String name) async {
  try {
    await platform.invokeMethod('setDiscount', <String, dynamic>{
      'amount': amount,
      'name': name,
    });
  } on PlatformException catch (e) {
    showToast(e.message.toString());
  }
}