searchSuggestions top-level property
Implementation
List<SearchSuggestion> searchSuggestions = <SearchSuggestion>[
//help
SearchSuggestion(
name: helpCenter,
aliases: <String>[
'help',
'help center',
'center',
'need help',
'FAQS',
'faqs',
'FAQ',
'faq'
],
image: SvgPicture.asset(helpTabIconUrl, color: Colors.grey),
onTap: (BuildContext context) async {
triggerNavigationEvent(context: context, route: helpCenterPageRoute);
},
route: helpCenterPageRoute,
),
//profile
SearchSuggestion(
name: userProfile,
aliases: <String>[
'profile',
'prof',
'my profile',
'user profile',
'profile info',
'profile information'
],
image: SvgPicture.asset(patientsTabIconUrl, color: Colors.grey),
onTap: (BuildContext context) async {
triggerNavigationEvent(context: context, route: userProfileRoute);
},
route: userProfileRoute,
),
//find patient
SearchSuggestion(
name: patientFind,
role: patientRole,
aliases: <String>[
'find a patient',
'find patient',
'find my patient',
'patient find',
'search patient',
'search for a patient',
'search a patient',
'patient search'
],
image: SvgPicture.asset(patientsTabIconUrl, color: Colors.grey),
onTap: (BuildContext context) async =>
triggerNavigationEvent(context: context, route: patientsPageRoute),
route: patientsPageRoute,
),
// add patient
SearchSuggestion(
name: patientAdd,
role: patientRole,
route: addPatientRoute,
aliases: <String>[
'add a patient',
'add patient',
'add my patient',
'patient add',
'register patient',
'patient registration',
'register a patient',
'patient register'
],
image: SvgPicture.asset(editIcon, color: Colors.grey),
onTap: (BuildContext context) async =>
triggerNavigationEvent(context: context, route: addPatientRoute),
),
];