flutter_phoneinfo 0.1.0
flutter_phoneinfo: ^0.1.0 copied to clipboard

A new Flutter plugin.

flutter_phoneinfo #

A new Flutter plugin.

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

[Usage] Import package:flutter_phoneinfo/flutter_phoneinfo.dart, instantiate PhonePlug and use the Android and iOS getters to get platform-specific device information.


Example: #

import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter_phoneinfo/flutter_phoneinfo.dart';

void main() => runApp(new MyApp());

class MyApp extends StatefulWidget {
  _MyAppState createState() => new _MyAppState();

class _MyAppState extends State<MyApp> {
  String _deviceid = 'Unknown';

  void initState() {

  Future<void> initDeviceId() async {
    String deviceid;

    deviceid = await FlutterPhoneinfo.getIdentifier;
   String mac=await FlutterPhoneinfo.getMac;
   String uuid=await FlutterPhoneinfo.getUUID;
    if (!mounted) return;

    setState(() {
      _deviceid = 'deviceid:  $deviceid';

  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: const Text('Device Id example app'),
        body: new Center(
          child: new Text('$_deviceid'),