device_info_app 1.0.1 copy "device_info_app: ^1.0.1" to clipboard
device_info_app: ^1.0.1 copied to clipboard

A comprehensive Flutter plugin for retrieving detailed device and application information across Android and iOS platforms.

example/lib/main.dart

import 'dart:async';

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

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

class MyApp extends StatefulWidget {
  const MyApp({super.key});

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

class _MyAppState extends State<MyApp> {
  final _deviceInfoApp = DeviceInfoApp();
  DeviceInfo? _deviceInfo;

  @override
  void initState() {
    super.initState();
    _loadDeviceInfo();
  }

  Future<void> _loadDeviceInfo() async {
    try {
      final deviceInfo = await _deviceInfoApp.getDeviceInfo();
      setState(() {
        _deviceInfo = deviceInfo;
      });
    } catch (e) {
      print('Error getting device info: $e');
    }
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('Device Info')),
        body: _deviceInfo == null
            ? Center(child: CircularProgressIndicator())
            : Padding(
                padding: EdgeInsets.all(16.0),
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Text('App Version: ${_deviceInfo!.versionNumber}'),
                    Text('Build Number: ${_deviceInfo!.buildNumber}'),
                    Text('App Name: ${_deviceInfo!.displayName}'),
                    Text('Bundle ID: ${_deviceInfo!.bundleName}'),
                    Text('Device UUID: ${_deviceInfo!.uuid}'),
                    Text('Locales: ${_deviceInfo!.locales}'),
                    Text('Time Zone: ${_deviceInfo!.timeZone}'),
                    Text('Country Code: ${_deviceInfo!.alphaCode}'),
                    Text('Language: ${_deviceInfo!.localeApp.languageCode}'),
                    Text('availableRamSize: ${_deviceInfo!.availableRamSize}'),
                    Text('physicalRamSize: ${_deviceInfo!.physicalRamSize}'),
                    Text('isLowRamDevice: ${_deviceInfo!.isLowRamDevice}'),
                    Text('totalRam: ${_deviceInfo!.totalRam}'),
                  ],
                ),
              ),
      ),
    );
  }
}
0
likes
140
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter plugin for retrieving detailed device and application information across Android and iOS platforms.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on device_info_app

Packages that implement device_info_app