flutter_device_name

Last updated:

0 purchases

flutter_device_name Image
flutter_device_name Images
Add to Cart

Description:

flutter device name

flutter_device_name #
A Flutter for retrieving the user's defined device name. Currently works only on Android. iOS support is planned.
Getting Started #
In the pubspec.yaml of your flutter project, add the following dependency:
dependencies:
...
flutter_device_name: ^{latest_version}
copied to clipboard
In your library add the following import:
import 'package:flutter_device_name/flutter_device_name.dart';
copied to clipboard
Usage #
Import package:flutter_device_name/flutter_device_name.dart, instantiate DeviceName and use the getName() function.
import 'package:device_name/device_name.dart';

Future<void> main() async {
final plugin = DeviceName();
final deviceName = await plugin.getName();

print('Device name: ${deviceName ?? 'Unknown'}');
// Device name: Feliphe's Galaxy S20
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.