developerpact 0.1.1 copy "developerpact: ^0.1.1" to clipboard
developerpact: ^0.1.1 copied to clipboard

PlatformAndroid

Closed-testing engagement reporter for developerpact.com. Reports a random install id and daily foreground seconds for testers paired through the platform; ordinary users generate no traffic. Android only.

example/lib/main.dart

import 'package:developerpact/developerpact.dart';
import 'package:flutter/material.dart';

void main() {
  // The whole integration: one line, before runApp. It returns at once and
  // never throws; the Future is only awaited here to show the status on screen.
  final status = DeveloperPact.start();
  runApp(ExampleApp(status: status));
}

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key, required this.status});

  final Future<DeveloperPactStatus> status;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'developerpact example',
      home: Scaffold(
        appBar: AppBar(title: const Text('developerpact example')),
        body: Center(
          child: FutureBuilder<DeveloperPactStatus>(
            future: status,
            builder: (context, snapshot) {
              final s = snapshot.data;
              return Column(
                mainAxisSize: MainAxisSize.min,
                children: [
                  Text(
                    s == null ? 'starting…' : s.name,
                    style: Theme.of(context).textTheme.headlineMedium,
                  ),
                  const SizedBox(height: 12),
                  Text(switch (s) {
                    DeveloperPactStatus.paired =>
                      'This install reports daily foreground time.',
                    DeveloperPactStatus.notPaired =>
                      'Not paired: nothing is sent. Open a testing link or '
                          'tap Pair on developerpact.com to pair.',
                    DeveloperPactStatus.unsupported =>
                      'Not Android: the SDK does nothing here.',
                    null => '',
                  }, textAlign: TextAlign.center),
                  const SizedBox(height: 24),
                  Text(
                    'Supported on this platform: ${DeveloperPact.isSupported}',
                    style: Theme.of(context).textTheme.bodySmall,
                  ),
                ],
              );
            },
          ),
        ),
      ),
    );
  }
}
0
likes
150
points
0
downloads

Documentation

API reference

Publisher

verified publisherdeveloperpact.com

Weekly Downloads

Closed-testing engagement reporter for developerpact.com. Reports a random install id and daily foreground seconds for testers paired through the platform; ordinary users generate no traffic. Android only.

Homepage
Repository (GitHub)
View/report issues

Topics

#google-play #closed-testing #android #analytics

License

MIT (license)

Dependencies

flutter

More

Packages that depend on developerpact

Packages that implement developerpact