Get started
This plugin relies on the Contentsquare native SDKs to log events.
It exposes a unified surface.
For more information, refer to the dedicated SDK docs:
Installation
Section titled InstallationAdd the contentsquare
package in your pubspec.yaml
:
dependencies: flutter: sdk: flutter
contentsquare: ^3.5.1
then run
flutter pub get
To ensure optimal compatibility, make sure you respect the iOS compatibility documentation.
Android
Section titled AndroidThe plugin works out of the box.
Start the SDK
Section titled Start the SDKYou do not need to do anything to start the SDK. Now that the SDK is a dependency of your app, it will autostart itself when your application starts.
Validate SDK integration
Section titled Validate SDK integrationLook at the native SDK docs for validation on each platform.
Note that iOS logs should be viewed through Console or Xcode.
Flutter Setup
Section titled Flutter SetupWrap the entire application inside the ContentsquareRoot
widget:
import 'package:flutter/material.dart';import 'package:contentsquare/contentsquare.dart';
void main() { runApp(const MyApp());}
class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return ContentsquareRoot( // <-- Wrap the entire app inside the ContentsquareRoot widget imported from 'package:contentsquare/contentsquare.dart' child: MaterialApp( title: 'My Flutter App', home: Home() ), ); }}