Remove uses of deprecated constants and change int.parse to int.tryParse (#19575)
* Remove uses of deprecated constants * Change int.parse to int.tryParse where appropriate
This commit is contained in:
@@ -52,7 +52,7 @@ Future<Null> _patchXcconfigFilesIfNotPatched(String flutterProjectPath) async {
|
||||
final String contents = await file.readAsString();
|
||||
final bool alreadyPatched = contents.contains(include);
|
||||
if (!alreadyPatched) {
|
||||
final IOSink patchOut = file.openWrite(mode: FileMode.APPEND); // ignore: deprecated_member_use
|
||||
final IOSink patchOut = file.openWrite(mode: FileMode.append);
|
||||
patchOut.writeln(); // in case EOF is not preceded by line break
|
||||
patchOut.writeln(include);
|
||||
await patchOut.close();
|
||||
|
||||
@@ -73,14 +73,14 @@ Future<Map<String, dynamic>> runTask(String taskName, { bool silent = false }) a
|
||||
await runner.exitCode.timeout(const Duration(seconds: 1));
|
||||
return taskResult;
|
||||
} on TimeoutException catch (timeout) {
|
||||
runner.kill(ProcessSignal.SIGINT); // ignore: deprecated_member_use
|
||||
runner.kill(ProcessSignal.sigint);
|
||||
return <String, dynamic>{
|
||||
'success': false,
|
||||
'reason': 'Timeout waiting for $waitingFor: ${timeout.message}',
|
||||
};
|
||||
} finally {
|
||||
if (!runnerFinished)
|
||||
runner.kill(ProcessSignal.SIGKILL); // ignore: deprecated_member_use
|
||||
runner.kill(ProcessSignal.sigkill);
|
||||
await stdoutSub.cancel();
|
||||
await stderrSub.cancel();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user