37 lines
652 B
Dart
37 lines
652 B
Dart
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<MyApp> createState() => _MyAppState();
|
|
}
|
|
|
|
class _MyAppState extends State<MyApp> {
|
|
final _jcPrinter = JcPrinter();
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_jcPrinter.connect('name');
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
home: Scaffold(
|
|
appBar: AppBar(
|
|
title: const Text('Plugin example app'),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|