apple_product_name 1.3.1 icon indicating copy to clipboard operation
apple_product_name: ^1.3.1 copied to clipboard

Library for translation apple device identifier to product name (e.g. 'iPhone13,2' to 'iPhone 12')

apple_product_name #

pub package pub points device_info_plus

Library for translating Apple machine identifiers into Apple product names (e.g. iPhone15,2 to iPhone 14 Pro)

iOSmacOS
ios imagemacos image

Usage #

Translates machine id to product name.

You can use this package with device_info_plus package.

import 'package:apple_product_name/apple_product_name.dart';
import 'package:device_info_plus/device_info_plus.dart';

if (Platform.isIOS) {
  final info = await DeviceInfoPlugin().iosInfo;
  print(info.utsname.machine);      // "iPhone15,2"
  print(info.utsname.productName);  // "iPhone 14 Pro"
} else if (Platform.isMacOS) {
  final info = await DeviceInfoPlugin().macOsInfo;
  print(info.model);        // "Mac14,2"
  print(info.productName);  // "MacBook Air (M2, 2022)"
}

Also, you can use without device_info_plus package dependency.

AppleProductName().lookup('iPad13,10')
// iPad Pro 5th Gen (12.9 inch, WiFi+Cellular)

Sources #

6
likes
140
pub points
82%
popularity

Publisher

unverified uploader

Library for translation apple device identifier to product name (e.g. 'iPhone13,2' to 'iPhone 12')

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

device_info_plus, flutter

More

Packages that depend on apple_product_name