onTransfer method

void onTransfer(
  1. void callback(
    1. String from,
    2. String to,
    3. BigInt amount,
    4. Event event,
    )
)

Emitted when amount tokens are moved from one account (from) to another (to).

Note that amount may be zero.

Implementation

void onTransfer(
  void Function(
    String from,
    String to,
    BigInt amount,
    Event event,
  )
      callback,
) =>
    contract.on(
      'Transfer',
      (String from, String to, BigNumber amount, dynamic data) => callback(
        from,
        to,
        amount.toBigInt,
        Event.fromJS(data),
      ),
    );