title: setNotifyValue on Two BLE Characteristics
body: <p>I can't seem to setNotifyValue for more than one characteristic in the same BLE service. The app always crashes when the second setNotifyValue is called. </p>
  
  <p>If I comment setNotifyValue out on either one of the characteristics and recompile, the app works well and provides a live stream of incoming data. </p>
  
  <pre class="lang-dart prettyprint-override"><code>
  class DeviceScreen extends StatelessWidget {
    const DeviceScreen({Key key, this.device}) : super(key: key);
    final BluetoothDevice device;
    static String CHARACTERISTIC_UUID_BTN =
        "0000ab0a-1212-efde-1523-785fef13d123";
    static String CHARACTERISTIC_UUID_TEMP =
        "0000beef-1212-efde-1523-785fef13d123";
  
    Widget _myService(List&lt;BluetoothService&gt; services) {
      Stream&lt;List&lt;int&gt;&gt; btn_stream;
      Stream&lt;List&lt;int&gt;&gt; temp_stream;
      services.forEach((service) {
        service.characteristics.forEach((character) {
          if (character.uuid.toString() == CHARACTERISTIC_UUID_BTN) {
            character.setNotifyValue(true);
            btn_stream = character.value;
          }
          if (character.uuid.toString() == CHARACTERISTIC_UUID_TEMP) {
            character.setNotifyValue(true);
            temp_stream = character.value;
          }
        });
      });
      return Container(
          //eric code
          child: StreamBuilder&lt;List&lt;int&gt;&gt;(
        stream: btn_stream,
        builder: (BuildContext context, AsyncSnapshot&lt;List&lt;int&gt;&gt; btn_snapshot) {
          return StreamBuilder(
            stream: temp_stream,
            builder:
                (BuildContext context, AsyncSnapshot&lt;List&lt;int&gt;&gt; temp_snapshot) {
              if (btn_snapshot.hasError)
                return Text('Error : ${btn_snapshot.error}');
              if (temp_snapshot.hasError)
                return Text('Error : ${temp_snapshot.error}');
  
              if ((btn_snapshot.data != null) &amp;&amp; (temp_snapshot.data != null)) {
                if ((btn_snapshot.data.length != 0) &amp;&amp;
                    (temp_snapshot.data.length != 0)) {
                  int incoming_counts = btn_snapshot.data[0];
                  int incoming_temp = temp_snapshot.data[0];
                  return Text(incoming_counts.toString() +
                      " " +
                      incoming_temp.toString());
                } else {
                  return Text("Synced! Waiting for input");
                  //return Text(btn_snapshot.data.toString() +
                  //  " " +
                  //  temp_snapshot.data.toString());
                }
              } else {
                return Text("Waiting to sync...");
                //return Text(btn_snapshot.data.toString() +
                //    " " +
                //    temp_snapshot.data.toString());
              }
            },
          );
        },
      ));
    }
  
  </code></pre>
  
  <p>I'm hoping that both "incoming_counts" and "incoming_temp" will live update as new data becomes available from the bluetooth peripheral. However, when assigning the streams, the second time calling character.setNotifyValue(true); throws an error:</p>
  
  <p>Exception has occurred.
  PlatformException (PlatformException(set_notification_error, error when writing the descriptor, null))</p>