Lets the user pick one branch from branches; returns null on cancel.
branches
typedef BranchSelector = Future<String?> Function(List<String> branches);