简体   繁体   English

将 Cordova 插件转换为 Flutter 插件

[英]Convert Cordova Plugin to Flutter Plugin

I'm now converting my Android POS App to use Flutter Framework, my existing App was using Cordova Framework.我现在正在将我的 Android POS 应用程序转换为使用 Flutter 框架,我现有的应用程序使用的是 Cordova 框架。

For this POS application, I used Cordova Bluetooth Printer Plugin to deal with a portable bluetooth printer as an output printer.对于这个 POS 应用程序,我使用 Cordova 蓝牙打印机插件来处理作为输出打印机的便携式蓝牙打印机。

Now, I was trying to find Flutter Plugins that support bluetooth printer.现在,我试图找到支持蓝牙打印机的 Flutter 插件。 But I didn't find one.但是我没有找到。

I was thinking to convert the Cordova plugin to Flutter plugin.我正在考虑将 Cordova 插件转换为 Flutter 插件。 I want to convert this plugincordova-plugin-datecs-printer我想转换这个插件cordova-plugin-datecs-printer

Because, I didn't have much experience in Java.因为,我在 Java 方面没有太多经验。

My Questions, is it possible to convert the Cordova plugin by using the Java functional code that already made in the existing cordova plugin?我的问题,是否可以使用现有cordova插件中已经制作的Java功能代码来转换Cordova插件?

Can someone please help me to do it step by step or give me an overview to do the convertion.有人可以帮我一步一步地做,或者给我一个概述来做转换。

Flutter has bluetooth printer plugins that you may want to try: esc_pos_bluetooth and bluetooth_print . Flutter 有你可能想尝试的蓝牙打印机插件: esc_pos_bluetoothbluetooth_print

As for converting Cordova plugins to Flutter, this is possible.至于将 Cordova 插件转换为 Flutter,这是可能的。 But since you've mentioned that you have little experience working with platform-specific code ie Android, it might be more feasible to use existing Flutter plugins instead.但是由于您提到您几乎没有使用特定于平台的代码(即 Android)的经验,因此改用现有的 Flutter 插件可能更可行。 It is possible though.不过也有可能。 Here's a guide for developing packages and plugins for Flutter.这是为 Flutter 开发包和插件的指南

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM