According to the information from the system, I want the user to see a popup when he first logs into the application.I want.Any ideas on how to do it?
For example, a person who completes a hospital appointment evaluates the service he received with a pop-up that will appear the next time he logs into the application.I want this popup to appear only once. The person went to the hospital, completed his appointment, this information came from the system, and the next time he entered, a popup appeared directly in front of him. This is the scenario
CodePudding user response:
You can use: https://pub.dev/packages/shared_preferences
When app is start then dialog is open you to save one boolean like isFirstTime == false
await prefs.setBool('newUser', isFirstTime);
When your is came again into the app, have to check in pref boolean is available or not
final bool? isFirstTime = prefs.getBool('newUser');
if(isFirstTime){
openDialog();
}
if the value is false
then will not show pop up