NebulaFlutterPlugin class
Main entry point for the Nebula Flutter Plugin.
Provides unified APIs for:
- Connecting via TCP, Bluetooth, USB, or Cloud (MQTT)
- Sending transaction requests
- Receiving transaction responses and callbacks
- Messaging between devices
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bindDeviceByCloud(
CloudConfig config, {int timeout = 20000}) → Future< bool> - Bind via Cloud (MQTT).
-
cancelTransaction(
) → Future< bool> - Cancel a running transaction.
-
connectBluetooth(
String identifier, {int timeout = 20000}) → Future< bool> - Connect via Bluetooth.
-
connectCloud(
{int timeout = 20000}) → Future< bool> - Connect via Cloud (MQTT) using previously bound devices parameters.
-
connectTcp(
String host, {int port = 30999, int timeout = 20000}) → Future< bool> - Connect via TCP (WiFi).
-
connectUsb(
{int timeout = 20000}) → Future< bool> - Connect via USB.
-
disconnect(
) → Future< void> - Disconnect current connection.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendMessage(
String packageName, String message) → Future< void> - Send a message to a connected device.
-
setOnChooseAppCallback(
OnChooseAppCallback? callback) → void - Set callback for choosing an app.
-
setOnConnectionStatusCallback(
OnConnectionStatusCallback? callback) → void - Set callback for connection status changes.
-
setOnMessageReceivedCallback(
OnMessageReceivedCallback? callback) → void - Set callback for receiving messages from connected device.
-
startRefundTransaction(
RefundRequest request) → Future< TransResponse> - Start a refund transaction.
-
startSaleTransaction(
SaleRequest request) → Future< TransResponse> - Start a sale transaction.
-
startSettleTransaction(
SettleRequest request) → Future< Map< String, dynamic> > - Start a settle transaction.
-
startTransaction(
String category, Map< String, dynamic> request) → Future<Map< String, dynamic> > - Start a generic transaction.
-
startVoidTransaction(
VoidRequest request) → Future< TransResponse> - Start a void transaction.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited