getTaskExecutor function
Returns the relevant TaskExecutor based on the type of task
.
Implementation
TaskExecutor getTaskExecutor(TaskDescriptor task) {
if (task is AppTask) return AppTaskExecutor();
if (task is FunctionTask) return FunctionTaskExecutor();
return BackgroundTaskExecutor();
}