inRootOfAfibProject static method

bool inRootOfAfibProject(
  1. AFCommandContext ctx
)

Implementation

static bool inRootOfAfibProject(AFCommandContext ctx) {
  if(!AFProjectPaths.projectFileExists(AFProjectPaths.pubspecPath)) {
    return false;
  }
  if(ctx.isRootCommand && !AFProjectPaths.projectFileExists(ctx.generator.pathAfibConfig)) {
    return false;
  }

  return true;
}