addCustomerInfoUpdateListener static method
Sets a function to be called on updated customer info.
The function is called right away with the latest customer info as soon as it's set.
customerInfoUpdateListener
CustomerInfo update listener.
Implementation
static void addCustomerInfoUpdateListener(
CustomerInfoUpdateListener customerInfoUpdateListener,
) {
_customerInfoUpdateListeners.add(customerInfoUpdateListener);
final lastReceivedCustomerInfo = _lastReceivedCustomerInfo;
if (lastReceivedCustomerInfo != null) {
customerInfoUpdateListener(lastReceivedCustomerInfo);
}
}