Skip to content

How to use dialog in class? #73

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

You must be logged in to vote

Yep, you got it right. Another way would be:

	def play(self,e):
		dia = AlertDialog(
		title=Text('text'),
		actions=[TextButton("OK")],
		actions_alignment="end",
		)   
		self.page.dialog = dia
		dia.open = True
		self.page.update()

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

Answer selected by HaoTian22
Comment options

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

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