tryCreate static method

void tryCreate(
  1. String regionCode,
  2. PhoneNumberFormatter phoneNumber
)

Implementation

static void tryCreate(String regionCode, PhoneNumberFormatter phoneNumber) {
  final activationFactoryPtr =
      CreateActivationFactory(_className, IID_IPhoneNumberFormatterStatics);
  final object =
      IPhoneNumberFormatterStatics.fromRawPointer(activationFactoryPtr);

  try {
    return object.tryCreate(regionCode, phoneNumber);
  } finally {
    object.release();
  }
}