Skip to content

Instantly share code, notes, and snippets.

@tayormi
Created October 31, 2022 13:13
Show Gist options
  • Select an option

  • Save tayormi/5c24c309510289039edf2c391a6be007 to your computer and use it in GitHub Desktop.

Select an option

Save tayormi/5c24c309510289039edf2c391a6be007 to your computer and use it in GitHub Desktop.
void main() {
onSelectNotification('agencyNotification', 'HereThere');
}
void onSelectNotification(String type, String data) {
switch (type) {
case 'agencyNotification':
case 'newAdsInSearch':
if(data == 'HereThere') {
print("Handle Search");
} else {
print("Go to Real Estate");
}
break;
case 'agencyInvitationAcceptedNotification':
case 'createRecommendationNotification':
case 'requestRecommendationNotification':
default:
print("Go to Notifications");
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment