Let's integrate UIKit Plugin for Flutter
Mirrorfly Flutter UIKit Plugin is a set of prebuilt UI Widgets that allows you to easily integrate an in-app chat with all the essential messaging features. Our development kit includes light and dark themes, text fonts, colors and more. You can customize these components to create an interactive messaging unique interface.
The requirements for Android are:
- Android Lollipop 5.0 (API Level 21) or above
- Java 7 or higher
- Gradle 4.1.0 or higher
The minimum requirements for Chat SDK for iOS
- iOS 12.1 or later
#Things to be Noted Before Making a Start
#Mirrorfly License Key
Note : Before proceeding with CONTUS MirrorFly Flutter UIKit Plugin integration, there must be an SDK license key that needs to be obtained for your MirrorFly application.
#To get the License Key,
Step 1: Sign up for a MirrorFly Account
Step 2: Log into your Account
Step 3: Get the License key from the
application Info’ section
#Create Android dependency
Step 4 : Add the following to your root
build.gradle file in your Android folder.
#Create iOS dependency
Step 5: Check and Add the following code at end of your
Step 6: Now, enable all the below mentioned capabilities into your project.
#Create Flutter dependency
Step 7: Add the below dependencies in
STEP 8: Run
flutter pub get command in your project directory. You can use all classes and methods just with the following import statement
#Initialize MirrorFly UIKit Plugin
To initialize the plugin, place the below code in your
main.dart file inside
main function before
Use the below method to register a user in sandbox Live mode.
Unless you log out the session, make a note that should never call the registration method more than once in an application
Some of the most common terminologies used in Chat SDK with description
|userID/userBareID||Unique ID assigned for each user Ex: 12345678 (any alphanumeric). The below characters is not allowed in userId: U+0022 (") U+0026 (&) U+0027 (') U+002F (/) U+003A (:) U+003C (<) U+003E (>) U+0040 (@) userID should follow below specification: https://xmpp.org/extensions/xep-0106.html|
|userJid (or) JID||userID+@+domain of the chat server Ex. firstname.lastname@example.org|
|groupID/groupBareID||Unique ID assigned for each group Ex: group123456 (any alphanumeric). GroupJID = groupID +@mix.+domain of the chat server Ex: email@example.com`|
#Display Recent Chat list
Recent Chat Widget is the starting point for launching Flutter UIKit in your application. By implementing the code below, you will see a complete list of recent chats that you're made with single and group conversation.
Note : Use
Recent Chat Widgetonly when you have done the registration.
Note : You can also navigate to
Recent Chat Pageusing below code.
Note : Great!!! We are now end of the Quick Start section. For Advanced with various module navigation. Click Here