title: Proper way to persist / store data in GetXController in flutter
body: <p>I have this class  and use &quot;reactive&quot; state management e.g.</p>
  <p><code>&quot;&quot;.obs</code></p>
  <p>Now I plan to initialize my state from local storage (get_storage) <code>onInit()</code></p>
  <p>problem:</p>
  <p>where do I persist my data? As soon as some state changes, I want to persist it as well.</p>
  <p>I tried using a listener but it never fires.</p>
  <p>Currently I have this:</p>
  <pre><code>class CosController extends GetxController {
    final box = GetStorage();
  
    RxString econtactnr = ''.obs;
  
    @override
    void onInit() {
      super.onInit();
      addListener(() { //NEVER fires
        print('hellowwww listener');
      });
      econtactnr.value = box.read('econtactnr') ?? '';
  }
  </code></pre>
  <p>What is a best practice to store state to disk in GetXControllers using reactive state management?</p>
  <p><strong>EDIT</strong>: I noticed that you can do:</p>
  <pre><code>    econtactnr.listen((x) {
        box.write('econtactnr', econtactnr.value);
      });
  </code></pre>
  <p>question: is that ok? do I have to cancel that subscription as well?</p>