Skip to content

[Support] Code changes question #40

Description

@burekas7

Hi @Tkko

I just updated the version from 2.0.0 to 3.2.0 and I saw there are some code changes.
I want to be sure that I updated the code correctly.
I will glad if you can approve that for me.

Thanks

  • By the way, some of the changes are not mentioned in the change logs.

Before:
final smartAuth = SmartAuth()

After:
final smartAuth = SmartAuth.instance


Before:

      final res = await smartAuth.getSmsCode();
      if (res.succeed && res.codeFound) {
         return res.code!;
      }

After:

      final SmartAuthResult<SmartAuthSms> smartAuthResult =
          await smartAuth.getSmsWithRetrieverApi();
      if (smartAuthResult.hasData) {
        return smartAuthResult.data?.code;
      }

Before:

    final String? res = await smartAuth.getAppSignature();
    debugPrint('Signature: $res');
    return res.data;

After:

    final SmartAuthResult<String> res = await smartAuth.getAppSignature();
    debugPrint('Signature: ${res.data}');
    return res.data;

Before:

  @override
  Future<void> dispose() {
     return smartAuth.removeSmsListener();
  }

After:

  @override
  Future<void> dispose() {
    return smartAuth.removeSmsRetrieverApiListener();
  }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions