Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ buildscript {
google()
mavenCentral()
maven{
allowInsecureProtocol = true
url 'https://www.jitpack.io'
}
}
Expand All @@ -21,7 +20,6 @@ rootProject.allprojects {
google()
mavenCentral()
maven{
allowInsecureProtocol = true
url 'https://www.jitpack.io'
}
}
Expand All @@ -31,7 +29,8 @@ apply plugin: 'com.android.library'

apply from: "./resolve_dependencies.gradle"//解决编译导入Flutter相关的包报错问题
android {
compileSdkVersion 34
namespace 'com.imin.printer.imin_printer'
compileSdk 34

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
4 changes: 1 addition & 3 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.imin.printer.imin_printer">
</manifest>
<manifest/>
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,8 @@ public void onPrintResult(int code, String msg) throws RemoteException {
case "getServiceVersion":
if (iminPrintUtils == null) {
result.success(PrinterHelper.getInstance().getServiceVersion());
}else{
result.success("0.0");
}
break;
case "getPrinterHardwareVersion":
Expand Down
14 changes: 8 additions & 6 deletions lib/imin_printer_method_channel.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import 'dart:async';
import 'dart:convert';

import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'dart:convert';
import 'enums.dart';
import 'package:logger/logger.dart';

import 'column_maker.dart';
import 'imin_style.dart';
import 'enums.dart';
import 'imin_printer_platform_interface.dart';
import 'package:logger/logger.dart';
import 'imin_style.dart';

var logger = Logger();

Expand Down Expand Up @@ -89,7 +91,7 @@ class MethodChannelIminPrinter extends IminPrinterPlatform {

@override
Future<void> setTextStyle(IminFontStyle style) async {
logger.d('setTextStyle', style.index);
logger.d('setTextStyle ${style.index}');
Map<String, dynamic> arguments = <String, dynamic>{
"style": style.index,
};
Expand Down Expand Up @@ -714,7 +716,7 @@ class MethodChannelIminPrinter extends IminPrinterPlatform {
}

if (style.lineHeight != null) {
logger.d('lineHeight', style.lineHeight);
logger.d('lineHeight ${style.lineHeight}');
await setTextBitmapLineSpacing(style.lineHeight!);
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
flutter:
sdk: flutter
plugin_platform_interface: ^2.0.2
logger: ^1.1.0
logger: ^2.0.0

dev_dependencies:
flutter_test:
Expand Down