flutter_star_prnt
스타 마이크로믹스 프린터 사용을 위한 플러터 플러그인입니다. 영수증 형식 지정에 도움이 되는 여러 기능을 포함하고 있습니다.
스타 프린터용 플러터 플러그인
^1.15.0{"sdk":"flutter"}{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Flutter plugin for Star micronics printers.
Native code based on React Native and Ionic/Cordova version
React native Version ➜ here
Ionic/Cordova Version ➜ here
I'm looking for someone to take over the maintenance of this package as currently I don't work on flutter or Star Micromics printer, I can't really validate any changes on Star Micromics native code. Please open an issue if you're interested, generally I'm just looking for someone that can give me confidence you won't just hijack the package for something else.
If you're having trouble please run these commands
rm -rf ios/Pods && rm ios/Podfile.lock && flutter clean
import 'package:flutter_star_prnt/flutter_star_prnt.dart';
// Find printers
List<PortInfo> list = await StarPrnt.portDiscovery(StarPortType.All);
list.forEach((port) async {
/// Check status
await StarPrnt.checkStatus(portName: port.portName,emulation: 'StarGraphic',)
}
///send print commands to printer
PrintCommands commands = PrintCommands();
commands.push({
'appendBitmapText': "Hello World"
});
commands.push({
'appendCutPaper': "FullCutWithFeed"
});
await StarPrnt.print(portName: port.portName, emulation: 'StarGraphic',printCommands: commands)
Permissions required depending on your printer:
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.BLUETOOTH"></uses-permission>
Need to add this into your info.plist for bluetooth printers
<key>UISupportedExternalAccessoryProtocols</key>
<array>
<string>jp.star-m.starpro</string>
</array>