getController method

T getController({
  1. String? tag,
})

Implementation

T getController({String? tag}) {
  if (global) {
    if (Get.isRegistered<T>(tag: tag) || Get.isPrepared<T>(tag: tag)) {
      return Get.find<T>(tag: tag);
    } else {
      return Get.put<T>(_baseController, tag: tag);
    }
  } else {
    return _baseController;
  }
}