onTransfer method

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

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, dynamic data)
            callback) =>
    contract.on(
        'Transfer',
        (String from, String to, BigNumber amount, dynamic data) =>
            callback(from, to, amount.toBigInt, convertToDart(data)));