setConnectMock method

  1. @visibleForTesting
void setConnectMock(
  1. dynamic connect(
    1. dynamic,
    2. int, {
    3. dynamic sourceAddress,
    4. int sourcePort,
    5. Duration? timeout,
    })
)

Implementation

@visibleForTesting
void setConnectMock(
    Function(dynamic, int,
            {dynamic sourceAddress, int sourcePort, Duration? timeout})
        connect) {
  if (kDebugMode) {
    _connect = connect;
  }
}