getUserDetails method

dynamic getUserDetails(
  1. dynamic userData
)

Implementation

getUserDetails(userData) async {
  SharedPreferences _prefs = await SharedPreferences.getInstance();

  _prefs.setInt('userId', userData['id']);
  _prefs.setString('userFullName', userData['name']);
  _prefs.setString('userEmail', userData['email_id']);
  _prefs.setString('userMobile', userData['mobile_number'].toString());
  // _prefs.setString('choiceflag', userData['get_v2_token'].toString());

  userId = await _prefs.getInt('userId');
  userName = await _prefs.getString('userFullName');
  userEmail = await _prefs.getString('userEmail');
  userMobileNumber = await _prefs.getString('userMobile');
  // ChoiseFlag = await _prefs.getString('choiceflag');
}