Giter VIP home page Giter VIP logo

device_marketing_names's Introduction

Pub Version codecov GitHub Workflow Status GitHub likes popularity pub points

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.

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 forwarded directly from device_info_plus

Usage

Getting Started

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

dependencies:
  device_marketing_names: ^0.8.1

More information on pub.dev.

Examples

For full examples please see the example app. You can run the example app directly within the browser via Zapp!.

final deviceNames = DeviceMarketingNames();

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

// Get all marketing names of the device.
final deviceNames = await deviceMarketingNames.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 deviceNamesFromModel = 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.

device_marketing_names's People

Contributors

boehrsi avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.