Select Git revision
base_controller.dart
-
Rakshitha Salian authoredRakshitha Salian authored
base_controller.dart 15.77 KiB
/* Created by Nitesh Kumar on 05/28/24 */
import 'dart:async';
import 'dart:io' show Platform;
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:dio/dio.dart';
import 'package:exide_crr/data/app_env.dart';
import 'package:exide_crr/data/remote_config_helper.dart';
import 'package:exide_crr/preferences/app_shared_preferences.dart';
import 'package:exide_crr/services/service_locator.dart';
import 'package:exide_crr/utils/helper_class.dart';
import 'package:exide_crr/utils/miscellaneous.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:url_launcher/url_launcher.dart';
class BaseController extends GetxController with WidgetsBindingObserver {
final tag = "BaseController";
late PreferenceHelper preferenceHelper;
final RemoteConfigHelper remoteConfigHelper = locator.get<RemoteConfigHelper>();
RxBool isGeneralConfigLoading = false.obs;
Completer<void> generalConfigFetchCompleter = Completer<void>();
///verifyOtp
RxString generatedOtp="".obs;
//todo-Fetch the phone number from welcome screen
RxString userPhoneNumber="919945215727".obs;
String encryptedSseId = "";
String userName = "";
String fullName = "";
String userDesignation = "";
String userEmail = "";
String empMobileNo = "";
String empWorkLocation = "";
String assetUrl = "";
String userSelectedLob = "";
String userSelectedChannel = "";
String forgetPasswordUrl = "";
bool feedbackType = false;
String apiEncryptionKey = "";
String clientId = "";
String clientSecretKey = "";
List<String> channels = [];
String sseId = "";
String deviceTokenString = "";
String lookerDashboardUrl = "";
RxString currentVersion = "".obs;
String appVersion = "";
// --- considering default user type id as zero ---
int userTypeId = 0;
String apiEncryptionSecretKeyBIP = "";
RxList newFeatureList = [].obs;
RxString docsId = "".obs;
String buildNumber = "";
String buildVersion = "";
RxBool isNoInternet = false.obs;