
import 'package:flutter_zsdk/src/models/bluetooth_printer.dart';

import 'src/flutter_zsdk_platform_interface.dart';

class FlutterZsdk {
  Future<String?> getPlatformVersion() {
    return FlutterZsdkPlatform.instance.getPlatformVersion();
  }

  Future<Stream<dynamic>> findBluetoothPrinters() {
    return FlutterZsdkPlatform.instance.findBluetoothPrinters();
  }

  Future<void> openConnection(String macAddress) {
    return FlutterZsdkPlatform.instance.openConnection(macAddress);
  }

  /// this api must not be called before FlutterZsdkPlugin.openConnection()
  Future<bool> isConnected() {
    return FlutterZsdkPlatform.instance.isConnected();
  }

  Future<void> closeConnection() {
    return FlutterZsdkPlatform.instance.closeConnection();
  }

  Future<void> printZplOverBluetooth(String zplData) {
    return FlutterZsdkPlatform.instance.printZplOverBluetooth(zplData);
  }
}
