Help with SwiftUI Binding function parameter.

I have the following function decleration:

func validName<I:Hashable>(name: String, focusState: Binding<FocusState<I.Type>>, fieldToFocusNext: I.Type, fieldToFocusOnError: I.Type, showError: Binding<Bool> ) -> Bool
{
return true
}

I'm getting this error on the FocusState binding parameter:

Type 'I.Type' does not conform to protocol 'Hashable'

It sure seems I have declared it as a Hashable. What and I doing wrong?

Unless I'm mistaken, in your function you have declared the instance of I as Hashable, but not the Type. So maybe you should try this... func validName<I:Hashable>(name: String, focusState: Binding<FocusState<I>>, fieldToFocusNext: I, fieldToFocusOnError: I, showError: Binding<Bool> ) -> Bool?

Help with SwiftUI Binding function parameter.
 
 
Q