Closed boctor closed 1 month ago
Thanks! I'm curious about the motivation here. What are you using the visual transformation for, and how are you accomplishing the same on the iOS side? And why the onChange block rather than using SwiftUI's own onChange modifier?
I think we're close to landing on a more comprehensive way of doing Android-specific component customization. So I'll be honest that I don't think we'll use this patch, but seeing what you need and understanding the motivations is definitely helping shape the API we're coming up with.
Closing since these customizations are now possible with the Material 3 component customization API in #70
VisualTransformation
for changing the visual output of the textonValueChange
closure to process the textfield's text as it changesIf these customizations aren't provided, then the previous behavior is maintained:
VisualTransformation
,PasswordVisualTransformation
is used whenisSecure
otherwiseVisualTransformation.None
is usedonValueChange
, the text binding is set to the new text value without changeExample usage:
Skip Pull Request Checklist:
swift test