resolve static method

Future<String> resolve({
  1. Directory? start,
})

Resolve the CLI version string.

Attempts multiple strategies in order of priority.

Implementation

static Future<String> resolve({Directory? start}) async {
  if (_embedded.isNotEmpty) return _embedded;

  final detected = await _readPubspecVersion(
    start: start ?? Directory.current,
  );
  return detected ?? defaultVersion;
}