flutter_jc_printer_plugin/example/lib/main.dart

37 lines
652 B
Dart
Raw Normal View History

2023-10-20 13:49:23 +08:00
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> {
2023-10-20 17:45:24 +08:00
final _jcPrinter = JcPrinter();
2023-10-20 13:49:23 +08:00
@override
void initState() {
super.initState();
2023-10-22 12:31:46 +08:00
_jcPrinter.connect('name');
2023-10-20 13:49:23 +08:00
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
),
);
}
}