搜尋套件、儲存庫與 APP 分類

套件詳情v2.0.6

device_marketing_names

輕鬆查找 Android、iOS 和瀏覽器的裝置行銷名稱。無需網路連接或資料庫。

AndroidiOSWeb
近 30 天下載
4.3萬
喜歡數
46
Pub 分數
160

安裝套件

flutter pub add device_marketing_names

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個輕量級的 Flutter 套件,可在不需要網際網路連接或外部資料庫的情況下,輕鬆查找 Android、iOS 和 Web 瀏覽器的裝置行銷名稱。它根據使用者代理字串和系統屬性提供精確的裝置識別碼,非常適合用於分析、除錯或個人化使用者體驗。此套件自成一體且高效,確保跨平台的快速效能。

適用情境

  • 分析中的設備識別
  • 使用者體驗個人化
  • 除錯裝置特定問題
  • 在應用中顯示設備名稱
  • 相容性檢查

主要特色

  • 無需網路
  • 跨平台支援
  • 離線資料庫
  • 簡單 API
  • 準確的設備命名

適合對象

  • 分析整合
  • 開發者工具
  • 應用診斷
  • 面向使用者的裝置資訊
  • 跨平台應用

使用建議

  • 僅限已知設備
  • 不會動態更新
  • 依賴內建設備清單
  • 不適用於即時設備檢測
  • 可能會遺漏較新或小眾的設備

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Pub Version codecov GitHub Workflow Status GitHub likes pub downloads pub points Main

Device Marketing Names

A simple device name lookup package. Map e.g. 'iPhone13,4' to 'iPhone 12 Pro Max' or 'SM-G980F' to 'Galaxy S20'. No internet connection or database required.

Open in IDX

Features

  • Lookup Android marketing names
  • Lookup iOS (iPhone & iPad) marketing names
  • Lookup web browser names
  • Get the marketing name of the current device or by an already known Android or iOS model
  • Relies on device_info_plus to get the current device model information on Android or iOS and device_identifiers which maps those to the marketing names
  • The browser name is mapped via web and prettified within this library

Usage

Getting Started

Add this to your package's pubspec.yaml file:

dependencies:
  device_marketing_names: ^2.0.3

More information on pub.dev.

Examples

For full examples please see the example app.

final deviceNames = DeviceMarketingNames();

// Get one marketing name of the device.
final singleDeviceName = await deviceNames.getSingleName();

// Get all marketing names of the device.
final allDeviceNames = await deviceNames.getNames();

// Get one marketing name for the given model.
final singleDeviceNameFromModel = deviceNames.getSingleNameFromModel(DeviceType.android, "ONEPLUS A5010");

// Get all marketing names for the given model.
final allDeviceNamesFromModel = deviceNames.getNamesFromModel(DeviceType.android, "ONEPLUS A5010");
Migration from 0.3.0 to 0.4.0
  • Replace getMarketingName() with getSingleName() if you want to get exactly one matching name.
  • Replace getMarketingName() with getNames() if you want all matching names as a single string. Names are separated by " / ".
  • Replace getMarketingNameFromModel() with getSingleNameFromModel() if you want to get exactly one matching name.
  • Replace getMarketingNameFromModel() with getNamesFromModel() if you want all matching names as a single string. Names are separated by " / ".

How to contribute

If you are interested in contributing, please have a look into the contribution guide. Every idea, bug report or line of code is heavily appreciated.

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案