Skip to content

Control Refs declarations #185

Answered by FeodorFitsner
pamoroso asked this question in Q&A
Discussion options

You must be logged in to vote

Ref is a generic type. Take a look at its sources: https://github.com/flet-dev/flet/blob/main/sdk/python/flet/ref.py
Ref[TextField]() in Python means the same as List<string>() in C#. Well, in Python it's just for type hinting, so IDE know what members to show when you type first_name.current. :)

Looks like a good article: https://medium.com/@steveYeah/using-generics-in-python-99010e5056eb

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pamoroso
Comment options

Answer selected by pamoroso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants