device_name 0.0.2 copy "device_name: ^0.0.2" to clipboard
device_name: ^0.0.2 copied to clipboard

outdated

A Flutter package for getting device name from device identifier.

device_name #

A Flutter package for getting device name from device identifier.

Getting Started #

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  flutter:
    sdk:
  device_name: ^{latest_version}

In your library add the following import:

import 'package:device_name/device_name.dart';

Usage #

Import package:device_name/device_name.dart, instantiate DeviceName and use iOS getters to get device name.

You can get the device identifier from device_info. Get utsname.machine from iosInfo.

import 'package:device_name/device_name.dart';

void main() {
  final identifier = 'iPhone13,4';

  final deviceName = DeviceName();
  final generation = deviceName.ios(identifier);

  print('device name is $generation');
  // device name is iPhone 12 Pro Max
}

Reference #

Models - The iPhone Wiki

13
likes
0
pub points
84%
popularity

Publisher

unverified uploader

A Flutter package for getting device name from device identifier.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on device_name