FhirInteger64 constructor

FhirInteger64(
  1. dynamic inValue
)

Implementation

factory FhirInteger64(dynamic inValue) {
  if (inValue is int) {
    return FhirInteger64._(inValue.toString(), BigInt.from(inValue), true);
  } else if (inValue is BigInt) {
    return FhirInteger64._(inValue.toString(), inValue, true);
  } else if (inValue is String) {
    final BigInt? tempInteger64 = BigInt.tryParse(inValue);
    return tempInteger64 == null
        ? FhirInteger64._(inValue, null, false)
        : FhirInteger64._(inValue, tempInteger64, true);
  }
  throw CannotBeConstructed<FhirInteger64>(
      'Integer64 cannot be constructed from '
      '$inValue (which is an ${inValue.runtimeType}).');
}