Last updated:
0 purchases
native id
NativeId Plugin (Android, iOS) #
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:
copied to clipboard
Install it:
flutter packages get
copied to clipboard
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';
}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.