How can I detect an empty block (in multiplatform ...
# getting-started
m
How can I detect an empty block (in multiplatform common code)? If I don't pass a click handler into a compose function I don't want it to show the icon that would be clicked if it had a handler. So how do I detect the empty block?
j
If I don't pass a click handler into a compose function
If you need to represent the absence of handler, you should probably make it nullable with null default value, instead of using a noop empty block as default.
plus1 2
👍 1
n
You can do something like these
🙏 1