Advertisement
anik11556

fetchandsendcredential

Nov 7th, 2023 (edited)
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. date:11-07-2024:
  2. #to get a user by user_id:
  3. import 'package:dhabiansomachar/SM/ModelClass/LoginCredential.dart';
  4. if(widget.user.id == LoginCredentials().loggedInUser?.id)
  5. {
  6. user = LoginCredentials().loggedInUser!;
  7. }
  8. else
  9. {
  10. user = SpecificWant().specificUserFromJson(widget.user.id);
  11. }
  12.  
  13. ----------------------------------------------------------
  14.  
  15. past:
  16. /*
  17. FetchCredential fc = FetchCredential();
  18. Object uk = await fc.findCredential();
  19. User us = uk as User;
  20. print(us.country);
  21.  
  22. */
  23. /*
  24. Credential sc = Credential();
  25. //sc.saveCredential(us);
  26. User us = await sc.getCredential();
  27. print(us.userName);
  28.  
  29.  
  30. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement