├── .github └── workflows │ ├── flutter.yml │ └── release.yml ├── .gitignore ├── .metadata ├── .travis.yml ├── .vscode └── settings.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── mixpanel │ └── mixpanel_flutter │ ├── MixpanelFlutterHelper.java │ ├── MixpanelFlutterPlugin.java │ └── MixpanelMessageCodec.java ├── assets └── mixpanel.js ├── docs ├── __404error.html ├── categories.json ├── index.html ├── index.json ├── mixpanel_flutter │ ├── Mixpanel-class.html │ ├── Mixpanel │ │ ├── Mixpanel.html │ │ ├── addGroup.html │ │ ├── alias.html │ │ ├── clearSuperProperties.html │ │ ├── deleteGroup.html │ │ ├── eventElapsedTime.html │ │ ├── flush.html │ │ ├── getDistinctId.html │ │ ├── getGroup.html │ │ ├── getPeople.html │ │ ├── getSuperProperties.html │ │ ├── hasOptedOutTracking.html │ │ ├── identify.html │ │ ├── init.html │ │ ├── optInTracking.html │ │ ├── optOutTracking.html │ │ ├── registerSuperProperties.html │ │ ├── registerSuperPropertiesOnce.html │ │ ├── removeGroup.html │ │ ├── reset.html │ │ ├── setGroup.html │ │ ├── setLoggingEnabled.html │ │ ├── setServerURL.html │ │ ├── setUseIpAddressForGeolocation.html │ │ ├── timeEvent.html │ │ ├── track.html │ │ ├── trackWithGroups.html │ │ └── unregisterSuperProperty.html │ ├── MixpanelGroup-class.html │ ├── MixpanelGroup │ │ ├── MixpanelGroup.html │ │ ├── remove.html │ │ ├── set.html │ │ ├── setOnce.html │ │ ├── union.html │ │ └── unset.html │ ├── People-class.html │ ├── People │ │ ├── People.html │ │ ├── append.html │ │ ├── clearCharges.html │ │ ├── deleteUser.html │ │ ├── increment.html │ │ ├── remove.html │ │ ├── set.html │ │ ├── setOnce.html │ │ ├── trackCharge.html │ │ ├── union.html │ │ └── unset.html │ └── mixpanel_flutter-library.html └── static-assets │ ├── favicon.png │ ├── github.css │ ├── highlight.pack.js │ ├── play_button.svg │ ├── readme.md │ ├── script.js │ ├── styles.css │ └── typeahead.bundle.min.js ├── example ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── mixpanel_example │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Podfile │ ├── Podfile.lock │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ ├── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ │ └── LaunchImage.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ └── README.md │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h │ └── RunnerTests │ │ └── RunnerTests.swift ├── lib │ ├── analytics.dart │ ├── event.dart │ ├── gdpr.dart │ ├── group.dart │ ├── main.dart │ ├── profile.dart │ └── widget.dart ├── pubspec.lock ├── pubspec.yaml ├── test │ └── widget_test.dart └── web │ ├── favicon.png │ ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png │ ├── index.html │ └── manifest.json ├── ios ├── .gitignore ├── Assets │ └── .gitkeep ├── Classes │ ├── MixpanelFlutterPlugin.h │ ├── MixpanelFlutterPlugin.m │ ├── MixpanelTypeHandler.swift │ └── SwiftMixpanelFlutterPlugin.swift └── mixpanel_flutter.podspec ├── lib ├── codec │ └── mixpanel_message_codec.dart ├── mixpanel_flutter.dart ├── mixpanel_flutter_web.dart └── web │ └── mixpanel_js_bindings.dart ├── local.properties ├── mixpanel_flutter.iml ├── pubspec.lock ├── pubspec.yaml ├── test ├── mixpanel_flutter_test.dart └── mixpanel_flutter_web_unit_test.dart └── tool └── release.py /.github/workflows/flutter.yml: -------------------------------------------------------------------------------- 1 | name: Mixpanel Flutter SDK CI 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | branches: [main] 8 | 9 | jobs: 10 | test-main-code: 11 | runs-on: macos-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | - uses: actions/setup-java@v1 15 | with: 16 | java-version: "12.x" 17 | - uses: subosito/flutter-action@v1 18 | with: 19 | flutter-version: "3.16.0" 20 | - run: flutter pub get 21 | - run: flutter test 22 | - run: flutter analyze --no-pub --no-current-package lib 23 | 24 | test-android-integration: 25 | runs-on: macos-13 26 | steps: 27 | - uses: actions/checkout@v4 28 | - uses: actions/setup-java@v4 29 | with: 30 | java-version: "17" 31 | distribution: 'temurin' 32 | - uses: subosito/flutter-action@v1 33 | with: 34 | flutter-version: "3.16.0" 35 | - name: Test Android integration 36 | working-directory: example 37 | run: flutter build apk 38 | 39 | test-ios-integration: 40 | runs-on: macos-latest 41 | steps: 42 | - uses: actions/checkout@v4 43 | - uses: actions/setup-java@v4 44 | with: 45 | java-version: "17" 46 | distribution: 'temurin' 47 | - uses: subosito/flutter-action@v1 48 | with: 49 | flutter-version: "3.16.0" 50 | - name: Clean 51 | working-directory: example 52 | run: flutter clean 53 | - name: Flutter pub get 54 | working-directory: example 55 | run: flutter pub get 56 | - name: CocoaPods update 57 | working-directory: example/ios 58 | run: pod repo update 59 | - name: Test iOS integration 60 | working-directory: example 61 | run: flutter build ios --debug --simulator --no-codesign 62 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Create release 2 | 3 | on: 4 | push: 5 | tags: 6 | - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 7 | 8 | jobs: 9 | build: 10 | name: "🚀 Release" 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: "Check-out" 14 | uses: actions/checkout@v1 15 | - name: "Update Release CHANGELOG" 16 | id: update-release-changelog 17 | uses: heinrichreimer/github-changelog-generator-action@v2.2 18 | with: 19 | token: ${{ secrets.GITHUB_TOKEN }} 20 | onlyLastTag: true 21 | stripHeaders: false 22 | base: "CHANGELOG.md" 23 | headerLabel: "# Changelog" 24 | breakingLabel: '### Breaking' 25 | enhancementLabel: '### Enhancements' 26 | stripGeneratorNotice: true 27 | bugsLabel: '### Fixes' 28 | issues: false 29 | issuesWoLabels: false 30 | pullRequests: true 31 | prWoLabels: true 32 | author: false 33 | verbose: true 34 | - name: Commit CHANGELOG Changes 35 | run: | 36 | git add . 37 | git config user.name "zihe.jia" 38 | git config user.email "zihe.jia@mixpanel.com" 39 | git commit -m "Update CHANGELOG" 40 | - name: Push CHANGELOG changes 41 | uses: ad-m/github-push-action@v0.6.0 42 | with: 43 | github_token: ${{ secrets.GITHUB_TOKEN }} 44 | branch: main 45 | force: true 46 | - name: "Prepare for the Github Release" 47 | id: generate-release-changelog 48 | uses: heinrichreimer/github-changelog-generator-action@v2.2 49 | with: 50 | token: ${{ secrets.GITHUB_TOKEN }} 51 | output: "output.md" 52 | headerLabel: "# Changelog" 53 | onlyLastTag: true 54 | stripHeaders: false 55 | breakingLabel: '### Breaking' 56 | enhancementLabel: '### Enhancements' 57 | stripGeneratorNotice: true 58 | bugsLabel: '### Fixes' 59 | issues: false 60 | issuesWoLabels: false 61 | pullRequests: true 62 | prWoLabels: true 63 | author: false 64 | verbose: true 65 | - name: "🚀 Create GitHub Release" 66 | uses: actions/create-release@v1 67 | env: 68 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 69 | with: 70 | tag_name: ${{ github.ref }} 71 | release_name: Release ${{ github.ref }} 72 | body: ${{ steps.generate-release-changelog.outputs.changelog }} 73 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | .idea/workspace.xml 4 | .packages 5 | .pub/ 6 | .idea 7 | build/ 8 | .cxx 9 | CLAUDE.md -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 78910062997c3a836feee883712c241a5fd22983 8 | channel: stable 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: dart 2 | dart: 3 | - stable 4 | os: 5 | - linux 6 | sudo: false 7 | addons: 8 | apt: 9 | sources: 10 | - ubuntu-toolchain-r-test 11 | packages: 12 | - libstdc++6 13 | - fonts-droid-fallback 14 | before_script: 15 | - git clone https://github.com/flutter/flutter.git -b beta 16 | - ./flutter/bin/flutter doctor 17 | script: 18 | - cd $TRAVIS_BUILD_DIR 19 | - flutter packages get 20 | - flutter analyze --no-pub --no-current-package lib 21 | - flutter test 22 | - flutter packages pub publish --dry-run 23 | branches: 24 | only: 25 | - master 26 | cache: 27 | directories: 28 | - $HOME/.pub-cache -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.compile.nullAnalysis.mode": "automatic", 3 | "java.configuration.updateBuildConfiguration": "interactive" 4 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |