All right, in this lecture, I'm going to show you how to use the on off switch angiosperms.
Let's start with a little example.
I'm going to take this switch node from the dashboard collection and drop it onto my compass and to
display the state of the switch.
I'm going to use a text output node just like this, connect the two.
And as usual, let's create a new tap in which I'm going to put the switch and then you text output.
This time I'm going to use the layout tap in the dashboard, tab in the right side toolbar to create
a new group.
So here I am in tap one I've got already group one.
I'm going to add one more group and then edit it and call this one switch group.
On the top to sorry, step one, let's leave it in step one and for its width, let's make it five,
since we are only going to have a couple of small components in it and update.
And now that we've got the second group on the tab, one is got into the switch, edit pain and allocated
into the switch group right here.
I'm going to give it a size of five.
Take the whole width and leave the default icon and then for the what happens when you click on it or
either enable or disable the switch.
You've got plenty of options.
So, of course, the default they suggest send out boolean values, true or false, the way that this
works by default is that when the switch is on payload, it's going to have the boolean true value and
when it's switched off, it's going to have the boolean false value or you can just send it other types
of payloads.
For example, you can send it a string.
You can say hello when the.
Switches turned on goodbye when it's off or send numbers or Jason or whatever else you want.
I'm just going to go with standard boolean values and force for when the switch is turned off.
Right.
Click on Done and then for the switch.
Nothing fancy.
I'm just going to set it its location to the switch group in tab one and I'm going to make this size
also five and I'm going to go for this layout here.
So on the left and the value on the right.
Which is and I'm just going to change the label to some of the three most sense for this example.
OK, click on Done and deploy and have a look now.
And there's no switch group and switch is true, which is false.
Now, again, I'd like to actually switch these two widgets over, so I want to switch to be on top
and then the status in the bottom.
So let's do that.
To do that, I need to go into a couple of ways to do that.
In this case, I'm going to go into the layout tab and I'm going to move actually this in the right
order.
And you can see still doesn't work.
I want wanted to be the other way around.
So then let's go into the layout for the tab and.
Hmmm, maybe switch this over and see what effect that is going to have.
Right, and had no effect.
All right, so let's try something else so you can see what the problem is here, you need to experiment
with this quite a few times and you'll get a tried.
So flip these two widgets over in the layout tab and see if that has an effect.
Yes, it did work this time.
So false and true.
All right.
So she can see that using this switch is pretty straightforward and fairly easy.
Now, let's move on to the next election.
Now we'll show you how to use the dropdown widget.