fromString static method
- String str
override
Implementation
static AdifLocation fromString(String str) {
// Validate the format XDDD MM.MMM
final regex = RegExp(r'^[ENSW]\d{3} \d{2}\.\d{3}$');
if (!regex.hasMatch(str)) {
throw ArgumentError('Invalid location string: $str');
}
return AdifLocation(str);
}