unique_identifier_3 0.0.1 copy "unique_identifier_3: ^0.0.1" to clipboard
unique_identifier_3: ^0.0.1 copied to clipboard

A Flutter plugin for retrieving a device's unique identifier across Android and iOS platforms. On Android, this plugin accesses the `ANDROID_ID`, providing a unique ID scoped to the app's signing key, [...]

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  var serial = "";
  @override
  void initState() {
    super.initState();
    getSerial();
  }

  void getSerial() async {
    serial = await UniqueIdentifier.serial ?? '';
    setState(() {});
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on: $serial\n'),
        ),
      ),
    );
  }
}
3
likes
140
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for retrieving a device's unique identifier across Android and iOS platforms. On Android, this plugin accesses the `ANDROID_ID`, providing a unique ID scoped to the app's signing key, user, and device combination. On iOS, it uses `identifierForVendor`, a unique ID associated with the app's vendor. This plugin helps developers track devices in a secure and privacy-compliant manner.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on unique_identifier_3