├── ios ├── Assets │ └── .gitkeep ├── Classes │ ├── SunmiPrinterPlusPlugin.h │ ├── SwiftSunmiPrinterPlusPlugin.swift │ └── SunmiPrinterPlusPlugin.m ├── .gitignore └── sunmi_printer_plus.podspec ├── .dart_tool ├── version ├── package_config_subset └── package_config.json ├── doc └── api │ ├── categories.json │ ├── static-assets │ ├── favicon.png │ ├── play_button.svg │ ├── readme.md │ └── github.css │ ├── __404error.html │ ├── sunmi_style │ ├── sunmi_style-library.html │ └── SunmiStyle │ │ ├── bold.html │ │ ├── align.html │ │ ├── fontSize.html │ │ └── SunmiStyle.html │ ├── column_maker │ ├── column_maker-library.html │ └── ColumnMaker │ │ ├── align.html │ │ ├── text.html │ │ ├── width.html │ │ └── toJson.html │ └── enums │ ├── PrinterMode │ └── toString.html │ ├── SunmiPrintAlign │ └── toString.html │ ├── SunmiFontSize │ └── toString.html │ ├── SunmiQrcodeLevel │ └── toString.html │ ├── SunmiBarcodeTextPos │ └── toString.html │ ├── SunmiBarcodeType │ └── toString.html │ ├── PrinterStatus │ └── toString.html │ └── enums-library.html ├── android ├── .idea │ ├── .name │ ├── .gitignore │ ├── compiler.xml │ ├── vcs.xml │ ├── migrations.xml │ ├── misc.xml │ └── gradle.xml ├── settings.gradle ├── src │ └── main │ │ ├── aidl │ │ ├── com │ │ │ └── sunmi │ │ │ │ └── trans │ │ │ │ └── TransBean.aidl │ │ └── woyou │ │ │ └── aidlservice │ │ │ └── jiuiv5 │ │ │ ├── ITax.aidl │ │ │ ├── ILcdCallback.aidl │ │ │ └── ICallback.aidl │ │ ├── AndroidManifest.xml │ │ ├── java │ │ ├── br │ │ │ └── com │ │ │ │ └── brasizza │ │ │ │ └── sunmi_printer_plus │ │ │ │ └── Utilities.java │ │ └── com │ │ │ └── sunmi │ │ │ └── trans │ │ │ └── TransBean.java │ │ └── kotlin │ │ └── br │ │ └── com │ │ └── brasizza │ │ └── sunmi_printer_plus │ │ └── SunmiPrinterPlusPlugin.kt ├── .gitignore ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── local.properties └── build.gradle ├── .tool-versions ├── example ├── .tool-versions ├── ios │ ├── Runner │ │ ├── Runner-Bridging-Header.h │ │ ├── Assets.xcassets │ │ │ ├── LaunchImage.imageset │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ ├── README.md │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ └── Contents.json │ │ ├── AppDelegate.swift │ │ ├── GeneratedPluginRegistrant.h │ │ ├── GeneratedPluginRegistrant.m │ │ ├── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ │ └── Info.plist │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Generated.xcconfig │ │ ├── flutter_export_environment.sh │ │ └── AppFrameworkInfo.plist │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── Pods │ │ └── Local Podspecs │ │ │ └── Flutter.podspec.json │ └── Podfile ├── web │ ├── favicon.png │ ├── icons │ │ ├── Icon-192.png │ │ ├── Icon-512.png │ │ ├── Icon-maskable-192.png │ │ └── Icon-maskable-512.png │ ├── manifest.json │ └── index.html ├── assets │ └── images │ │ ├── 128x40.png │ │ ├── 16x16.png │ │ └── dash.jpeg ├── android │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── drawable │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── values │ │ │ │ │ │ └── styles.xml │ │ │ │ │ └── values-night │ │ │ │ │ │ └── styles.xml │ │ │ │ ├── kotlin │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── example │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ ├── java │ │ │ │ │ └── io │ │ │ │ │ │ └── flutter │ │ │ │ │ │ └── plugins │ │ │ │ │ │ └── GeneratedPluginRegistrant.java │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle │ ├── gradle.properties │ ├── local.properties │ ├── .gitignore │ ├── build.gradle │ ├── settings.gradle │ ├── gradlew.bat │ └── gradlew ├── README.md ├── .gitignore ├── .metadata ├── test │ └── widget_test.dart ├── analysis_options.yaml └── pubspec.yaml ├── .pubignore ├── .gitignore ├── lib ├── sunmi_style.dart ├── column_maker.dart └── enums.dart ├── sunmi_printer_plus.iml ├── analysis_options.yaml ├── LICENSE ├── pubspec.yaml └── CHANGELOG.md /ios/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.dart_tool/version: -------------------------------------------------------------------------------- 1 | 3.24.5 -------------------------------------------------------------------------------- /doc/api/categories.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /android/.idea/.name: -------------------------------------------------------------------------------- 1 | sunmi_printer_plus -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | flutter 2.5.0-stable 2 | -------------------------------------------------------------------------------- /example/.tool-versions: -------------------------------------------------------------------------------- 1 | flutter 2.5.0-stable 2 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'sunmi_printer_plus' 2 | -------------------------------------------------------------------------------- /android/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.pubignore: -------------------------------------------------------------------------------- 1 | /example/ios/.symlinks/plugins/sunmi_printer_plus 2 | android/local.properties -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/web/favicon.png -------------------------------------------------------------------------------- /android/src/main/aidl/com/sunmi/trans/TransBean.aidl: -------------------------------------------------------------------------------- 1 | package com.sunmi.trans; 2 | 3 | parcelable TransBean; -------------------------------------------------------------------------------- /example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /example/assets/images/128x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/assets/images/128x40.png -------------------------------------------------------------------------------- /example/assets/images/16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/assets/images/16x16.png -------------------------------------------------------------------------------- /example/assets/images/dash.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/assets/images/dash.jpeg -------------------------------------------------------------------------------- /doc/api/static-assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/doc/api/static-assets/favicon.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | example/ios/.symlinks/plugins/sunmi_printer_plus 2 | android/local.properties 3 | .DS_Store 4 | .DS_Store? 5 | **/.DS_Store -------------------------------------------------------------------------------- /example/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /example/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /ios/Classes/SunmiPrinterPlusPlugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SunmiPrinterPlusPlugin : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/android/app/src/main/kotlin/com/example/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() 6 | -------------------------------------------------------------------------------- /android/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brasizza/sunmi_printer/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /example/android/local.properties: -------------------------------------------------------------------------------- 1 | sdk.dir=/Users/marcusbrasizza/Library/Android/sdk 2 | flutter.sdk=/opt/homebrew/Caskroom/flutter/3.3.1/flutter 3 | flutter.buildMode=debug 4 | flutter.versionName=1.0.0 5 | flutter.versionCode=1 -------------------------------------------------------------------------------- /android/src/main/aidl/woyou/aidlservice/jiuiv5/ITax.aidl: -------------------------------------------------------------------------------- 1 | package woyou.aidlservice.jiuiv5; 2 | 3 | /** 4 | * 打印服务执行结果的回调 5 | */ 6 | interface ITax { 7 | 8 | oneway void onDataResult(in byte [] data); 9 | 10 | } -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip 6 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon May 02 17:03:37 BRT 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /android/src/main/aidl/woyou/aidlservice/jiuiv5/ILcdCallback.aidl: -------------------------------------------------------------------------------- 1 | package woyou.aidlservice.jiuiv5; 2 | 3 | /** 4 | * 顾显反馈结果 5 | */ 6 | interface ILcdCallback { 7 | 8 | /** 9 | * 返回执行结果 10 | * @param show: true 显示成功 false 显示失败 11 | */ 12 | oneway void onRunResult(boolean show); 13 | } -------------------------------------------------------------------------------- /android/.idea/migrations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/to/reference-keystore 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /doc/api/static-assets/play_button.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /doc/api/static-assets/readme.md: -------------------------------------------------------------------------------- 1 | # highlight.js 2 | 3 | Generated from https://highlightjs.org/download/ on 2021-07-13 4 | 5 | **Included languages:** 6 | 7 | * bash 8 | * c 9 | * css 10 | * dart 11 | * diff 12 | * html, xml 13 | * java 14 | * javascript 15 | * json 16 | * kotlin 17 | * markdown 18 | * objective-c 19 | * plaintext 20 | * shell 21 | * swift 22 | * yaml 23 | -------------------------------------------------------------------------------- /android/local.properties: -------------------------------------------------------------------------------- 1 | ## This file must *NOT* be checked into Version Control Systems, 2 | # as it contains information specific to your local configuration. 3 | # 4 | # Location of the SDK. This is only used by Gradle. 5 | # For customization when using a Version Control System, please read the 6 | # header note. 7 | #Thu Oct 21 23:14:37 BRT 2021 8 | sdk.dir=/Users/marcusbrasizza/Library/Android/sdk 9 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = "../build" 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | } 12 | subprojects { 13 | project.evaluationDependsOn(":app") 14 | } 15 | 16 | tasks.register("clean", Delete) { 17 | delete rootProject.buildDir 18 | } 19 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/sunmi_style.dart: -------------------------------------------------------------------------------- 1 | import 'enums.dart'; 2 | 3 | ///*SunmiStyle* 4 | /// 5 | ///With this class you can build your own layout to print some text. 6 | ///The thext can come already with [align], [fontSize] and *bold*, and then you don't need to type 3 commands to do the same THING! 7 | 8 | class SunmiStyle { 9 | SunmiFontSize? fontSize; 10 | SunmiPrintAlign? align; 11 | bool? bold; 12 | 13 | SunmiStyle({this.fontSize, this.align, this.bold}); 14 | } 15 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | -------------------------------------------------------------------------------- /example/ios/Runner/GeneratedPluginRegistrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GeneratedPluginRegistrant_h 8 | #define GeneratedPluginRegistrant_h 9 | 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface GeneratedPluginRegistrant : NSObject 15 | + (void)registerWithRegistry:(NSObject*)registry; 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | #endif /* GeneratedPluginRegistrant_h */ 20 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/ios/Pods/Local Podspecs/Flutter.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Flutter", 3 | "version": "1.0.0", 4 | "summary": "High-performance, high-fidelity mobile apps.", 5 | "homepage": "https://flutter.io", 6 | "license": { 7 | "type": "MIT" 8 | }, 9 | "authors": { 10 | "Flutter Dev Team": "flutter-dev@googlegroups.com" 11 | }, 12 | "source": { 13 | "git": "https://github.com/flutter/engine", 14 | "tag": "1.0.0" 15 | }, 16 | "platforms": { 17 | "ios": "9.0" 18 | }, 19 | "vendored_frameworks": "path/to/nothing" 20 | } 21 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | /Flutter/ephemeral/ 38 | /Flutter/flutter_export_environment.sh -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /example/ios/Runner/GeneratedPluginRegistrant.m: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #import "GeneratedPluginRegistrant.h" 8 | 9 | #if __has_include() 10 | #import 11 | #else 12 | @import sunmi_printer_plus; 13 | #endif 14 | 15 | @implementation GeneratedPluginRegistrant 16 | 17 | + (void)registerWithRegistry:(NSObject*)registry { 18 | [SunmiPrinterPlusPlugin registerWithRegistrar:[registry registrarForPlugin:@"SunmiPrinterPlusPlugin"]]; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ios/Classes/SwiftSunmiPrinterPlusPlugin.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | 4 | public class SwiftSunmiPrinterPlusPlugin: NSObject, FlutterPlugin { 5 | public static func register(with registrar: FlutterPluginRegistrar) { 6 | let channel = FlutterMethodChannel(name: "sunmi_printer_plus", binaryMessenger: registrar.messenger()) 7 | let instance = SwiftSunmiPrinterPlusPlugin() 8 | registrar.addMethodCallDelegate(instance, channel: channel) 9 | } 10 | 11 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { 12 | result("iOS " + UIDevice.current.systemVersion) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /example/ios/Flutter/Generated.xcconfig: -------------------------------------------------------------------------------- 1 | // This is a generated file; do not edit or check into version control. 2 | FLUTTER_ROOT=/opt/homebrew/Caskroom/flutter/3.3.1/flutter 3 | FLUTTER_APPLICATION_PATH=/Users/marcusbrasizza/development_interno/sunmi_printer/example 4 | COCOAPODS_PARALLEL_CODE_SIGN=true 5 | FLUTTER_TARGET=lib/main.dart 6 | FLUTTER_BUILD_DIR=build 7 | FLUTTER_BUILD_NAME=1.0.0 8 | FLUTTER_BUILD_NUMBER=1 9 | EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 10 | EXCLUDED_ARCHS[sdk=iphoneos*]=armv7 11 | DART_OBFUSCATION=false 12 | TRACK_WIDGET_CREATION=true 13 | TREE_SHAKE_ICONS=false 14 | PACKAGE_CONFIG=.dart_tool/package_config.json 15 | -------------------------------------------------------------------------------- /android/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | -------------------------------------------------------------------------------- /example/ios/Flutter/flutter_export_environment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This is a generated file; do not edit or check into version control. 3 | export "FLUTTER_ROOT=/opt/homebrew/Caskroom/flutter/3.3.1/flutter" 4 | export "FLUTTER_APPLICATION_PATH=/Users/marcusbrasizza/development_interno/sunmi_printer/example" 5 | export "COCOAPODS_PARALLEL_CODE_SIGN=true" 6 | export "FLUTTER_TARGET=lib/main.dart" 7 | export "FLUTTER_BUILD_DIR=build" 8 | export "FLUTTER_BUILD_NAME=1.0.0" 9 | export "FLUTTER_BUILD_NUMBER=1" 10 | export "DART_OBFUSCATION=false" 11 | export "TRACK_WIDGET_CREATION=true" 12 | export "TREE_SHAKE_ICONS=false" 13 | export "PACKAGE_CONFIG=.dart_tool/package_config.json" 14 | -------------------------------------------------------------------------------- /ios/Classes/SunmiPrinterPlusPlugin.m: -------------------------------------------------------------------------------- 1 | #import "SunmiPrinterPlusPlugin.h" 2 | #if __has_include() 3 | #import 4 | #else 5 | // Support project import fallback if the generated compatibility header 6 | // is not copied when this plugin is created as a library. 7 | // https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 8 | #import "sunmi_printer_plus-Swift.h" 9 | #endif 10 | 11 | @implementation SunmiPrinterPlusPlugin 12 | + (void)registerWithRegistrar:(NSObject*)registrar { 13 | [SwiftSunmiPrinterPlusPlugin registerWithRegistrar:registrar]; 14 | } 15 | @end 16 | -------------------------------------------------------------------------------- /android/src/main/aidl/woyou/aidlservice/jiuiv5/ICallback.aidl: -------------------------------------------------------------------------------- 1 | package woyou.aidlservice.jiuiv5; 2 | 3 | /** 4 | * 打印服务执行结果的回调 5 | */ 6 | interface ICallback { 7 | 8 | /** 9 | * 返回接口执行的结果 10 | * 备注:此回调只表明接口执行是否成功但不表明打印机的工作结果,如需要获取打印机结果请用事务模式 11 | * @param isSuccess: true执行成功,false 执行失败 12 | */ 13 | oneway void onRunResult(boolean isSuccess); 14 | 15 | /** 16 | * 返回接口执行的结果(字符串数据) 17 | * @param result: 结果,打印机上电以来打印长度等(单位mm) 18 | */ 19 | oneway void onReturnString(String result); 20 | 21 | /** 22 | * 返回接口执行失败时发生异常情况的具体原因 23 | * code: 异常代码 24 | * msg: 异常描述 25 | */ 26 | oneway void onRaiseException(int code, String msg); 27 | 28 | /** 29 | * 返回打印机结果 30 | * code: 异常代码 0 成功 1 失败 31 | * msg: 异常描述 32 | */ 33 | oneway void onPrintResult(int code, String msg); 34 | 35 | } -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "8.1.0" apply false 22 | id "org.jetbrains.kotlin.android" version "1.8.22" apply false 23 | } 24 | 25 | include ":app" 26 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Symbolication related 35 | app.*.symbols 36 | 37 | # Obfuscation related 38 | app.*.map.json 39 | 40 | # Android Studio will place build artifacts here 41 | /android/app/debug 42 | /android/app/profile 43 | /android/app/release 44 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java: -------------------------------------------------------------------------------- 1 | package io.flutter.plugins; 2 | 3 | import androidx.annotation.Keep; 4 | import androidx.annotation.NonNull; 5 | import io.flutter.Log; 6 | 7 | import io.flutter.embedding.engine.FlutterEngine; 8 | 9 | /** 10 | * Generated file. Do not edit. 11 | * This file is generated by the Flutter tool based on the 12 | * plugins that support the Android platform. 13 | */ 14 | @Keep 15 | public final class GeneratedPluginRegistrant { 16 | private static final String TAG = "GeneratedPluginRegistrant"; 17 | public static void registerWith(@NonNull FlutterEngine flutterEngine) { 18 | try { 19 | flutterEngine.getPlugins().add(new br.com.brasizza.sunmi_printer_plus.SunmiPrinterPlugin()); 20 | } catch (Exception e) { 21 | Log.e(TAG, "Error registering plugin sunmi_printer_plus, br.com.brasizza.sunmi_printer_plus.SunmiPrinterPlugin", e); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /sunmi_printer_plus.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "short_name": "example", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: "dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668" 8 | channel: "stable" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 17 | base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 18 | - platform: android 19 | create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 20 | base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668 21 | 22 | # User provided section 23 | 24 | # List of Local paths (relative to this file) that should be 25 | # ignored by the migrate tool. 26 | # 27 | # Files that are not part of the templates will be ignored by default. 28 | unmanaged_files: 29 | - 'lib/main.dart' 30 | - 'ios/Runner.xcodeproj/project.pbxproj' 31 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /ios/sunmi_printer_plus.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. 3 | # Run `pod lib lint sunmi_printer_plus.podspec` to validate before publishing. 4 | # 5 | Pod::Spec.new do |s| 6 | s.name = 'sunmi_printer_plus' 7 | s.version = '0.0.1' 8 | s.summary = 'Sunmi printer plus.' 9 | s.description = <<-DESC 10 | Support V2 Pro Sunmi Label Version and Null safety. With this package you can connect with Sunmi printers, print text, image, qrcode, barcodes and a custom Esc/Pos if you like. 11 | DESC 12 | s.homepage = 'https://marcus.brasizza.com' 13 | s.license = { :file => '../LICENSE' } 14 | s.author = { 'Your Company' => 'mvbdesenvolvimento@gmail.com' } 15 | s.source = { :path => '.' } 16 | s.source_files = 'Classes/**/*' 17 | s.dependency 'Flutter' 18 | s.platform = :ios, '8.0' 19 | 20 | # Flutter.framework does not contain a i386 slice. 21 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } 22 | s.swift_version = '5.0' 23 | end 24 | -------------------------------------------------------------------------------- /lib/column_maker.dart: -------------------------------------------------------------------------------- 1 | import 'enums.dart'; 2 | 3 | ///*ColumnMaker* 4 | /// With this class you can build a column with some text and alignment 5 | /// This is a good approach if you want to do a recepit like 6 | /// With [text] , [width] and [align] you can build a row as you like with any combination of alignment and size
7 | /// Name Qtd Value 8 | /// 9 | /// XXX 2 2.33 10 | /// 11 | class ColumnMaker { 12 | String text; 13 | int width; 14 | SunmiPrintAlign align; 15 | ColumnMaker({ 16 | this.text = '', 17 | this.width = 2, 18 | this.align = SunmiPrintAlign.LEFT, 19 | }); 20 | //Convert to json 21 | Map toJson() { 22 | int value = 0; 23 | switch (align) { 24 | case SunmiPrintAlign.LEFT: 25 | value = 0; 26 | break; 27 | case SunmiPrintAlign.CENTER: 28 | value = 1; 29 | break; 30 | case SunmiPrintAlign.RIGHT: 31 | value = 2; 32 | break; 33 | default: 34 | value = 0; 35 | } 36 | return { 37 | "text": text, 38 | "width": width.toString(), 39 | "align": value.toString(), 40 | }; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | group 'br.com.brasizza.sunmi_printer_plus' 2 | version '1.0' 3 | 4 | buildscript { 5 | ext.kotlin_version = "1.8.22" 6 | repositories { 7 | google() 8 | mavenCentral() 9 | } 10 | 11 | dependencies { 12 | classpath("com.android.tools.build:gradle:8.1.4") 13 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") 14 | } 15 | } 16 | 17 | 18 | rootProject.allprojects { 19 | repositories { 20 | google() 21 | mavenCentral() 22 | } 23 | 24 | gradle.projectsEvaluated { 25 | tasks.withType(JavaCompile) { 26 | options.compilerArgs << "-Xlint:deprecation" 27 | options.compilerArgs << "-Xlint:unchecked" 28 | } 29 | } 30 | } 31 | 32 | apply plugin: 'com.android.library' 33 | 34 | android { 35 | compileSdk 34 36 | 37 | defaultConfig { 38 | minSdkVersion 16 39 | if (project.android.hasProperty('namespace')) { 40 | namespace 'br.com.brasizza.sunmi_printer_plus' 41 | } 42 | } 43 | lintOptions { 44 | disable 'InvalidPackage' 45 | } 46 | buildFeatures { 47 | aidl true 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | // ignore_for_file: avoid_relative_lib_imports 9 | 10 | import 'package:flutter/material.dart'; 11 | import 'package:flutter_test/flutter_test.dart'; 12 | 13 | import '../lib/main.dart'; 14 | 15 | void main() { 16 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 17 | // Build our app and trigger a frame. 18 | await tester.pumpWidget(const MyApp()); 19 | 20 | // Verify that our counter starts at 0. 21 | expect(find.text('0'), findsOneWidget); 22 | expect(find.text('1'), findsNothing); 23 | 24 | // Tap the '+' icon and trigger a frame. 25 | await tester.tap(find.byIcon(Icons.add)); 26 | await tester.pump(); 27 | 28 | // Verify that our counter has incremented. 29 | expect(find.text('0'), findsNothing); 30 | expect(find.text('1'), findsOneWidget); 31 | }); 32 | } 33 | -------------------------------------------------------------------------------- /android/src/main/java/br/com/brasizza/sunmi_printer_plus/Utilities.java: -------------------------------------------------------------------------------- 1 | package br.com.brasizza.sunmi_printer_plus; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | import java.util.ArrayList; 6 | 7 | public class Utilities { 8 | public static int[] arrayListToIntList(ArrayList list) { 9 | 10 | final int[] ints = new int[list.size()]; 11 | 12 | for (Integer i = 0; i < list.size(); i++) { 13 | ints[i] = list.get(i); 14 | } 15 | 16 | return ints; 17 | } 18 | 19 | public static String[] arrayListToString(ArrayList list) { 20 | 21 | final String[] strings = new String[list.size()]; 22 | 23 | for (int i = 0; i < list.size(); i++) { 24 | strings[i] = list.get(i); 25 | } 26 | 27 | return strings; 28 | } 29 | 30 | public static Bitmap scaleDownBitmap(Bitmap realImage, float maxImageSize, 31 | boolean filter) { 32 | float ratio = Math.min( 33 | maxImageSize / realImage.getWidth(), 34 | maxImageSize / realImage.getHeight()); 35 | int width = Math.round(ratio * realImage.getWidth()); 36 | int height = Math.round(ratio * realImage.getHeight()); 37 | 38 | Bitmap newBitmap = Bitmap.createScaledBitmap(realImage, width, 39 | height, filter); 40 | 41 | return newBitmap; 42 | } 43 | } -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. 5 | id "dev.flutter.flutter-gradle-plugin" 6 | } 7 | 8 | android { 9 | namespace = "com.example.example" 10 | compileSdk = flutter.compileSdkVersion 11 | ndkVersion = flutter.ndkVersion 12 | 13 | compileOptions { 14 | sourceCompatibility = JavaVersion.VERSION_1_8 15 | targetCompatibility = JavaVersion.VERSION_1_8 16 | } 17 | 18 | kotlinOptions { 19 | jvmTarget = JavaVersion.VERSION_1_8 20 | } 21 | 22 | defaultConfig { 23 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 24 | applicationId = "com.example.example" 25 | // You can update the following values to match your application needs. 26 | // For more information, see: https://flutter.dev/to/review-gradle-config. 27 | minSdk = flutter.minSdkVersion 28 | targetSdk = flutter.targetSdkVersion 29 | versionCode = flutter.versionCode 30 | versionName = flutter.versionName 31 | } 32 | 33 | buildTypes { 34 | release { 35 | // TODO: Add your own signing config for the release build. 36 | // Signing with the debug keys for now, so `flutter run --release` works. 37 | signingConfig = signingConfigs.debug 38 | } 39 | } 40 | } 41 | 42 | flutter { 43 | source = "../.." 44 | } 45 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /android/src/main/kotlin/br/com/brasizza/sunmi_printer_plus/SunmiPrinterPlusPlugin.kt: -------------------------------------------------------------------------------- 1 | package br.com.brasizza.sunmi_printer_plus 2 | 3 | import androidx.annotation.NonNull 4 | 5 | import io.flutter.embedding.engine.plugins.FlutterPlugin 6 | import io.flutter.plugin.common.MethodCall 7 | import io.flutter.plugin.common.MethodChannel 8 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler 9 | import io.flutter.plugin.common.MethodChannel.Result 10 | 11 | /** SunmiPrinterPlusPlugin */ 12 | class SunmiPrinterPlusPlugin: FlutterPlugin, MethodCallHandler { 13 | /// The MethodChannel that will the communication between Flutter and native Android 14 | /// 15 | /// This local reference serves to register the plugin with the Flutter Engine and unregister it 16 | /// when the Flutter Engine is detached from the Activity 17 | private lateinit var channel : MethodChannel 18 | 19 | override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { 20 | channel = MethodChannel(flutterPluginBinding.binaryMessenger, "sunmi_printer_plus") 21 | channel.setMethodCallHandler(this) 22 | } 23 | 24 | override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) { 25 | if (call.method == "getPlatformVersion") { 26 | result.success("Android ${android.os.Build.VERSION.RELEASE}") 27 | } else { 28 | result.notImplemented() 29 | } 30 | } 31 | 32 | override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { 33 | channel.setMethodCallHandler(null) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2021 Tan Zi Gang. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of the copyright holder nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /doc/api/static-assets/github.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | github.com style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | color: #333; 12 | background: #f8f8f8; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #998; 18 | font-style: italic; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-subst { 24 | color: #333; 25 | font-weight: bold; 26 | } 27 | 28 | .hljs-number, 29 | .hljs-literal, 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-tag .hljs-attr { 33 | color: #008080; 34 | } 35 | 36 | .hljs-string, 37 | .hljs-doctag { 38 | color: #d14; 39 | } 40 | 41 | .hljs-title, 42 | .hljs-section, 43 | .hljs-selector-id { 44 | color: #900; 45 | font-weight: bold; 46 | } 47 | 48 | .hljs-subst { 49 | font-weight: normal; 50 | } 51 | 52 | .hljs-type, 53 | .hljs-class .hljs-title { 54 | color: #458; 55 | font-weight: bold; 56 | } 57 | 58 | .hljs-tag, 59 | .hljs-name, 60 | .hljs-attribute { 61 | color: #000080; 62 | font-weight: normal; 63 | } 64 | 65 | .hljs-regexp, 66 | .hljs-link { 67 | color: #009926; 68 | } 69 | 70 | .hljs-symbol, 71 | .hljs-bullet { 72 | color: #990073; 73 | } 74 | 75 | .hljs-built_in, 76 | .hljs-builtin-name { 77 | color: #0086b3; 78 | } 79 | 80 | .hljs-meta { 81 | color: #999; 82 | font-weight: bold; 83 | } 84 | 85 | .hljs-deletion { 86 | background: #fdd; 87 | } 88 | 89 | .hljs-addition { 90 | background: #dfd; 91 | } 92 | 93 | .hljs-emphasis { 94 | font-style: italic; 95 | } 96 | 97 | .hljs-strong { 98 | font-weight: bold; 99 | } 100 | -------------------------------------------------------------------------------- /lib/enums.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: constant_identifier_names 2 | library enums; 3 | 4 | ///*PrinterStatus* 5 | /// 6 | ///This enum will give you the status of the printer. 7 | ///Sometimes the status can be ERROR, but don't worry about this status, always try co print anyway! 8 | enum PrinterStatus { 9 | UNKNOWN, 10 | ERROR, 11 | NORMAL, 12 | ABNORMAL_COMMUNICATION, 13 | OUT_OF_PAPER, 14 | PREPARING, 15 | OVERHEATED, 16 | OPEN_THE_LID, 17 | PAPER_CUTTER_ABNORMAL, 18 | PAPER_CUTTER_RECOVERED, 19 | NO_BLACK_MARK, 20 | NO_PRINTER_DETECTED, 21 | FAILED_TO_UPGRADE_FIRMWARE, 22 | EXCEPTION, 23 | } 24 | 25 | ///*PrinterMode* 26 | /// 27 | ///Enum to set printer mode 28 | enum PrinterMode { 29 | UNKNOWN, 30 | NORMAL_MODE, 31 | BLACK_LABEL_MODE, 32 | LABEL_MODE, 33 | } 34 | 35 | ///*SunmiPrintAlign* 36 | /// 37 | ///Enum to set printer aligntment 38 | enum SunmiPrintAlign { 39 | LEFT, 40 | CENTER, 41 | RIGHT, 42 | } 43 | 44 | ///*SunmiQrcodeLevel* 45 | /// 46 | //Enum to set a QRcode Level (Low to High) 47 | enum SunmiQrcodeLevel { 48 | LEVEL_L, 49 | LEVEL_M, 50 | LEVEL_Q, 51 | LEVEL_H, 52 | } 53 | 54 | ///*SunmiBarcodeType* 55 | /// 56 | ///Enum to set Barcode Type 57 | enum SunmiBarcodeType { 58 | UPCA, 59 | UPCE, 60 | JAN13, 61 | JAN8, 62 | CODE39, 63 | ITF, 64 | CODABAR, 65 | CODE93, 66 | CODE128, 67 | } 68 | 69 | ///*SunmiBarcodeTextPos* 70 | /// 71 | ///Enum to set how the thex will be printed in barcode 72 | enum SunmiBarcodeTextPos { 73 | NO_TEXT, 74 | TEXT_ABOVE, 75 | TEXT_UNDER, 76 | BOTH, 77 | } 78 | 79 | ///*SunmiFontSize* 80 | ///Enum to set font in the printer 81 | enum SunmiFontSize { 82 | XS, 83 | SM, 84 | MD, 85 | LG, 86 | XL, 87 | } 88 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | example 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /android/src/main/java/com/sunmi/trans/TransBean.java: -------------------------------------------------------------------------------- 1 | package com.sunmi.trans; 2 | 3 | import android.os.Parcel; 4 | import android.os.Parcelable; 5 | 6 | public class TransBean implements Parcelable { 7 | 8 | private byte type = 0; 9 | private String text = ""; 10 | private byte[] data = null; 11 | private int datalength = 0; 12 | 13 | public TransBean(){ 14 | type = 0; 15 | data = null; 16 | text = ""; 17 | datalength = 0; 18 | }; 19 | 20 | public byte getType() { 21 | return type; 22 | } 23 | 24 | public void setType(byte type) { 25 | this.type = type; 26 | } 27 | 28 | public String getText() { 29 | return text; 30 | } 31 | 32 | public void setText(String text) { 33 | this.text = text; 34 | } 35 | 36 | public byte[] getData() { 37 | return data; 38 | } 39 | 40 | public void setData(byte[] data) { 41 | if(data != null){ 42 | datalength = data.length; 43 | this.data = new byte[datalength]; 44 | System.arraycopy(data, 0, this.data, 0, datalength); 45 | } 46 | } 47 | 48 | public TransBean(Parcel source){ 49 | this.type = source.readByte(); 50 | this.datalength = source.readInt(); 51 | this.text = source.readString(); 52 | if(datalength > 0){ 53 | this.data = new byte[datalength]; 54 | source.readByteArray(data); 55 | } 56 | } 57 | 58 | public TransBean(byte type, String text, byte[] data){ 59 | this.type = type; 60 | this.text = text; 61 | if(data != null){ 62 | this.datalength = data.length; 63 | this.data = new byte[datalength]; 64 | System.arraycopy(data, 0, this.data, 0, datalength); 65 | } 66 | } 67 | 68 | @Override 69 | public int describeContents() { 70 | return 0; 71 | } 72 | 73 | @Override 74 | public void writeToParcel(Parcel dest, int flags) { 75 | dest.writeByte(type); 76 | dest.writeInt(datalength); 77 | dest.writeString(text); 78 | if(data != null){ 79 | dest.writeByteArray(data); 80 | } 81 | } 82 | 83 | public static Parcelable.Creator CREATOR = new Parcelable.Creator(){ 84 | 85 | @Override 86 | public TransBean createFromParcel(Parcel source) { 87 | return new TransBean(source); 88 | } 89 | 90 | @Override 91 | public TransBean[] newArray(int size) { 92 | return new TransBean[size]; 93 | } 94 | }; 95 | 96 | } 97 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: sunmi_printer_plus 2 | 3 | 4 | description: "Support V2 Pro Sunmi Label Version and Null safety. With this package you can connect with Sunmi printers, print text, image, qrcode, barcodes and a custom Esc/Pos if you like." 5 | version: 3.0.1 6 | homepage: https://github.com/brasizza/sunmi_printer/ 7 | 8 | environment: 9 | sdk: '>=3.5.0 <4.0.0' 10 | flutter: '>=1.10.0' 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | dev_dependencies: 15 | flutter_lints: ^1.0.4 16 | flutter_test: 17 | sdk: flutter 18 | 19 | # For information on the generic Dart part of this file, see the 20 | # following page: https://dart.dev/tools/pub/pubspec 21 | 22 | # The following section is specific to Flutter. 23 | flutter: 24 | # This section identifies this Flutter project as a plugin project. 25 | # The 'pluginClass' and Android 'package' identifiers should not ordinarily 26 | # be modified. They are used by the tooling to maintain consistency when 27 | # adding or updating assets for this project. 28 | plugin: 29 | platforms: 30 | android: 31 | package: br.com.brasizza.sunmi_printer_plus 32 | pluginClass: SunmiPrinterPlugin 33 | ios: 34 | pluginClass: SunmiPrinterPlusPlugin 35 | 36 | # To add assets to your plugin package, add an assets section, like this: 37 | # assets: 38 | # - images/a_dot_burr.jpeg 39 | # - images/a_dot_ham.jpeg 40 | # 41 | # For details regarding assets in packages, see 42 | # https://flutter.dev/assets-and-images/#from-packages 43 | # 44 | # An image asset can refer to one or more resolution-specific "variants", see 45 | # https://flutter.dev/assets-and-images/#resolution-aware. 46 | 47 | # To add custom fonts to your plugin package, add a fonts section here, 48 | # in this "flutter" section. Each entry in this list should have a 49 | # "family" key with the font family name, and a "fonts" key with a 50 | # list giving the asset and other descriptors for the font. For 51 | # example: 52 | # fonts: 53 | # - family: Schyler 54 | # fonts: 55 | # - asset: fonts/Schyler-Regular.ttf 56 | # - asset: fonts/Schyler-Italic.ttf 57 | # style: italic 58 | # - family: Trajan Pro 59 | # fonts: 60 | # - asset: fonts/TrajanPro.ttf 61 | # - asset: fonts/TrajanPro_Bold.ttf 62 | # weight: 700 63 | # 64 | # For details regarding fonts in packages, see 65 | # https://flutter.dev/custom-fonts/#from-packages 66 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 3.0.1# 4 | -Make compatible with dart >=3.5.0 5 | ## 3.0.0# 6 | -Upgrade to latest flutter version. 7 | 8 | 9 | ## 2.1.03# 10 | -Upgrade gradle to compileSdkVersion 34 in android core! 11 | Tks to [Shelmo](https://github.com/Shelmo) 12 | 13 | 14 | ## 2.1.02# 15 | * Print label returns! 16 | 17 | 18 | ## 2.1.01# 19 | * Add the querie 20 | 21 | 22 | 23 | to work with V2s devices 24 | Thanks to [@FrenkyDema](https://github.com/FrenkyDema) 25 | 26 | 27 | ## 2.1.00# 28 | * Create some cash drawer methods to use when it's connected in the USB 29 | * Upgrade de flutter version to 1.15.1 30 | * Upgrade the kotlin and gradle to major versions 31 | 32 | 33 | ## 2.0.13# 34 | * Replace the method to print row to native sunmi (but will cannot print arabic at this moment) 35 | * build a custom size font method called setCustomFontSize and you can put any integer to fit an not use the pre defined like XL, SM and etc! 36 | 37 | ## 2.0.12# 38 | * LCD functions fot T2mini 39 | **Thanks to make this AWESOME PR [@ytyng](https://github.com/ytyng)** 40 | 41 | ## 2.0.11# 42 | * Fixed exceptions with a device that is not sunmi. 43 | * This is good if you have a hybrid app with just a condition to start or not sunmi printer. 44 | **Thanks to open the issue [@aoeminh](https://github.com/aoeminh)** 45 | 46 | 47 | # 2.0.10 48 | * Print the arabic text in ColumnMaker wasn't working. Now it's fixed and the example will print chinese, russian and arabic.
49 | **Thanks AGAIN!!! to open the issue [@akshaykalola28](https://github.com/akshaykalola28)** 50 | 51 | ## 2.0.9 52 | * This package still ( and i think will never) woks in IOS, but now you can generate your apps in IOS without exceptions.
53 | **Thanks to open the issue [@akshaykalola28](https://github.com/akshaykalola28)** 54 | 55 | ## 2.0.8 56 | * Removed Label Printing Support , because the aidl don't give the support anymore (updated the IWoyouService) 57 | * Update the printText method, now you can set the style, bold and size in the method. 58 | * [x] cutPaper - Dedicated method just to cut the line 59 | * [x] getPrinterSerialNo - Get the serial number of the printer 60 | * [x] getPrinterVersion - Get the printer's version 61 | * [x] getPrinterPaper - Get the paper size ( 0: 80mm 1: 58mm) 62 | ## 2.0.7 63 | * Code format 64 | 65 | ## 2.0.6 66 | * Fix enum.dart to format issues 67 | 68 | ## 2.0.5 69 | * Fix enum.dart to format issues 70 | 71 | ## 2.0.4 72 | * Fix some code to increase Pub points 73 | 74 | ## 2.0.3 75 | * Fixed Barcode Example 76 | 77 | ## 2.0.2 78 | * Fixed pubspec.yaml 79 | 80 | ## 2.0.1 81 | * Fixed Readme 82 | 83 | ## 2.0.0 84 | 85 | * 2.0.0 release 86 | * Update Readme 87 | * Enable Null Safety Support 88 | * Label Printing Support For Sunmi V2 Pro 89 | * Refine existing features 90 | * Minor bug fixed 91 | * Included Qrcode print 92 | * Included Column print 93 | * Included Barcode print 94 | * Included method to print with escpos 95 | * Included bold mode On/Off 96 | * Included font size change: 97 | - Extra small 98 | - Small 99 | - Medium (default) 100 | - Large 101 | - Extra Large 102 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /doc/api/__404error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | sunmi_printer_plus - Dart API docs 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 |
29 | 30 |
31 | 32 | 35 |
sunmi_printer_plus
36 | 39 |
40 | 41 |
42 | 43 | 44 |
45 |

404: Something's gone wrong :-(

46 | 47 |
48 |

You've tried to visit a page that doesn't exist. Luckily this site 49 | has other pages.

50 |

If you were looking for something specific, try searching: 51 |

54 |

55 | 56 |
57 |
58 | 59 | 81 | 82 | 84 | 85 |
86 | 87 |
88 | 89 | sunmi_printer_plus 90 | 2.0.8 91 | 92 | 93 | 94 |
95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /example/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | example 30 | 31 | 32 | 33 | 36 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: example 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=3.5.4 <4.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | 33 | 34 | # The following adds the Cupertino Icons font to your application. 35 | # Use with the CupertinoIcons class for iOS style icons. 36 | cupertino_icons: ^1.0.2 37 | sunmi_printer_plus: 38 | # When depending on this package from a real application you should use: 39 | # sunmi_printer: ^x.y.z 40 | # See https://dart.dev/tools/pub/dependencies#version-constraints 41 | # The example app is bundled with the plugin so we use a path dependency on 42 | # the parent directory to use the current plugin's version. 43 | path: ../ 44 | esc_pos_utils: ^1.1.0 45 | 46 | dev_dependencies: 47 | flutter_test: 48 | sdk: flutter 49 | 50 | # The "flutter_lints" package below contains a set of recommended lints to 51 | # encourage good coding practices. The lint set provided by the package is 52 | # activated in the `analysis_options.yaml` file located at the root of your 53 | # package. See that file for information about deactivating specific lint 54 | # rules and activating additional ones. 55 | flutter_lints: ^5.0.0 56 | 57 | # For information on the generic Dart part of this file, see the 58 | # following page: https://dart.dev/tools/pub/pubspec 59 | 60 | # The following section is specific to Flutter. 61 | flutter: 62 | 63 | # The following line ensures that the Material Icons font is 64 | # included with your application, so that you can use the icons in 65 | # the material Icons class. 66 | uses-material-design: true 67 | 68 | # To add assets to your application, add an assets section, like this: 69 | assets: 70 | - assets/images/ 71 | 72 | # An image asset can refer to one or more resolution-specific "variants", see 73 | # https://flutter.dev/assets-and-images/#resolution-aware. 74 | 75 | # For details regarding adding assets from package dependencies, see 76 | # https://flutter.dev/assets-and-images/#from-packages 77 | 78 | # To add custom fonts to your application, add a fonts section here, 79 | # in this "flutter" section. Each entry in this list should have a 80 | # "family" key with the font family name, and a "fonts" key with a 81 | # list giving the asset and other descriptors for the font. For 82 | # example: 83 | # fonts: 84 | # - family: Schyler 85 | # fonts: 86 | # - asset: fonts/Schyler-Regular.ttf 87 | # - asset: fonts/Schyler-Italic.ttf 88 | # style: italic 89 | # - family: Trajan Pro 90 | # fonts: 91 | # - asset: fonts/TrajanPro.ttf 92 | # - asset: fonts/TrajanPro_Bold.ttf 93 | # weight: 700 94 | # 95 | # For details regarding fonts from package dependencies, 96 | # see https://flutter.dev/custom-fonts/#from-packages 97 | -------------------------------------------------------------------------------- /doc/api/sunmi_style/sunmi_style-library.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | sunmi_style library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 35 |
sunmi_style
36 | 39 |
40 | 41 |
42 | 43 | 44 |
45 |
46 |

sunmi_style library 47 | Null safety 48 | 49 |

50 | 51 | 52 | 53 | 54 |
55 |

Classes

56 | 57 |
58 |
59 | SunmiStyle 60 | 61 |
62 |
63 | SunmiStyle [...] 64 |
65 | 66 |
67 |
68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 |
78 | 79 | 102 | 103 | 119 | 120 |
121 | 122 |
123 | 124 | sunmi_printer_plus 125 | 2.0.8 126 | 127 | 128 | 129 |
130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /doc/api/column_maker/column_maker-library.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | column_maker library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 35 |
column_maker
36 | 39 |
40 | 41 |
42 | 43 | 44 |
45 |
46 |

column_maker library 47 | Null safety 48 | 49 |

50 | 51 | 52 | 53 | 54 |
55 |

Classes

56 | 57 |
58 |
59 | ColumnMaker 60 | 61 |
62 |
63 | ColumnMaker 64 | With this class you can build a column with some text and alignment 65 | This is a good approach if you want to do a recepit like 66 | With text , width and align you can build a row as you like with any combination of alignment and size
67 | Name Qtd Value [...] 68 |
69 | 70 |
71 |
72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 |
82 | 83 | 106 | 107 | 123 | 124 |
125 | 126 |
127 | 128 | sunmi_printer_plus 129 | 2.0.8 130 | 131 | 132 | 133 |
134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /.dart_tool/package_config_subset: -------------------------------------------------------------------------------- 1 | async 2 | 2.18 3 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/async-2.11.0/ 4 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/async-2.11.0/lib/ 5 | boolean_selector 6 | 2.17 7 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/ 8 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/lib/ 9 | characters 10 | 2.12 11 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/characters-1.3.0/ 12 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/characters-1.3.0/lib/ 13 | clock 14 | 2.12 15 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/clock-1.1.1/ 16 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/clock-1.1.1/lib/ 17 | collection 18 | 2.18 19 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/collection-1.18.0/ 20 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/ 21 | fake_async 22 | 2.12 23 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/fake_async-1.3.1/ 24 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/fake_async-1.3.1/lib/ 25 | flutter_lints 26 | 2.12 27 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/flutter_lints-1.0.4/ 28 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/flutter_lints-1.0.4/lib/ 29 | leak_tracker 30 | 3.2 31 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/leak_tracker-10.0.5/ 32 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/leak_tracker-10.0.5/lib/ 33 | leak_tracker_flutter_testing 34 | 3.2 35 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.5/ 36 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.5/lib/ 37 | leak_tracker_testing 38 | 3.2 39 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/ 40 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/lib/ 41 | lints 42 | 2.12 43 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/lints-1.0.1/ 44 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/lints-1.0.1/lib/ 45 | matcher 46 | 3.0 47 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/ 48 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/lib/ 49 | material_color_utilities 50 | 2.17 51 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1/ 52 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1/lib/ 53 | meta 54 | 2.12 55 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/meta-1.15.0/ 56 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/meta-1.15.0/lib/ 57 | path 58 | 3.0 59 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/path-1.9.0/ 60 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/path-1.9.0/lib/ 61 | source_span 62 | 2.18 63 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/source_span-1.10.0/ 64 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/source_span-1.10.0/lib/ 65 | stack_trace 66 | 2.18 67 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/stack_trace-1.11.1/ 68 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/stack_trace-1.11.1/lib/ 69 | stream_channel 70 | 2.19 71 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/stream_channel-2.1.2/ 72 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/stream_channel-2.1.2/lib/ 73 | string_scanner 74 | 2.18 75 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/ 76 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/lib/ 77 | term_glyph 78 | 2.12 79 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/ 80 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/lib/ 81 | test_api 82 | 3.2 83 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/test_api-0.7.2/ 84 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/test_api-0.7.2/lib/ 85 | vector_math 86 | 2.14 87 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/vector_math-2.1.4/ 88 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/vector_math-2.1.4/lib/ 89 | vm_service 90 | 3.3 91 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/vm_service-14.2.5/ 92 | file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/vm_service-14.2.5/lib/ 93 | sunmi_printer_plus 94 | 3.5 95 | file:///Users/marcusbrasizza/development_interno/sunmi_printer/ 96 | file:///Users/marcusbrasizza/development_interno/sunmi_printer/lib/ 97 | sky_engine 98 | 3.2 99 | file:///opt/homebrew/Caskroom/flutter/3.3.1/flutter/bin/cache/pkg/sky_engine/ 100 | file:///opt/homebrew/Caskroom/flutter/3.3.1/flutter/bin/cache/pkg/sky_engine/lib/ 101 | flutter 102 | 3.3 103 | file:///opt/homebrew/Caskroom/flutter/3.3.1/flutter/packages/flutter/ 104 | file:///opt/homebrew/Caskroom/flutter/3.3.1/flutter/packages/flutter/lib/ 105 | flutter_test 106 | 3.3 107 | file:///opt/homebrew/Caskroom/flutter/3.3.1/flutter/packages/flutter_test/ 108 | file:///opt/homebrew/Caskroom/flutter/3.3.1/flutter/packages/flutter_test/lib/ 109 | 2 110 | -------------------------------------------------------------------------------- /doc/api/sunmi_style/SunmiStyle/bold.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | bold property - SunmiStyle class - sunmi_style library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
bold
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

bold property 49 | Null safety 50 |

51 | 52 |
53 | bool? 54 | bold 55 |
read / write
56 | 57 |
58 | 59 | 60 | 61 |
62 |

Implementation

63 |
bool? bold;
 64 | 
 65 | 
66 |
67 | 68 | 69 |
70 | 71 | 115 | 116 | 118 | 119 |
120 | 121 |
122 | 123 | sunmi_printer_plus 124 | 2.0.8 125 | 126 | 127 | 128 |
129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /doc/api/sunmi_style/SunmiStyle/align.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | align property - SunmiStyle class - sunmi_style library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
align
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

align property 49 | Null safety 50 |

51 | 52 |
53 | SunmiPrintAlign? 54 | align 55 |
read / write
56 | 57 |
58 | 59 | 60 | 61 |
62 |

Implementation

63 |
SunmiPrintAlign? align;
 64 | 
 65 | 
66 |
67 | 68 | 69 |
70 | 71 | 115 | 116 | 118 | 119 |
120 | 121 |
122 | 123 | sunmi_printer_plus 124 | 2.0.8 125 | 126 | 127 | 128 |
129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /doc/api/sunmi_style/SunmiStyle/fontSize.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | fontSize property - SunmiStyle class - sunmi_style library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
fontSize
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

fontSize property 49 | Null safety 50 |

51 | 52 |
53 | SunmiFontSize? 54 | fontSize 55 |
read / write
56 | 57 |
58 | 59 | 60 | 61 |
62 |

Implementation

63 |
SunmiFontSize? fontSize;
 64 | 
 65 | 
66 |
67 | 68 | 69 |
70 | 71 | 115 | 116 | 118 | 119 |
120 | 121 |
122 | 123 | sunmi_printer_plus 124 | 2.0.8 125 | 126 | 127 | 128 |
129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /doc/api/column_maker/ColumnMaker/align.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | align property - ColumnMaker class - column_maker library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
align
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

align property 49 | Null safety 50 |

51 | 52 |
53 | SunmiPrintAlign 54 | align 55 |
read / write
56 | 57 |
58 | 59 | 60 | 61 |
62 |

Implementation

63 |
SunmiPrintAlign align;
 64 | 
 65 | 
66 |
67 | 68 | 69 |
70 | 71 | 116 | 117 | 119 | 120 |
121 | 122 |
123 | 124 | sunmi_printer_plus 125 | 2.0.8 126 | 127 | 128 | 129 |
130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /doc/api/column_maker/ColumnMaker/text.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | text property - ColumnMaker class - column_maker library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
text
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

text property 49 | Null safety 50 |

51 | 52 |
53 | String 54 | text 55 |
read / write
56 | 57 |
58 | 59 | 60 | 61 |
62 |

Implementation

63 |
String text;
 64 | 
 65 | 
66 |
67 | 68 | 69 |
70 | 71 | 116 | 117 | 119 | 120 |
121 | 122 |
123 | 124 | sunmi_printer_plus 125 | 2.0.8 126 | 127 | 128 | 129 |
130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /doc/api/column_maker/ColumnMaker/width.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | width property - ColumnMaker class - column_maker library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
width
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

width property 49 | Null safety 50 |

51 | 52 |
53 | int 54 | width 55 |
read / write
56 | 57 |
58 | 59 | 60 | 61 |
62 |

Implementation

63 |
int width;
 64 | 
 65 | 
66 |
67 | 68 | 69 |
70 | 71 | 116 | 117 | 119 | 120 |
121 | 122 |
123 | 124 | sunmi_printer_plus 125 | 2.0.8 126 | 127 | 128 | 129 |
130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /doc/api/enums/PrinterMode/toString.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | toString method - PrinterMode extension - enums library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
toString
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

toString method 49 | Null safety 50 |

51 | 52 |
53 | 54 | 55 | String 56 | toString() 57 | 58 |
override
59 | 60 |
61 | 62 |
63 |

A string representation of this object.

64 |

Some classes have a default textual representation, 65 | often paired with a static parse function (like int.parse). 66 | These classes will provide the textual representation as 67 | their string represetion.

68 |

Other classes have no meaningful textual representation 69 | that a program will care about. 70 | Such classes will typically override toString to provide 71 | useful information when inspecting the object, 72 | mainly for debugging or logging.

73 |
74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | 125 | 126 | 128 | 129 |
130 | 131 |
132 | 133 | sunmi_printer_plus 134 | 2.0.8 135 | 136 | 137 | 138 |
139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /doc/api/enums/SunmiPrintAlign/toString.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | toString method - SunmiPrintAlign extension - enums library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
toString
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

toString method 49 | Null safety 50 |

51 | 52 |
53 | 54 | 55 | String 56 | toString() 57 | 58 |
override
59 | 60 |
61 | 62 |
63 |

A string representation of this object.

64 |

Some classes have a default textual representation, 65 | often paired with a static parse function (like int.parse). 66 | These classes will provide the textual representation as 67 | their string represetion.

68 |

Other classes have no meaningful textual representation 69 | that a program will care about. 70 | Such classes will typically override toString to provide 71 | useful information when inspecting the object, 72 | mainly for debugging or logging.

73 |
74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | 124 | 125 | 127 | 128 |
129 | 130 |
131 | 132 | sunmi_printer_plus 133 | 2.0.8 134 | 135 | 136 | 137 |
138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /doc/api/enums/SunmiFontSize/toString.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | toString method - SunmiFontSize extension - enums library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
toString
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

toString method 49 | Null safety 50 |

51 | 52 |
53 | 54 | 55 | String 56 | toString() 57 | 58 |
override
59 | 60 |
61 | 62 |
63 |

A string representation of this object.

64 |

Some classes have a default textual representation, 65 | often paired with a static parse function (like int.parse). 66 | These classes will provide the textual representation as 67 | their string represetion.

68 |

Other classes have no meaningful textual representation 69 | that a program will care about. 70 | Such classes will typically override toString to provide 71 | useful information when inspecting the object, 72 | mainly for debugging or logging.

73 |
74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | 126 | 127 | 129 | 130 |
131 | 132 |
133 | 134 | sunmi_printer_plus 135 | 2.0.8 136 | 137 | 138 | 139 |
140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /doc/api/enums/SunmiQrcodeLevel/toString.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | toString method - SunmiQrcodeLevel extension - enums library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
toString
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

toString method 49 | Null safety 50 |

51 | 52 |
53 | 54 | 55 | String 56 | toString() 57 | 58 |
override
59 | 60 |
61 | 62 |
63 |

A string representation of this object.

64 |

Some classes have a default textual representation, 65 | often paired with a static parse function (like int.parse). 66 | These classes will provide the textual representation as 67 | their string represetion.

68 |

Other classes have no meaningful textual representation 69 | that a program will care about. 70 | Such classes will typically override toString to provide 71 | useful information when inspecting the object, 72 | mainly for debugging or logging.

73 |
74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | 125 | 126 | 128 | 129 |
130 | 131 |
132 | 133 | sunmi_printer_plus 134 | 2.0.8 135 | 136 | 137 | 138 |
139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /doc/api/enums/SunmiBarcodeTextPos/toString.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | toString method - SunmiBarcodeTextPos extension - enums library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
toString
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

toString method 49 | Null safety 50 |

51 | 52 |
53 | 54 | 55 | String 56 | toString() 57 | 58 |
override
59 | 60 |
61 | 62 |
63 |

A string representation of this object.

64 |

Some classes have a default textual representation, 65 | often paired with a static parse function (like int.parse). 66 | These classes will provide the textual representation as 67 | their string represetion.

68 |

Other classes have no meaningful textual representation 69 | that a program will care about. 70 | Such classes will typically override toString to provide 71 | useful information when inspecting the object, 72 | mainly for debugging or logging.

73 |
74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | 125 | 126 | 128 | 129 |
130 | 131 |
132 | 133 | sunmi_printer_plus 134 | 2.0.8 135 | 136 | 137 | 138 |
139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /doc/api/enums/SunmiBarcodeType/toString.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | toString method - SunmiBarcodeType extension - enums library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
toString
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

toString method 49 | Null safety 50 |

51 | 52 |
53 | 54 | 55 | String 56 | toString() 57 | 58 |
override
59 | 60 |
61 | 62 |
63 |

A string representation of this object.

64 |

Some classes have a default textual representation, 65 | often paired with a static parse function (like int.parse). 66 | These classes will provide the textual representation as 67 | their string represetion.

68 |

Other classes have no meaningful textual representation 69 | that a program will care about. 70 | Such classes will typically override toString to provide 71 | useful information when inspecting the object, 72 | mainly for debugging or logging.

73 |
74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | 130 | 131 | 133 | 134 |
135 | 136 |
137 | 138 | sunmi_printer_plus 139 | 2.0.8 140 | 141 | 142 | 143 |
144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /doc/api/enums/PrinterStatus/toString.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | toString method - PrinterStatus extension - enums library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
toString
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

toString method 49 | Null safety 50 |

51 | 52 |
53 | 54 | 55 | String 56 | toString() 57 | 58 |
override
59 | 60 |
61 | 62 |
63 |

A string representation of this object.

64 |

Some classes have a default textual representation, 65 | often paired with a static parse function (like int.parse). 66 | These classes will provide the textual representation as 67 | their string represetion.

68 |

Other classes have no meaningful textual representation 69 | that a program will care about. 70 | Such classes will typically override toString to provide 71 | useful information when inspecting the object, 72 | mainly for debugging or logging.

73 |
74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | 135 | 136 | 138 | 139 |
140 | 141 |
142 | 143 | sunmi_printer_plus 144 | 2.0.8 145 | 146 | 147 | 148 |
149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /doc/api/sunmi_style/SunmiStyle/SunmiStyle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | SunmiStyle constructor - SunmiStyle class - sunmi_style library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
SunmiStyle
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

SunmiStyle constructor 49 | Null safety 50 |

51 | 52 |
53 | SunmiStyle(
  1. {SunmiFontSize? fontSize,
  2. 54 |
  3. SunmiPrintAlign? align,
  4. 55 |
  5. bool? bold}
  6. 56 |
) 57 |
58 | 59 | 60 | 61 | 62 | 63 |
64 |

Implementation

65 |
SunmiStyle({this.fontSize, this.align, this.bold});
66 |
67 | 68 | 69 |
70 | 71 | 115 | 116 | 118 | 119 |
120 | 121 |
122 | 123 | sunmi_printer_plus 124 | 2.0.8 125 | 126 | 127 | 128 |
129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /.dart_tool/package_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "configVersion": 2, 3 | "packages": [ 4 | { 5 | "name": "async", 6 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/async-2.11.0", 7 | "packageUri": "lib/", 8 | "languageVersion": "2.18" 9 | }, 10 | { 11 | "name": "boolean_selector", 12 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1", 13 | "packageUri": "lib/", 14 | "languageVersion": "2.17" 15 | }, 16 | { 17 | "name": "characters", 18 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/characters-1.3.0", 19 | "packageUri": "lib/", 20 | "languageVersion": "2.12" 21 | }, 22 | { 23 | "name": "clock", 24 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/clock-1.1.1", 25 | "packageUri": "lib/", 26 | "languageVersion": "2.12" 27 | }, 28 | { 29 | "name": "collection", 30 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/collection-1.18.0", 31 | "packageUri": "lib/", 32 | "languageVersion": "2.18" 33 | }, 34 | { 35 | "name": "fake_async", 36 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/fake_async-1.3.1", 37 | "packageUri": "lib/", 38 | "languageVersion": "2.12" 39 | }, 40 | { 41 | "name": "flutter", 42 | "rootUri": "file:///opt/homebrew/Caskroom/flutter/3.3.1/flutter/packages/flutter", 43 | "packageUri": "lib/", 44 | "languageVersion": "3.3" 45 | }, 46 | { 47 | "name": "flutter_lints", 48 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/flutter_lints-1.0.4", 49 | "packageUri": "lib/", 50 | "languageVersion": "2.12" 51 | }, 52 | { 53 | "name": "flutter_test", 54 | "rootUri": "file:///opt/homebrew/Caskroom/flutter/3.3.1/flutter/packages/flutter_test", 55 | "packageUri": "lib/", 56 | "languageVersion": "3.3" 57 | }, 58 | { 59 | "name": "leak_tracker", 60 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/leak_tracker-10.0.5", 61 | "packageUri": "lib/", 62 | "languageVersion": "3.2" 63 | }, 64 | { 65 | "name": "leak_tracker_flutter_testing", 66 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.5", 67 | "packageUri": "lib/", 68 | "languageVersion": "3.2" 69 | }, 70 | { 71 | "name": "leak_tracker_testing", 72 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1", 73 | "packageUri": "lib/", 74 | "languageVersion": "3.2" 75 | }, 76 | { 77 | "name": "lints", 78 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/lints-1.0.1", 79 | "packageUri": "lib/", 80 | "languageVersion": "2.12" 81 | }, 82 | { 83 | "name": "matcher", 84 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/matcher-0.12.16+1", 85 | "packageUri": "lib/", 86 | "languageVersion": "3.0" 87 | }, 88 | { 89 | "name": "material_color_utilities", 90 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1", 91 | "packageUri": "lib/", 92 | "languageVersion": "2.17" 93 | }, 94 | { 95 | "name": "meta", 96 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/meta-1.15.0", 97 | "packageUri": "lib/", 98 | "languageVersion": "2.12" 99 | }, 100 | { 101 | "name": "path", 102 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/path-1.9.0", 103 | "packageUri": "lib/", 104 | "languageVersion": "3.0" 105 | }, 106 | { 107 | "name": "sky_engine", 108 | "rootUri": "file:///opt/homebrew/Caskroom/flutter/3.3.1/flutter/bin/cache/pkg/sky_engine", 109 | "packageUri": "lib/", 110 | "languageVersion": "3.2" 111 | }, 112 | { 113 | "name": "source_span", 114 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/source_span-1.10.0", 115 | "packageUri": "lib/", 116 | "languageVersion": "2.18" 117 | }, 118 | { 119 | "name": "stack_trace", 120 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/stack_trace-1.11.1", 121 | "packageUri": "lib/", 122 | "languageVersion": "2.18" 123 | }, 124 | { 125 | "name": "stream_channel", 126 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/stream_channel-2.1.2", 127 | "packageUri": "lib/", 128 | "languageVersion": "2.19" 129 | }, 130 | { 131 | "name": "string_scanner", 132 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/string_scanner-1.2.0", 133 | "packageUri": "lib/", 134 | "languageVersion": "2.18" 135 | }, 136 | { 137 | "name": "term_glyph", 138 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/term_glyph-1.2.1", 139 | "packageUri": "lib/", 140 | "languageVersion": "2.12" 141 | }, 142 | { 143 | "name": "test_api", 144 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/test_api-0.7.2", 145 | "packageUri": "lib/", 146 | "languageVersion": "3.2" 147 | }, 148 | { 149 | "name": "vector_math", 150 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/vector_math-2.1.4", 151 | "packageUri": "lib/", 152 | "languageVersion": "2.14" 153 | }, 154 | { 155 | "name": "vm_service", 156 | "rootUri": "file:///Users/marcusbrasizza/.pub-cache/hosted/pub.dev/vm_service-14.2.5", 157 | "packageUri": "lib/", 158 | "languageVersion": "3.3" 159 | }, 160 | { 161 | "name": "sunmi_printer_plus", 162 | "rootUri": "../", 163 | "packageUri": "lib/", 164 | "languageVersion": "3.5" 165 | } 166 | ], 167 | "generated": "2024-11-18T15:52:13.407617Z", 168 | "generator": "pub", 169 | "generatorVersion": "3.5.4", 170 | "flutterRoot": "file:///opt/homebrew/Caskroom/flutter/3.3.1/flutter", 171 | "flutterVersion": "3.24.5", 172 | "pubCache": "file:///Users/marcusbrasizza/.pub-cache" 173 | } 174 | -------------------------------------------------------------------------------- /doc/api/enums/enums-library.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | enums library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 35 |
enums
36 | 39 |
40 | 41 |
42 | 43 | 44 |
45 |
46 |

enums library 47 | Null safety 48 | 49 |

50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |
61 |

Enums

62 | 63 |
64 |
65 | PrinterMode 66 | 67 |
68 |
69 | PrinterMode [...] 70 |
71 | 72 |
73 | PrinterStatus 74 | 75 |
76 |
77 | PrinterStatus [...] 78 |
79 | 80 |
81 | SunmiBarcodeTextPos 82 | 83 |
84 |
85 | SunmiBarcodeTextPos [...] 86 |
87 | 88 |
89 | SunmiBarcodeType 90 | 91 |
92 |
93 | SunmiBarcodeType [...] 94 |
95 | 96 |
97 | SunmiFontSize 98 | 99 |
100 |
101 | SunmiFontSize 102 | Enum to set font in the printer 103 |
104 | 105 |
106 | SunmiPrintAlign 107 | 108 |
109 |
110 | SunmiPrintAlign [...] 111 |
112 | 113 |
114 | SunmiQrcodeLevel 115 | 116 |
117 |
118 | SunmiQrcodeLevel 119 |
120 | 121 |
122 |
123 | 124 | 125 | 126 |
127 | 128 | 151 | 152 | 174 | 175 |
176 | 177 |
178 | 179 | sunmi_printer_plus 180 | 2.0.8 181 | 182 | 183 | 184 |
185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | -------------------------------------------------------------------------------- /doc/api/column_maker/ColumnMaker/toJson.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | toJson method - ColumnMaker class - column_maker library - Dart API 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 |
28 | 29 |
30 | 31 | 37 |
toJson
38 | 41 |
42 | 43 |
44 | 45 | 46 |
47 |
48 |

toJson method 49 | Null safety 50 |

51 | 52 |
53 | 54 | 55 | Map<String, String> 56 | toJson() 57 | 58 | 59 | 60 |
61 | 62 | 63 | 64 | 65 |
66 |

Implementation

67 |
Map<String, String> toJson() {
 68 |   int value = 0;
 69 |   switch (align) {
 70 |     case SunmiPrintAlign.LEFT:
 71 |       value = 0;
 72 |       break;
 73 |     case SunmiPrintAlign.CENTER:
 74 |       value = 1;
 75 |       break;
 76 |     case SunmiPrintAlign.RIGHT:
 77 |       value = 2;
 78 |       break;
 79 |     default:
 80 |       value = 0;
 81 |   }
 82 |   return {
 83 |     "text": text,
 84 |     "width": width.toString(),
 85 |     "align": value.toString(),
 86 |   };
 87 | }
88 |
89 | 90 | 91 |
92 | 93 | 138 | 139 | 141 | 142 |
143 | 144 |
145 | 146 | sunmi_printer_plus 147 | 2.0.8 148 | 149 | 150 | 151 |
152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | --------------------------------------------------------------------------------