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

PlatformAndroid

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();
  String version = '1.0.0';
  @override
  void initState() {
    super.initState();
     getSdkVersion();
  }
  Future<void> getSdkVersion() async {
     final sdkVersion = await iminPrinter.getSdkVersion();
     if (!mounted) return;
      setState( () {
          version = sdkVersion!;
      });
  }
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      home: version == '2.0.0' ? const NewHome() : const Home() ,
    );
  }
}
6
likes
130
points
330
downloads

Publisher

verified publisherimin.sg

Weekly Downloads

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

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, logger, plugin_platform_interface

More

Packages that depend on imin_printer