convertToTaskState function Null safety

LoadBundleTaskState convertToTaskState(
  1. String state
)

Implementation

LoadBundleTaskState convertToTaskState(String state) {
  switch (state) {
    case 'running':
      return LoadBundleTaskState.running;
    case 'success':
      return LoadBundleTaskState.success;
    case 'error':
      return LoadBundleTaskState.error;
    default:
      throw FallThroughError();
  }
}