# flutter_plugin_print **Repository Path**: aicare99/flutter_plugin_print ## Basic Information - **Project Name**: flutter_plugin_print - **Description**: Flutter plugin print (一体机USB热敏打印插件) 点餐APP插件,打印机调用,(竖屏一体机) - **Primary Language**: Dart - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-05-09 - **Last Updated**: 2022-07-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # flutter_plugin_print This is a Flutter printing plugin used by AiCare99's internal project ## Install Add plugins to your pubspec.yaml file. ```\ dependencies: flutter_plugin_print: git: https://gitee.com/aicare99/flutter_plugin_print.git ``` Running ``` flutter pub get ``` ## Method ### demo Print a sample receipt (no paper cutting) ``` FlutterPluginPrint.demo() ``` ### printText Printing basic unstyled text ``` FlutterPluginPrint.printText(String text) ``` ### halfCut Cutter Action - Half Cut ``` FlutterPluginPrint.halfCut() ``` ### allCut Cutter Action - Full Cut ``` FlutterPluginPrint.allCut() ``` ## setFont 方法描述:设置打印机打印字体,包括设置加粗,倍高,倍宽,下划线,标准ASCII字体A (12 × 24),压缩ASCII字体B (9 × 17) 参数: mCharacterType: 0表示12*24字体大小,1表示9*16字体大小,此设置临时有效,打印机不保存此设置,即打印机重启后无效。如需打印9*16大小字体,需要每次传入1手动设置。 mWidth:倍宽,范围0~7 mHeight:倍高,范围0~7 mBold:0 不加粗,1加粗 mUnderline:0无下划线,1下划线 ``` FlutterPluginPrint.setFont(0, 0, 0, 0, 0) ``` ## alignLeft ``` FlutterPluginPrint.alignLeft() ``` ## alignRight ``` FlutterPluginPrint.alignRight() ``` ## alignCenter ``` FlutterPluginPrint.alignCenter() ``` ## newLine ``` FlutterPluginPrint.newLine( 2 ) ``` ## init ``` FlutterPluginPrint.init() ```