Flutter Integration
This guide will help you configure your Flutter app for ChottuLink Dynamic Links. You can complete this setup either during the initial onboarding or later from your project settings.
π Prerequisitesβ
Before integrating ChottuLink into your Flutter app, ensure you have the following:
Development Environmentβ
- Flutter SDK installed (Flutter
v3.3.0or later recommended) - Dart SDK installed (Dart
v3.1.0or later recommended) - A working Flutter project targeting iOS
15.0+and Android5.0+ (API 21+) - Xcode
16.2or later installed (for iOS) - Android Studio or other IDE with Android SDK installed
- Physical devices or simulators/emulators to run your app
- Git for version control
Dart v3.5.0 is supported starting from ChottuLink v1.0.11 and above.
π§ Configure ChottuLink Dashboardβ
1. For iOS - Click hereβ
2. For Android - Click hereβ
π¦ Installationβ
1. Add the latest ChottuLink SDK to your Flutter project:β
dependencies:
flutter:
sdk: flutter
chottu_link: ^1.0.19
Click here to get the latest version.β
2. Then run:β
flutter pub get
π±Platform Specific Configurationsβ
1. For iOSβ
Configure Associated Domainsβ
Associated Domains are configured to securely link your app with your website. Without this setup, features like Universal Links won't function properly, resulting in a less seamless user experience.
- Open your project in Xcode
- Select your project in the navigator
- Select your target under TARGETS
- Click on the "Signing & Capabilities" tab
- Click the "+" button in the top-left corner of the capabilities section
- Search for and select "Associated Domains"

- Add Your Domain
-
In the Associated Domains section that appears, click the "+" button under "Domains"
-
Add your domain using the following format:
applinks:your_dynamic_links_domainFor example, if your domain is
yourapp.chottu.link, you would add:applinks:yourapp.chottu.link
-
2. For Androidβ
Update Your App's Manifest Fileβ
Your app's AndroidManifest.xml file needs a couple of things:
- The internet permission (if you haven't added it already).
- To know which part of your app should open when a ChottuLink URL is clicked.
Here's how it might look. Make sure to change the highlighted parts!
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<!-- Add the highlighted lines in your manifest -->
<meta-data android:name="flutter_deeplinking_enabled" android:value="false"/>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<!-- Change "yourapp.chottu.link" to the special domain you set up for your ChottuLink URLs -->
<data
android:scheme="https"
android:host="yourapp.chottu.link"/>
</intent-filter>
</activity>
Remember to change:
yourapp.chottu.linkto the domain you've set up on ChottuLink Dashboard for your app's links.
π Initialize the ChottuLink SDKβ
Note: You can get the mobile SDK API KEY from ChottuLink Dashboard API Keys section
Initialize the SDK in main.dart:
import 'package:chottu_link/chottu_link.dart';
void main() async {
/// β οΈ Make sure to call this before call ChottuLink.init(apiKey: "your_api_key_here").
WidgetsFlutterBinding.ensureInitialized();
/// β
Initialize the ChottuLink SDK
/// Make sure to call this before using any ChottuLink features.
await ChottuLink.init(apiKey: "your_api_key_here");
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter ChottuLink Demo',
home: HomeScreen(),
);
}
}
β Next Stepsβ
After completing the Flutter setup: