writeProjectPath function
Persists the absolute Flutter project path to .fdb/project_path.txt so
later commands can read the project's resolved dependencies.
Implementation
void writeProjectPath(String projectPath) {
final normalized = Directory(projectPath).absolute.uri.normalizePath().toFilePath();
final trimmed = normalized.length > 1 && normalized.endsWith(Platform.pathSeparator)
? normalized.substring(0, normalized.length - 1)
: normalized;
File(projectPathFile).writeAsStringSync(trimmed);
}