22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44
5- // @dart = 2.8
6-
75import 'dart:convert' ;
86import 'dart:io' ;
97
@@ -18,8 +16,8 @@ Future<void> main() async {
1816 await task (() async {
1917 section ('Copy test Flutter App with watchOS Companion' );
2018
21- String watchDeviceID;
22- String phoneDeviceID;
19+ String ? watchDeviceID;
20+ String ? phoneDeviceID;
2321 final Directory tempDir = Directory .systemTemp
2422 .createTempSync ('flutter_ios_app_with_extensions_test.' );
2523 final Directory projectDir =
@@ -127,23 +125,23 @@ Future<void> main() async {
127125 // iOS 13.4 (13.4 - 17E255) - com.apple.CoreSimulator.SimRuntime.iOS-13-4
128126 // tvOS 13.4 (13.4 - 17L255) - com.apple.CoreSimulator.SimRuntime.tvOS-13-4
129127 // watchOS 6.2 (6.2 - 17T256) - com.apple.CoreSimulator.SimRuntime.watchOS-6-2
130- String iOSSimRuntime;
131- String watchSimRuntime;
128+ String ? iOSSimRuntime;
129+ String ? watchSimRuntime;
132130
133131 final RegExp iOSRuntimePattern = RegExp (r'iOS .*\) - (.*)' );
134132 final RegExp watchOSRuntimePattern = RegExp (r'watchOS .*\) - (.*)' );
135133
136134 for (final String runtime in LineSplitter .split (availableRuntimes)) {
137135 // These seem to be in order, so allow matching multiple lines so it grabs
138136 // the last (hopefully latest) one.
139- final RegExpMatch iOSRuntimeMatch = iOSRuntimePattern.firstMatch (runtime);
137+ final RegExpMatch ? iOSRuntimeMatch = iOSRuntimePattern.firstMatch (runtime);
140138 if (iOSRuntimeMatch != null ) {
141- iOSSimRuntime = iOSRuntimeMatch.group (1 ).trim ();
139+ iOSSimRuntime = iOSRuntimeMatch.group (1 )! .trim ();
142140 continue ;
143141 }
144- final RegExpMatch watchOSRuntimeMatch = watchOSRuntimePattern.firstMatch (runtime);
142+ final RegExpMatch ? watchOSRuntimeMatch = watchOSRuntimePattern.firstMatch (runtime);
145143 if (watchOSRuntimeMatch != null ) {
146- watchSimRuntime = watchOSRuntimeMatch.group (1 ).trim ();
144+ watchSimRuntime = watchOSRuntimeMatch.group (1 )! .trim ();
147145 }
148146 }
149147 if (iOSSimRuntime == null || watchSimRuntime == null ) {
0 commit comments