Skip to main content

Flutter Installation

Add the Lovina Chat SDK to your Flutter project. The SDK requires Flutter 3.29.2+ and Dart 3.7.0+. See Compatibility for the full version matrix.

1. Download the SDK

The SDK is hosted on a private Nexus pub repository. Add it to your pubspec.yaml using the hosted syntax:

dependencies:
flutter:
sdk: flutter
lovina_chat_sdk:
hosted:
name: lovina_chat_sdk
url: https://packages.ailovina.com/repository/pub-releases/
version: ^{version}

Authenticate with the Repository

Before running flutter pub get, add your credentials to the Nexus repository once:

dart pub token add https://packages.ailovina.com/repository/pub-releases/

When prompted, enter your token — the base64-encoded form of username:password:

# Generate your token
echo -n "your-username:your-password" | base64

Paste the output as the token. The credential is stored locally in ~/.pub-cache/ and reused on future runs.

Then install:

flutter pub get

CI/CD Authentication

Add this step before flutter pub get in your pipeline:

- name: Authenticate with Nexus
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: |
TOKEN=$(echo -n "$NEXUS_USERNAME:$NEXUS_PASSWORD" | base64 -w 0)
echo "$TOKEN" | dart pub token add https://packages.ailovina.com/repository/pub-releases/

Platform-Specific Setup

Android

Add the Internet permission in android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />

iOS

The SDK uses HTTPS by default, so no additional setup is needed. For local development with HTTP, add the following to ios/Runner/Info.plist:

<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
caution

Only disable App Transport Security for local development. Always use HTTPS in production.

Requirements

RequirementMinimum
Flutter SDK3.29.2+
Dart SDK3.7.0+ (bundled with Flutter 3.29.2)
Android (via Flutter plugin)API 24
iOS (via Flutter plugin)15.0

Verify Installation

Import the SDK in any Dart file to confirm the installation:

import 'package:lovina_chat_sdk/lovina_chat_sdk.dart';

Run your app. If it compiles without errors, the SDK is installed.

Next Steps

Once installed, head to Usage to embed the chat widget in your app.