recipeData method

Data<Map<String, Data>> recipeData(
  1. Data<String> id
)

Implementation

Data<Map<String, Data<dynamic>>> recipeData(Data<String> id) {
  String type;
  switch (id.value) {
    case 'component/test1':
    case 'component/test2':
      type = 'component';
      break;
    case 'function/test1':
    case 'function/test2':
      type = 'function';
      break;
    default:
      type = '';
  }
  return Data<Map<String, Data<dynamic>>>({
    'type': Data<String>(type),
    'name': Data<String>(id.value),
  });
}