import 'package:flutter/material.dart'; import 'dart:async'; import 'package:jc_printer/jc_printer.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatefulWidget { const MyApp({super.key}); @override State createState() => _MyAppState(); } class _MyAppState extends State { final _jcPrinter = JcPrinter(); @override void initState() { super.initState(); _jcPrinter.connect(); } @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar( title: const Text('Plugin example app'), ), ), ); } }