apple_product_name 1.0.1 copy "apple_product_name: ^1.0.1" to clipboard
apple_product_name: ^1.0.1 copied to clipboard

outdated

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

apple_product_name #

pub package

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

iOS macOS
ios image macos 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';

if (Platform.isIOS) {
  final info = await DeviceInfoPlugin().iosInfo;
  info.utsname.machine     // "iPhone13,2"
  info.utsname.productName // "iPhone 12"
} else if (Platform.isMacOS) {
  final info = await DeviceInfoPlugin().macOsInfo;
  info.model       // "iMac21,1"
  info.productName // "iMac (24-inch, M1, 2021)"
}

Also, you can use without device_info_plus package dependency.

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

Sources #

19
likes
0
pub points
95%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

device_info_plus, flutter

More

Packages that depend on apple_product_name