myappcrew_flutter 0.1.2 copy "myappcrew_flutter: ^0.1.2" to clipboard
myappcrew_flutter: ^0.1.2 copied to clipboard

MyAppCrew Flutter SDK for bootstrapping testers, tracking screens, and batching events.

MyAppCrew Flutter SDK #

A tiny Flutter SDK to bootstrap tester sessions, queue events, auto-track screens, and flush batches safely.

Install (pub.flutter-io.cn) #

flutter pub add myappcrew_flutter

Install (path dependency) #

Option A: path dependency

dependencies:
  myappcrew_flutter:
    path: ../myappcrew_flutter_sdk/packages/myappcrew_flutter

Minimal usage #

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  final result = await MyAppCrew.initialize(
    publicKey: 'YOUR_PUBLIC_KEY',
    baseUrl: 'https://api.myappcrew.com',
  );

  runApp(
    MaterialApp(
      navigatorObservers: [
        MyAppCrew.navigatorObserver(),
      ],
      home: const MyHomePage(),
    ),
  );

  if (result.ok) {
    MyAppCrew.logEvent('button_click', properties: {
      'label': 'Subscribe',
    });
    await MyAppCrew.flushNow();
  }
}

Invite claim usage #

final result = await MyAppCrew.initialize(
  publicKey: 'YOUR_PUBLIC_KEY',
  baseUrl: 'https://api.myappcrew.com',
  inviteId: 'YOUR_INVITE_ID',
  nickname: 'Ada Lovelace',
  email: 'ada@example.com',
);

Configuration via --dart-define #

flutter run -d <device> \
  --dart-define=MYAPPCREW_BASE_URL=https://myappcrew-tw.pages.dev \
  --dart-define=MYAPPCREW_PUBLIC_KEY=com.test_app.test \
  --dart-define=MYAPPCREW_INVITE_ID=invite_123

Data sent #

  • name
  • ts (seconds)
  • screen
  • sessionId
  • properties

Notes #

  • baseUrl is required and must not assume localhost.
  • ingestUrl comes from the bootstrap response and may change server-side.
  • All event timestamps use UNIX seconds (10-digit).
  • Retries use small backoff; no infinite loops.
  • SDK is best-effort and should not crash the host app.

Example app #

An example app is available under example/.

cd example
flutter pub get
flutter run -d <device> \
  --dart-define=MYAPPCREW_BASE_URL=https://myappcrew-tw.pages.dev \
  --dart-define=MYAPPCREW_PUBLIC_KEY=com.test_app.test
0
likes
0
points
426
downloads

Publisher

unverified uploader

Weekly Downloads

MyAppCrew Flutter SDK for bootstrapping testers, tracking screens, and batching events.

Homepage
Repository (GitHub)
View/report issues

Topics

#analytics #testing #telemetry #flutter

License

unknown (license)

Dependencies

device_info_plus, flutter, http, package_info_plus, shared_preferences, uuid

More

Packages that depend on myappcrew_flutter