Login with Huawei Account Kit Huawei StoryApp [Flutter]
In this article, we will be integrating Account Kit in Huawei StoryApp. Flutter plugin provides simple and convenient way to experience authorization of users. Flutter Account Plugin allows users to connect to the Huawei ecosystem using their Huawei IDs from the different devices such as mobiles phones and tablets, added users can login quickly and conveniently sign in to apps with their Huawei IDs after granting initial access permission.
You need to install Flutter and Dart plugin in IDE and I assume that you have prior knowledge about the Flutter and Dart.
· A computer (desktop or laptop) running Windows 10.
· A Huawei phone (with the USB cable), which is used for debugging.
· Java JDK 1.7 or later.
· Android studio software or Visual Studio or Code installed.
· HMS Core (APK) 4.X or later.
Step 1: Create flutter project.
Step 2: Add the App level gradle dependencies. Choose inside project Android > app > build.gradle.
Root level gradle dependencies
Step 3: Add the below permissions in Android Manifest file.
Step 4: Download flutter plugins
Step 5: Add downloaded file into parent directory of the project. Declare plugin path in pubspec.yaml file under dependencies.
Add path location for asset image.
Let’s start coding
Tricks and Tips
- Make sure that downloaded plugin is unzipped in parent directory of project.
- Makes sure that agconnect-services.json file added.
- Make sure dependencies are added yaml file.
- Run flutter pug get after adding dependencies.
- Make sure that service is enabled in agc.
- Makes sure images are defined in yaml file.
In this article, we have learnt how to integrate Account Kit into Huawei StoryApp for flutter. Once Account kit integrated, users can login quickly and conveniently sign in to apps with their Huawei IDs after granting initial access permission.
Thank you so much for reading, I hope this article helps you to understand the Huawei Account kit in flutter.