旧版打印机

master
张萌 2 years ago
parent 1fb0b4024f
commit 039bc25ade

@ -4,7 +4,12 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="2f8e3712-04e2-429a-bcea-c8db1a54008e" name="默认变更列表" comment="" /> <list default="true" id="2f8e3712-04e2-429a-bcea-c8db1a54008e" name="默认变更列表" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/dj/printer/dj_printer/Blutooth.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/dj/printer/dj_printer/Blutooth.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/dj/printer/dj_printer/DjPrinterPlugin.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/dj/printer/dj_printer/DjPrinterPlugin.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/example/pubspec.lock" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -55,13 +60,13 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent"><![CDATA[{ <component name="PropertiesComponent">{
"keyToString": { &quot;keyToString&quot;: {
"dart.analysis.tool.window.visible": "false", &quot;dart.analysis.tool.window.visible&quot;: &quot;false&quot;,
"io.flutter.reload.alreadyRun": "true", &quot;io.flutter.reload.alreadyRun&quot;: &quot;true&quot;,
"show.migrate.to.gradle.popup": "false" &quot;show.migrate.to.gradle.popup&quot;: &quot;false&quot;
} }
}]]></component> }</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" /> <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager"> <component name="TaskManager">
<task active="true" id="Default" summary="默认任务"> <task active="true" id="Default" summary="默认任务">

@ -155,7 +155,7 @@ public class Blutooth {
public void btConn(final String address) throws IOException { public void btConn(final String address) throws IOException {
// bluetoothPort.connect(address); // bluetoothPort.connect(address);
System.out.println("btConn");
new connBT().execute(address); new connBT().execute(address);
} }
@ -240,9 +240,11 @@ public class Blutooth {
try { try {
bluetoothPort.connect(strings[0]); bluetoothPort.connect(strings[0]);
System.out.println("connBT "+strings[0]);
retVal = Integer.valueOf(0); retVal = Integer.valueOf(0);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
System.out.println("connBt"+e.toString());
retVal = Integer.valueOf(-1); retVal = Integer.valueOf(-1);
} }

@ -31,6 +31,7 @@ public class DjPrinterPlugin implements FlutterPlugin, MethodCallHandler {
private static final String CONNECT = "com.connect"; private static final String CONNECT = "com.connect";
Blutooth blutooth = new Blutooth(); Blutooth blutooth = new Blutooth();
private Result re;
@Override @Override
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) { public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
@ -71,6 +72,7 @@ public class DjPrinterPlugin implements FlutterPlugin, MethodCallHandler {
} else if (call.method.equals("connect")) { } else if (call.method.equals("connect")) {
String arg = call.argument("address"); String arg = call.argument("address");
try { try {
System.out.println("打印机连接");
blutooth.btConn(arg); blutooth.btConn(arg);
result.success(true); result.success(true);
} catch (IOException e) { } catch (IOException e) {

@ -42,21 +42,14 @@ packages:
name: characters name: characters
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.1"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
clock: clock:
dependency: transitive dependency: transitive
description: description:
name: clock name: clock
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.1"
collection: collection:
dependency: transitive dependency: transitive
description: description:
@ -84,7 +77,7 @@ packages:
name: fake_async name: fake_async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.3.1"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -122,28 +115,28 @@ packages:
name: matcher name: matcher
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.12.11" version: "0.12.12"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.4" version: "0.1.5"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.7.0" version: "1.8.0"
path: path:
dependency: transitive dependency: transitive
description: description:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.1" version: "1.8.2"
permission_handler: permission_handler:
dependency: "direct main" dependency: "direct main"
description: description:
@ -204,7 +197,7 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.2" version: "1.9.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@ -225,21 +218,21 @@ packages:
name: string_scanner name: string_scanner
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.1"
term_glyph: term_glyph:
dependency: transitive dependency: transitive
description: description:
name: term_glyph name: term_glyph
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.1"
test_api: test_api:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.9" version: "0.4.12"
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:

Loading…
Cancel
Save