device_helper 0.0.1 copy "device_helper: ^0.0.1" to clipboard
device_helper: ^0.0.1 copied to clipboard

PlatformAndroid

A flutter plugin to help you get the device's info. Only Android.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:device_helper/device_helper.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    _printMethodResult();
  }

  _printMethodResult() async {
    debugPrint('checkGPSIsOpen:' + (await DeviceHelper.checkGPSIsOpen()).toString());
    debugPrint('getAndroidId:' + await DeviceHelper.getAndroidId());
    debugPrint('getAvailableInternalMemorySize:' + await DeviceHelper.getAvailableInternalMemorySize());
    debugPrint('getTotalInternalMemorySize:' + await DeviceHelper.getTotalInternalMemorySize());
    debugPrint('isSDCardMount:' + (await DeviceHelper.isSDCardMount()).toString());
    debugPrint('getSystemLanguage:' + await DeviceHelper.getSystemLanguage());
    debugPrint('hasExtraSD:' + (await DeviceHelper.hasExtraSD()).toString());
    debugPrint('getIMEI:' + await DeviceHelper.getIMEI());
    debugPrint('getDeviceId:' + await DeviceHelper.getDeviceId());
    debugPrint('getIPAddress:' + await DeviceHelper.getIPAddress());
    debugPrint('getMac:' + await DeviceHelper.getMac());
    debugPrint('deviceBrand:' + await DeviceHelper.deviceBrand());
    debugPrint('deviceType:' + await DeviceHelper.deviceType());
    debugPrint('getAvailableRAM:' + await DeviceHelper.getAvailableRAM());
    debugPrint('getTotalRAM:' + await DeviceHelper.getTotalRAM());
    debugPrint('isRoot:' + (await DeviceHelper.isRoot()).toString());
    debugPrint('sdkVersion:' + await DeviceHelper.sdkVersion());
    debugPrint('getSerial:' + await DeviceHelper.getSerial());
    debugPrint('getSystemVersion:' + await DeviceHelper.getSystemVersion());
    debugPrint('getSimOperator:' + await DeviceHelper.getSimOperator());
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Container(),
      ),
    );
  }
}
1
likes
130
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter plugin to help you get the device's info. Only Android.

Homepage

Documentation

API reference

License

unknown (license)

Dependencies

flutter

More

Packages that depend on device_helper

Packages that implement device_helper