From feef220fb96e08298fcb4cdec48eabc94cfdf829 Mon Sep 17 00:00:00 2001 From: Hidenori Matsubayashi Date: Fri, 30 Jul 2021 14:47:45 +0900 Subject: [PATCH] Add all runtime mode to custom-devices (#34) * Add all runtime mode to custom-devices * code format --- lib/elinux_device.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/elinux_device.dart b/lib/elinux_device.dart index 0eabe49..aeb1aa2 100644 --- a/lib/elinux_device.dart +++ b/lib/elinux_device.dart @@ -80,6 +80,7 @@ class ELinuxDevice extends Device { final ELinuxLogReader _logReader = ELinuxLogReader(); int _forwardedHostPort; + BuildMode _buildMode = BuildMode.debug; @override Future get isLocalEmulator async => false; @@ -96,9 +97,10 @@ class ELinuxDevice extends Device { } @override - bool supportsRuntimeMode(BuildMode buildMode) => _desktop - ? buildMode != BuildMode.jitRelease - : buildMode == BuildMode.debug; + bool supportsRuntimeMode(BuildMode buildMode) { + _buildMode = buildMode; + return buildMode != BuildMode.jitRelease; + } @override Future get sdkNameAndVersion async => @@ -123,8 +125,7 @@ class ELinuxDevice extends Device { return false; } - final String bundlePath = - app.outputDirectory(BuildMode.fromName('debug'), _targetArch); + final String bundlePath = app.outputDirectory(_buildMode, _targetArch); final bool result = await tryInstall(localPath: bundlePath, appName: app.name);