Reputation: 311
Now I'm learn Dartlang and don't understand how on this language write onClick action for some cases. I know, it's like a java, but i confused. Example: simple case. I have element with class "button" and div element with "dropdown" class. How to add/remove "open" class to "dropdown" element after click element with "button" class?
void dropdown(part) {
...
}
Upvotes: 2
Views: 414
Reputation: 657871
This might be what you're looking for
querySelector('.button').onClick.listen((event) => dropdown(...));
Upvotes: 3