diff --git a/android/src/main/kotlin/com/rouninlabs/another_brother/AnotherBrotherPlugin.kt b/android/src/main/kotlin/com/rouninlabs/another_brother/AnotherBrotherPlugin.kt index 2091c16..0baa202 100644 --- a/android/src/main/kotlin/com/rouninlabs/another_brother/AnotherBrotherPlugin.kt +++ b/android/src/main/kotlin/com/rouninlabs/another_brother/AnotherBrotherPlugin.kt @@ -11,8 +11,6 @@ import io.flutter.plugin.common.MethodCall import io.flutter.plugin.common.MethodChannel import io.flutter.plugin.common.MethodChannel.MethodCallHandler import io.flutter.plugin.common.MethodChannel.Result -import io.flutter.plugin.common.PluginRegistry.Registrar -import kotlin.contracts.contract /** AnotherBrotherPlugin */ class AnotherBrotherPlugin : FlutterPlugin, MethodCallHandler { diff --git a/android/src/main/kotlin/com/rouninlabs/another_brother/method/BrotherUtils.kt b/android/src/main/kotlin/com/rouninlabs/another_brother/method/BrotherUtils.kt index e36d817..0130e9c 100644 --- a/android/src/main/kotlin/com/rouninlabs/another_brother/method/BrotherUtils.kt +++ b/android/src/main/kotlin/com/rouninlabs/another_brother/method/BrotherUtils.kt @@ -49,6 +49,7 @@ fun printerInfofromMap(context:Context, flutterAssets: FlutterPlugin.FlutterAsse mirrorPrint = map["mirrorPrint"] as Boolean paperPosition = alignFromMap(map["paperPosition"] as Map) isAutoCut = map["isAutoCut"] as Boolean + numberOfAutoCutPages = map["autoCutForEachPageCount"] as Int isCutAtEnd = map["isCutAtEnd"] as Boolean mode9 = map["mode9"] as Boolean skipStatusCheck = map["skipStatusCheck"] as Boolean diff --git a/ios/Classes/Method/BrotherUtils.m b/ios/Classes/Method/BrotherUtils.m index e6e9f66..b23b51d 100644 --- a/ios/Classes/Method/BrotherUtils.m +++ b/ios/Classes/Method/BrotherUtils.m @@ -729,17 +729,10 @@ + (BRLMQLPrintSettings *) qlPrintSettingsFromMapWithValue:(NSDictionary * dartPrintMode = (NSDictionary *)[map objectForKey:@"printMode"]; printerSettings.scaleMode = [BrotherUtils printModeFromMapWithValue:dartPrintMode]; @@ -1315,6 +1308,7 @@ + (BRLMPTPrintSettings *)ptPrintSettingsFromMapWithValue:(NSDictionary * dartLabelInfoStatus = @{ @"labelNameIndex": [BrotherUtils labelIdTypeToNumberWithValue: [status labelID ]], @"isAutoCut": @FALSE, // TODO + @"autoCutForEachPageCount": @1, // TODO @"isEndCut": @FALSE, // TODO @"isHalfCut": @FALSE, // TODO @"isSpecialTape": @FALSE, // TODO diff --git a/lib/printer_info.dart b/lib/printer_info.dart index f3e6f5b..1f40788 100644 --- a/lib/printer_info.dart +++ b/lib/printer_info.dart @@ -1470,6 +1470,7 @@ class PrinterInfo { bool rotate180; bool peelMode; bool isAutoCut; + int autoCutForEachPageCount; bool isCutAtEnd; bool isSpecialTape; bool isHalfCut; @@ -1515,6 +1516,7 @@ class PrinterInfo { this.mirrorPrint = false, this.paperPosition = Align.CENTER, this.isAutoCut = true, + this.autoCutForEachPageCount = 1, this.isCutAtEnd = true, this.mode9 = true, this.skipStatusCheck = false, @@ -1601,6 +1603,7 @@ class PrinterInfo { mirrorPrint: map["mirrorPrint"], paperPosition: Align.fromMap(map["paperPosition"]), isAutoCut: map["isAutoCut"], + autoCutForEachPageCount: map["autoCutForEachPageCount"], isCutAtEnd: map["isCutAtEnd"], mode9: map["mode9"], skipStatusCheck: map["skipStatusCheck"], @@ -1664,6 +1667,7 @@ class PrinterInfo { "mirrorPrint": mirrorPrint, "paperPosition": paperPosition.toMap(), "isAutoCut": isAutoCut, + "autoCutForEachPageCount": autoCutForEachPageCount, "isCutAtEnd": isCutAtEnd, "mode9": mode9, "skipStatusCheck": skipStatusCheck,