MethodChannelFlutterSimpleBluetoothPrinter constructor

MethodChannelFlutterSimpleBluetoothPrinter()

Implementation

MethodChannelFlutterSimpleBluetoothPrinter() {
  methodChannel.setMethodCallHandler((call) {
    _methodStreamController.add(call);
    return Future(() => null);
  });
  eventChannel.receiveBroadcastStream().listen((event) {
    if (event is Map && event.containsKey("state")) {
      var state = BTConnectState.values[event["state"]];
      _connectStateStreamController.add(state);
    }
  });
}