isValidBranchName function
Implementation
bool isValidBranchName(String? branchName) {
// Check if the branch name is null or empty
if (branchName == null || branchName.isEmpty) {
return false;
}
// branch should contain spaces
if (branchName.contains(" ")) {
return false;
}
// branch should not start with a dot
if (branchName.startsWith(".")) {
return false;
}
return true;
}