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

PlatformAndroid

A Flutter plugin for controlling cash drawers connected to IMIN POS devices.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: CashDrawerPage(),
    );
  }
}

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

  @override
  _CashDrawerPageState createState() => _CashDrawerPageState();
}

class _CashDrawerPageState extends State<CashDrawerPage> {
  String drawerStatus = 'Unknown';

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Cash Drawer Control'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text('Drawer Status: $drawerStatus'),
            const SizedBox(height: 20),
            ElevatedButton(
              onPressed: () async {
                final status = await IminCashDrawer.drawerStatus;
                setState(() {
                  drawerStatus = status;
                });
              },
              child: const Text('Check Drawer Status'),
            ),
            const SizedBox(height: 20),
            ElevatedButton(
              onPressed: () async {
                await IminCashDrawer.openDrawer;
              },
              child: const Text('Open Drawer'),
            ),
          ],
        ),
      ),
    );
  }
}
2
likes
160
points
21
downloads

Publisher

verified publishershuklashrestha.com.np

Weekly Downloads

A Flutter plugin for controlling cash drawers connected to IMIN POS devices.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on imin_cash_drawer