Welcome back in this video, we're going to set up this part here where we see the next upcoming exercise
while we are in the rest view.
OK, so this is the rest of you and then comes the exercise for you.
And here we have jumping jacks.
OK, so let's implement that.
And you can, of course, try to do this yourself.
I would highly recommend it, actually.
You should be able to do all of the things that you need for this part.
OK, so therefore, we need to go to our activity exercise and we need to display underneath our get
ready for.
OK, so I'm going to put it underneath the frame a layout which we called the Isle of Rest view.
OK, so here let me jump to it.
This is the image view and this is the rest of you.
OK, so underneath it.
That's why I'm going to put it, and it will just be two text views.
OK, so we can get inspired by another text, you or me?
Take that one here.
Let's change the name.
This will be the text you upcoming.
So TV up coming label.
Like, so then it's repping the content, it's start and end of to parent top to bottom of, it's going
to be the AFL, the rest of you and the bottom to top off, we don't have that here.
Bottom to top of should be.
The TV upcoming.
Exercise named OK.
And we need this texture, upcoming exercise name underneath, so actually, let me duplicate this texture
here.
Kim, by the way, also get rid of this visibility, be gone because it will be active at the start.
So this one will be the TV upcoming exercise name, rep, content rep, content.
And it should be.
Top to bottom of the upcoming labor and bottom to top of I'm going to get rid of this.
And the text is something that we're going to set in the code.
By the way, I'm going to change the color to color.
I think it was primary, which is this grayish color.
So let's use color primary here as well.
And then let's also change the text to upcoming exercise and the text size to 16 ESP.
And we just need to make sure that the text view to the upcoming label is at the bottom of the AFL rescue
and towards the top of our TV upcoming exercise, a name which is this one here which is at the bottom
of our TV upcoming label.
OK, so now that we have done, let's go over to our code and here in our set up Crestview, we will
need to set up those two text views.
So binding dart TV and upcoming label visibility should be set to active, so on to visible.
All right.
So we're going to make it visible.
And then the same thing goes for our TV upcoming exercise name.
So we want to make that visible as well.
So view that visible.
Now we, of course, need to set its text.
So that will be the text that we need to set manually every time or not, and manually but actively.
And here we can therefore override text property.
We could, of course, also do it up here.
It doesn't really matter.
So we're going to set up the text property to be the next exercise.
OK, so you can access to exercise a list at the position of current exercise position plus one.
And then we need to get the name from it.
OK, so this will give us the name of the exercise because that's what we want to set, right?
So our exercise list is the list of exercise models.
OK, and then we get the name from.
And this will be at the first iteration.
It will be jumping jack.
Then we'll set push up and so forth.
OK.
So now that we have set all of those things up so that they are visible at this point, we need to also
make sure that it would be invisible at the other point.
So let's make sure that once we jump over to our exercise view, we also make them invisible.
So let's just take those two new values that we added, and let's make them invisible at this point.
So here in.
Visible and the same goes for here in Visible.
So those two that we just added will be invisible.
OK, and I believe at this point we can try it.
Let's see if there is something wrong.
Case incompatible.
So it seems like I have set it up the wrong way.
So lay out constraint bottom of TV upcoming.
Exercise name.
And that is, of course, because I haven't added that ID here at I.D. and.
Then we should be fine.
OK, let's try it again.
And there we are.
And with the upcoming exercise, we'll be jumping jacks.
So get ready for upcoming exercise, jumping jacks and the timer runs, and once it's over, it jumps
to jumping jacks.
And now, of course, what we could do is we could test this where we see we get this both a bunch of
errors.
So if that happens, rerun the application, then it should be fine.
Otherwise, you can also clean the product rebuild as well as invalidate caches and restart.
That's also an option.
But it seems like it's fine.
So what you want to change in order to test it was to change that to 30 seconds and that to 30 seconds
as well.
So let's run it again to see if it not only works for the first one, but also works for the other ones.
So jumping jacks one to three and then get ready for, Walz said.
Was.
And then one to three get ready for push up and push up.
Perfect.
So that seems to work.
So we are happy that it works.
OK, so that's it for this video.
See you in the next one.