FLUTTER ECOSYSTEM

Hina-Hussain/DeviceInformationPlugin

Hina-Hussain/DeviceInformationPlugin open-source repository details.

DeviceInformationPlugin 프로젝트 이미지
Stars
8
Forks
34
최근 푸시(UTC)
2023. 6. 14.
프로젝트 상태
활성
Hina Hussain GitHub avatar
GITHUB User

Hina Hussain ↗

I am a Mobile app developer(Android, Flutter) working in a software house since 2018. Developed multiple production-grade android and flutter apps.

Sapphire Consulting ServicesKarachi공식 웹사이트 ↗
언어SwiftDartJavaRubyObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 2 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

Device Information

A flutter plugin to get device information such as device IMEI number, model name, API level,CPU Type,Product Name etc for both android & iOS.

Installation

Add following dependency in pubspec.yaml file:

device_information:^0.0.4

Install by running:

$ flutter pub get 

Usage

import 'package:device_information/device_information.dart';

try {
      platformVersion = await DeviceInformation.platformVersion;
      imeiNo = await DeviceInformation.deviceIMEINumber;
      modelName = await DeviceInformation.deviceModel;
      manufacturer = await DeviceInformation.deviceManufacturer;
      apiLevel =  await DeviceInformation.apiLevel;
      deviceName = await DeviceInformation.deviceName;
      productName = await DeviceInformation.productName;
      cpuType = await DeviceInformation.cpuName;
      hardware = await DeviceInformation.hardware;
    } on PlatformException {
      platformVersion = 'Failed to get platform version.';
    }

In android add the following permission:

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

Then for API targetting from Marshmallow, need to request runtime permissions. Although in iOS there is no need to specify permissions.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Developer Team:

Hina Hussain & her team members (Kamran Khan, Abdul Sattar, Faiza Farooqui) :smile: :tada:

Follow me

https://hina-hussain-developer.medium.com/creating-publisher-account-on-the-pub-dev-cf86b91cd2f https://hinahussaindev.blogspot.com/2021/05/creating-publisher-account-on-pubdev.html

License

MIT