setupController method

void setupController({
  1. required AtSyncUIController controller,
})

Implementation

void setupController({required AtSyncUIController controller}) {
  if (_syncUIController != null) {
    _syncUIController?.dispose();
    _syncUIController = null;
  }
  _syncUIController = controller;
  _syncUIController?.loading.addListener(() {
    if (_syncUIController?.loading.value == true) {
      showDialog();
    } else {
      hideDialog();
    }
  });
}