apple_product_name 1.0.0 copy "apple_product_name: ^1.0.0" to clipboard
apple_product_name: ^1.0.0 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 #

25
likes
0
pub points
96%
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