replaceDeviceIp method
CustomDeviceConfig
replaceDeviceIp(
- String oldIp,
- String newIp
)
Implementation
CustomDeviceConfig replaceDeviceIp(String oldIp, String newIp) {
final newDevice = copyWith();
final newPingCommand = _replaceNewIpInCommand(
newDevice.pingCommand,
oldIp,
newIp,
);
final newPostBuildCommand = _replaceNewIpInCommand(
newDevice.postBuildCommand,
oldIp,
newIp,
);
final newInstallCommand = _replaceNewIpInCommand(
newDevice.installCommand,
oldIp,
newIp,
);
final newUninstallCommand = _replaceNewIpInCommand(
newDevice.uninstallCommand,
oldIp,
newIp,
);
final newRunDebugCommand = _replaceNewIpInCommand(
newDevice.runDebugCommand,
oldIp,
newIp,
);
final newForwardPortCommand = _replaceNewIpInCommand(
newDevice.forwardPortCommand,
oldIp,
newIp,
);
final newScreenshotCommand = _replaceNewIpInCommand(
newDevice.screenshotCommand,
oldIp,
newIp,
);
return newDevice.copyWith(
pingCommand: newPingCommand,
postBuildCommand: newPostBuildCommand,
installCommand: newInstallCommand,
uninstallCommand: newUninstallCommand,
runDebugCommand: newRunDebugCommand,
forwardPortCommand: newForwardPortCommand,
screenshotCommand: newScreenshotCommand,
);
}