Skip to main content

flutter_imin_device 0.0.2 copy "flutter_imin_device: ^0.0.2" to clipboard
flutter_imin_device: ^0.0.2 copied to clipboard

PlatformAndroid

A Flutter plugin for retrieving device information from iMin POS devices.

example/lib/main.dart

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

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

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

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

class _MyAppState extends State<MyApp> {
  String? serialNumber;
  String? deviceModel;
  String? deviceBrand;

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

  void _getDeviceInfo() async {
    final sn = await FlutterIminDevice.serialNumber;
    final dm = await FlutterIminDevice.deviceModel;
    final db = await FlutterIminDevice.deviceBrand;
    setState(() {
      serialNumber = sn;
      deviceModel = dm;
      deviceBrand = db;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Flutter Imin Device Info'), centerTitle: true,),
        body: SizedBox(
          width: double.infinity,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Text(
                "Serial Number : $serialNumber"
              ),
              Text(
                "Device Model : $deviceModel"
              ),
              Text(
                "Device Brand : $deviceBrand"
              )
            ],
          ),
        ),
      ),
    );
  }
}
2
likes
145
points
127
downloads

Documentation

API reference

Publisher

verified publisherherrynur.net

Weekly Downloads

A Flutter plugin for retrieving device information from iMin POS devices.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_imin_device

Packages that implement flutter_imin_device