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

Library for translating Apple machine identifiers into Apple product names (e.g. 'iPhone17,1' to 'iPhone 16 Pro')

apple_product_name #

pub package pub points pub popularity flutter ci

Library for translating Apple machine identifiers into Apple product names (e.g. iPhone17,1 to iPhone 16 Pro)

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';
import 'package:device_info_plus/device_info_plus.dart';

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

Or you can use AppleProductName class directly without device_info_plus package.

AppleProductName().lookup('iPad16,5')
// iPad Pro 13-inch (M4)
copied to clipboard

Source #

26
likes
160
points
28.6k
downloads

Publisher

unverified uploader

Weekly Downloads

2024.08.27 - 2025.03.11

Library for translating Apple machine identifiers into Apple product names (e.g. 'iPhone17,1' to 'iPhone 16 Pro')

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

device_info_plus, flutter

More

Packages that depend on apple_product_name