create method

  1. @override
UserTask create(
  1. AppTaskExecutor<AppTask> executor
)
override

Create a UserTask that wraps executor.

Implementation

@override
UserTask create(AppTaskExecutor executor) =>
    (executor.task.type == BackgroundSensingUserTask.ONE_TIME_SENSING_TYPE)
        ? OneTimeBackgroundSensingUserTask(executor)
        : BackgroundSensingUserTask(executor);