I installed the following pub-dev package: https://pub.dev/packages/amplitude_flutter
Amplitude has a flutter SDK and a flutter package, allowing the app to send events to the Amplitude server.
I want to execute it within a custom action so that I can send events when the users perform specific actions.
Here is the code. IDE errors include:
Error: 'Amplitude' is imported from both 'package:amplitude_flutter/amplitude.dart' and 'package:amplitude_flutter/web/amplitude_js.dart
Error: Can't assign to the final variable 'analytics'.
analytics = Amplitude.getInstance(instanceName: "Assembly");
For me, i used the following snippet:
This is basically the event name, but we want to send a custom info or properties inside of it, so we need to use Identity like following:
Then we will attach any kind of information we want.