native_id 0.0.5 copy "native_id: ^0.0.5" to clipboard
native_id: ^0.0.5 copied to clipboard

Get unique identifier for android and iOS

NativeId Plugin (Android, iOS) #

Pub Version License: MIT

Get current device unique id from within the flutter application.

Warning: In android, this plugin use the ANDROID_ID that can be change by user for the rooted device.

Installation 💻 #

❗ In order to start using native_id you must have the Flutter SDK installed on your machine.

Add native_id to your pubspec.yaml:

dependencies:
  native_id:

Install it:

flutter packages get

Usage #

Import import 'package:native_id/native_id.dart';, instantiate NativeId and use the getId() or getUUID() methods.

Example:

Future<String> getNativeId() async {
    final nativeIdPlugin = NativeId();
    try {
      final nativeId = await nativeIdPlugin.getId();
      return nativeId ?? 'Unknown native id';
    } on PlatformException {
      return 'Failed to get nativeId';
    }
}
2
likes
130
pub points
70%
popularity
screenshot

Publisher

verified publishermixin27.blogspot.com

Get unique identifier for android and iOS

Repository (GitHub)
View/report issues

Topics

#imei #unique-identifier #utility

Documentation

API reference

Funding

Consider supporting this project:

www.buymeacoffee.com

License

MIT (LICENSE)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on native_id