getString static method

Future<String> getString(
  1. String key
)

Implementation

static Future<String> getString(String key) async {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  String result = prefs.getString(key) ?? "";

  if( result == null ) return "";
  if( ToolsValidation.isEmpty( result ) ) return "";

  return result;
}