If you’re following along with the To Do list series, here’s the first part:
The next thing we need in our to do app is the ability to mark things as “Done”
Design
To do this we’re going to draw a line through the text, just like the icon for this sample project below.
Since there is no block to change the line-through
property dynamically, we’re going to improvise (H/T to @Steven for suggesting this)
Essentially we need two labels, one for plain text and one for line-through text that we can show/hide as need in our blocks.
To find the line-through
property, go to Advanced > Text Style > Text Decoration Line
Blocks
The blocks themselves couldn’t be simpler. Pressing the switch simply hides one label and shows the other:
Bonus: Better Blocks!
We always encourage you to be as economical with your blocks as possible, so in the interest of optimisation, here’s a more efficient way of doing the exact same as the image above;
We also have a TextInput that can be used to change the label text. The only thing to note is that both the plain-text and the line-through labels need to be changed.
This will form the basis of our dynamic To Do list app in part 3.
Remix this project
https://x.thunkable.com/copy/7c3e509c8e8ae69fba505cbf0267fd98