From b42f09cb11a362e8511fbf7e92b54893b1c368ea Mon Sep 17 00:00:00 2001 From: Sitaram Kalluri Date: Thu, 12 Sep 2024 14:51:22 +0530 Subject: [PATCH] fix: Use ?? for null check in auth_cli.dart file --- packages/at_onboarding_cli/lib/src/cli/auth_cli.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/at_onboarding_cli/lib/src/cli/auth_cli.dart b/packages/at_onboarding_cli/lib/src/cli/auth_cli.dart index 31236f57..e01cb5bc 100644 --- a/packages/at_onboarding_cli/lib/src/cli/auth_cli.dart +++ b/packages/at_onboarding_cli/lib/src/cli/auth_cli.dart @@ -335,11 +335,9 @@ Future enroll(ArgResults argResults, {AtOnboardingService? svc}) async { } try { stderr.writeln('Submitting enrollment request'); - String apkamKeysExpiry = (argResults[AuthCliArgs.argNameExpiry] == null) - // If apkam Keys expiry is not set, then APKAM keys should lives forever. - // Therefore set to 0ms (0 milliseconds) and TTL will not be set. - ? '0ms' - : argResults[AuthCliArgs.argNameExpiry]; + // If apkam Keys expiry is not set, then APKAM keys should lives forever. + // Therefore set to 0ms (0 milliseconds) and TTL will not be set. + String apkamKeysExpiry = argResults[AuthCliArgs.argNameExpiry] ?? '0ms'; AtEnrollmentResponse er = await svc.sendEnrollRequest( argResults[AuthCliArgs.argNameAppName], argResults[AuthCliArgs.argNameDeviceName],