content: import 'package:flutter/material.dart';
  import 'package:flutter_secure_storage/flutter_secure_storage.dart';
  import 'package:shared_preferences/shared_preferences.dart';
  
  class SharedPrefHelper {
    SharedPrefHelper._();
  
    
    static removeData(String key) async {
      SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
      await sharedPreferences.remove(key);
    }
  
    static clearAllData() async {
      debugPrint('SharedPrefHelper : all data has been cleared');
      SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
      await sharedPreferences.clear();
    }
  
  
    static setData(String key, value) async {
      SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
      debugPrint("SharedPrefHelper : setData with key : $key and value : $value");
      switch (value.runtimeType) {
        case const (String):
          await sharedPreferences.setString(key, value);
          break;
        case const (int):
          await sharedPreferences.setInt(key, value);
          break;
        case const (bool):
          await sharedPreferences.setBool(key, value);
          break;
        case const (double):
          await sharedPreferences.setDouble(key, value);
          break;
        default:
          return null;
      }
    }
  
   
    static getBool(String key) async {
      debugPrint('SharedPrefHelper : getBool with key : $key');
      SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
      return sharedPreferences.getBool(key) ?? false;
    }
  
  
    static getDouble(String key) async {
      debugPrint('SharedPrefHelper : getDouble with key : $key');
      SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
      return sharedPreferences.getDouble(key) ?? 0.0;
    }
  
  
    static getInt(String key) async {
      debugPrint('SharedPrefHelper : getInt with key : $key');
      SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
      return sharedPreferences.getInt(key) ?? 0;
    }
  
  
    static getString(String key) async {
      debugPrint('SharedPrefHelper : getString with key : $key');
      SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
      return sharedPreferences.getString(key) ?? '';
    }
  
  
    static setSecuredString(String key, String value) async {
      const flutterSecureStorage = FlutterSecureStorage();
      debugPrint(
          "FlutterSecureStorage : setSecuredString with key : $key and value : $value");
      await flutterSecureStorage.write(key: key, value: value);
    }
  
    /// Gets an String value from FlutterSecureStorage with given [key].
    static getSecuredString(String key) async {
      const flutterSecureStorage = FlutterSecureStorage();
      debugPrint('FlutterSecureStorage : getSecuredString with key :');
      return await flutterSecureStorage.read(key: key) ?? '';
    }
  
    /// Removes all keys and values in the FlutterSecureStorage
    static clearAllSecuredData() async {
      debugPrint('FlutterSecureStorage : all data has been cleared');
      const flutterSecureStorage = FlutterSecureStorage();
      await flutterSecureStorage.deleteAll();
    }
  }
  