Install the Flutter SDK on your app
Get started with the MarkTag flutter SDK
- From the root of your project, run the following command to install the sdk:
bash
flutter pub add marktagbash
dart pub add marktagOr, you can manually add it from https://pub.dev/packages/marktag
- Once installed, you can access the MarkTag SDK plugin by importing it in your code:
dart
import 'package:marktag/marktag.dart';- Initialize MarkTag SDK (before runApp):
dart
void main() {
WidgetsFlutterBinding.ensureInitialized(); // Add this line
Marktag.instance.init(tag: 'test-tag.website.com', enableLogging: true); // If you want to disable logs, set `enableLogging` to false
runApp(const MyApp());
}Done! You are now able to log events with MarTag