execute method

  1. @override
Future<DeviceConfigContext> execute(
  1. DeviceConfigContext context
)
override

Implementation

@override
Future<DeviceConfigContext> execute(DeviceConfigContext context) async {
  logger.spaces();

  logger.info(
    '''
Installing required dependencies to run the app on the remote device.
Selected custom embedder: ${context.embedder?.name.paramCase}


''',
  );

  final dependencyInstaller = DependencyInstaller.create(
    context.embedder!,
    flutterSdkManager: flutterSdkManager,
    remoteControllerService: remoteControllerService,
  );

  final isDependenciesInstalled = await dependencyInstaller.install();

  if (!isDependenciesInstalled) {
    logger.err(
        'Failed to install dependencies! for ${context.embedder?.name.paramCase} embedder.');
    throwToolExit(
        'Failed to install dependencies! for ${context.embedder?.name.paramCase} embedder.');
  }

  return context;
}