imin_printer 0.6.0 copy "imin_printer: ^0.6.0" to clipboard
imin_printer: ^0.6.0 copied to clipboard

retracted

It is used to print text, pictures, two-dimensional code, bar code and other functions sdk in imin printer using Android system

example/lib/main.dart

// import 'dart:io';
import 'package:flutter/material.dart';
import 'package:imin_printer/imin_printer.dart';
import 'package:imin_printer_example/pages/v2/home.dart';
import 'package:imin_printer_example/pages/v1/home.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});
  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final iminPrinter = IminPrinter();
  bool? version = false;
  @override
  void initState() {
    super.initState();
      iminPrinter.receiveBroadcastStream.listen((event) {
      debugPrint('broadcastStream: ${event['action'] }');
      if(event['action'] == 'printer_sdk_version') {
            setState(() {
              version = event['status'];
            });
      }
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      home: version == true ? const NewHome() : const Home() ,
    );
  }
}
6
likes
0
pub points
84%
popularity

Publisher

verified publisherimin.sg

It is used to print text, pictures, two-dimensional code, bar code and other functions sdk in imin printer using Android system

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, logger, plugin_platform_interface

More

Packages that depend on imin_printer