@@ -475,7 +475,7 @@ class CustomDevice extends Device {
475
475
@override
476
476
final DevicePortForwarder portForwarder;
477
477
478
- CustomDeviceAppSession _getOrCreateAppSession (covariant ApplicationPackage app) {
478
+ CustomDeviceAppSession _getOrCreateAppSession (ApplicationPackage app) {
479
479
return _sessions.putIfAbsent (
480
480
app,
481
481
() {
@@ -663,7 +663,7 @@ class CustomDevice extends Device {
663
663
664
664
@override
665
665
FutureOr <DeviceLogReader > getLogReader ({
666
- covariant ApplicationPackage ? app,
666
+ ApplicationPackage ? app,
667
667
bool includePastLogs = false
668
668
}) {
669
669
if (app != null ) {
@@ -674,7 +674,7 @@ class CustomDevice extends Device {
674
674
}
675
675
676
676
@override
677
- Future <bool > installApp (covariant ApplicationPackage app, {String ? userIdentifier}) async {
677
+ Future <bool > installApp (ApplicationPackage app, {String ? userIdentifier}) async {
678
678
final String ? appName = app.name;
679
679
if (appName == null || ! await tryUninstall (appName: appName)) {
680
680
return false ;
@@ -689,12 +689,12 @@ class CustomDevice extends Device {
689
689
}
690
690
691
691
@override
692
- Future <bool > isAppInstalled (covariant ApplicationPackage app, {String ? userIdentifier}) async {
692
+ Future <bool > isAppInstalled (ApplicationPackage app, {String ? userIdentifier}) async {
693
693
return false ;
694
694
}
695
695
696
696
@override
697
- Future <bool > isLatestBuildInstalled (covariant ApplicationPackage app) async {
697
+ Future <bool > isLatestBuildInstalled (ApplicationPackage app) async {
698
698
return false ;
699
699
}
700
700
@@ -742,7 +742,7 @@ class CustomDevice extends Device {
742
742
743
743
@override
744
744
Future <LaunchResult > startApp (
745
- covariant ApplicationPackage package, {
745
+ ApplicationPackage package, {
746
746
String ? mainPath,
747
747
String ? route,
748
748
required DebuggingOptions debuggingOptions,
@@ -796,15 +796,18 @@ class CustomDevice extends Device {
796
796
}
797
797
798
798
@override
799
- Future <bool > stopApp (covariant ApplicationPackage app, {String ? userIdentifier}) {
799
+ Future <bool > stopApp (ApplicationPackage ? app, {String ? userIdentifier}) async {
800
+ if (app == null ) {
801
+ return false ;
802
+ }
800
803
return _getOrCreateAppSession (app).stop ();
801
804
}
802
805
803
806
@override
804
807
Future <TargetPlatform > get targetPlatform async => _config.platform ?? TargetPlatform .linux_arm64;
805
808
806
809
@override
807
- Future <bool > uninstallApp (covariant ApplicationPackage app, {String ? userIdentifier}) async {
810
+ Future <bool > uninstallApp (ApplicationPackage app, {String ? userIdentifier}) async {
808
811
final String ? appName = app.name;
809
812
if (appName == null ) {
810
813
return false ;
0 commit comments