copyWith method

  1. @override
FastConnectivityStatus copyWith({
  1. List<ConnectivityResult>? connectivityResults,
  2. bool? isConnected,
  3. bool? isServiceAvailable,
})
override

Creates a copy of this TModel but with the given fields replaced with the new values.

For example:

var myModel2 = myModel1.copyWith(age: 42);

Implementation

@override
FastConnectivityStatus copyWith({
  List<ConnectivityResult>? connectivityResults,
  bool? isConnected,
  bool? isServiceAvailable,
}) {
  return FastConnectivityStatus(
    connectivityResults: connectivityResults ?? this.connectivityResults,
    isConnected: isConnected ?? this.isConnected,
    isServiceAvailable: isServiceAvailable ?? this.isServiceAvailable,
  );
}