getIdent function
- WidgetRef ref
Implementation
String getIdent(WidgetRef ref) {
Map<String, Role> roles = ref.read(rolesProvider);
// Extract the first variable with the role 'ident' from the rolesProvider.
final ident = roles.entries
.firstWhere(
(entry) => entry.value == Role.ident,
orElse: () => const MapEntry('', Role.ignore),
)
.key;
return ident;
}