HMS Account Kit in Flutter

Nithin KC
2 min readAug 8, 2022

In this article I am going to discuss about HMS Account Kit integration in Flutter. To integrate HMS Account Kit in Flutter we need Flutter Account Plugin.

Obviously you will have a doubt that What’s this Flutter Account Plugin ?

The Flutter Account Plugin provides you with simple, secure, and quick sign-in and authorization functions. Instead of entering accounts and passwords and waiting for authentication, users can just tap the Sign in with HUAWEI ID button to quickly and securely sign in to your app with their HUAWEI IDs.

Note: You need to install Flutter and Dart plugin in Android Studio IDE and need prior knowledge about the Flutter and Dart.

Integration process

Let’s discuss integration steps here.

  1. Create project in App Gallery Connect and provide relevant information such as app name, Data Storage, SHA 256 Key, package name etc. Enable Account Kit in Manage API Section. Download agconnect-services.json file.
  2. Add “agconnect-services.json” file under “app” directory.
  3. Open project level “build.gradle” file.

Add the maven repositories under “buildscript” and “allprojects” section. Add the classpath in dependency section

4. Open the build.gradle file in the android/app directory of your Flutter project.

Add the AppGallery Connect plugin configuration

5. Download the Flutter Account Plugin and decompress it.

Add downloaded file into parent directory of the project.

6. Open the pubspec.yaml.

Declare plugin path in pubspec.yaml file under dependencies.

Click pub get to pull the dependency.

7. Open the dart file under lib folder.

Let’s start the coding

That’s it.

Result

Conclusion

HMS Account Kit provides you with simple, secure, and quick sign-in and authorization functions. Instead of entering accounts and passwords and waiting for authentication, users can just tap the Sign in with HUAWEI ID button to quickly and securely sign in to your app with their HUAWEI IDs

Reference

Account Kit

Thank You.

--

--