@@ -475,7 +475,7 @@ class CustomDevice extends Device {
475475 @override
476476 final DevicePortForwarder portForwarder;
477477
478- CustomDeviceAppSession _getOrCreateAppSession (covariant ApplicationPackage app) {
478+ CustomDeviceAppSession _getOrCreateAppSession (ApplicationPackage app) {
479479 return _sessions.putIfAbsent (
480480 app,
481481 () {
@@ -663,7 +663,7 @@ class CustomDevice extends Device {
663663
664664 @override
665665 FutureOr <DeviceLogReader > getLogReader ({
666- covariant ApplicationPackage ? app,
666+ ApplicationPackage ? app,
667667 bool includePastLogs = false
668668 }) {
669669 if (app != null ) {
@@ -674,7 +674,7 @@ class CustomDevice extends Device {
674674 }
675675
676676 @override
677- Future <bool > installApp (covariant ApplicationPackage app, {String ? userIdentifier}) async {
677+ Future <bool > installApp (ApplicationPackage app, {String ? userIdentifier}) async {
678678 final String ? appName = app.name;
679679 if (appName == null || ! await tryUninstall (appName: appName)) {
680680 return false ;
@@ -689,12 +689,12 @@ class CustomDevice extends Device {
689689 }
690690
691691 @override
692- Future <bool > isAppInstalled (covariant ApplicationPackage app, {String ? userIdentifier}) async {
692+ Future <bool > isAppInstalled (ApplicationPackage app, {String ? userIdentifier}) async {
693693 return false ;
694694 }
695695
696696 @override
697- Future <bool > isLatestBuildInstalled (covariant ApplicationPackage app) async {
697+ Future <bool > isLatestBuildInstalled (ApplicationPackage app) async {
698698 return false ;
699699 }
700700
@@ -742,7 +742,7 @@ class CustomDevice extends Device {
742742
743743 @override
744744 Future <LaunchResult > startApp (
745- covariant ApplicationPackage package, {
745+ ApplicationPackage package, {
746746 String ? mainPath,
747747 String ? route,
748748 required DebuggingOptions debuggingOptions,
@@ -796,15 +796,18 @@ class CustomDevice extends Device {
796796 }
797797
798798 @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+ }
800803 return _getOrCreateAppSession (app).stop ();
801804 }
802805
803806 @override
804807 Future <TargetPlatform > get targetPlatform async => _config.platform ?? TargetPlatform .linux_arm64;
805808
806809 @override
807- Future <bool > uninstallApp (covariant ApplicationPackage app, {String ? userIdentifier}) async {
810+ Future <bool > uninstallApp (ApplicationPackage app, {String ? userIdentifier}) async {
808811 final String ? appName = app.name;
809812 if (appName == null ) {
810813 return false ;
0 commit comments