Get item clicked and passing to another class

Could I get a little help please with the below, i tried to post here but the formatting looked terrible

Hello and welcome!
You got an answer 3 minutes ago in S.O. Anyway to post formatted code here you can use the
</> preformatted text tool in the message toolbar

EDIT: if you want syntax highlighting instead, wrap the code snippets with triple back-ticks

// Syntax highlighting with triple back-ticks

String greet(String name) {
  return 'Hello, $name';
}

Hth.

1 Like