fromString static method

AdifPositiveInteger fromString(
  1. String str
)
override

Implementation

static AdifPositiveInteger fromString(String str) {
  final intValue = int.tryParse(str);
  if (intValue == null || intValue < 0) {
    throw ArgumentError('Invalid positive integer string: $str');
  }
  return AdifPositiveInteger(intValue);
}