There are some Gotland concepts and styles used in compose that we need to talk about.
Some we already discussed in the previous column lectures but need to go over them again.
And others you might be hearing for the first time because Jetpack Compose is built around Scotland
specific styles we need to get familiar with so that we can easily understand the APIs Campos has available
for us.
So default arguments are initial values given to a method parameter is at the point of creation.
So for example, the Button Composable is created with several parameters for which most of them have
initial values or default arguments, making it possible to call a button composable without needing
to provide values for all of them.
So let's look at the use of button elements.
So the Button Composable requires on click and content arguments.
When we look back in the previous slide, we see that both declarations had no assignment symbol that
is this equal sign, making it necessary to provide them when the method is called and others are optional,
depending on the requirements you have for the composable.
So you see here there are many that have an equal sign, which means they have something defined to
them by default.
All right.
Another concept is higher order functions, which are functions that accept order functions as an argument
and compose uses them a lot.
Let's look at this example with the court block we can directly at the function body with what should
happen when the button is clicked, and that is using a function as an argument, which is possible
with the help of Lambda.
So we can also decide to create a normal functioning and call it within the block itself.
So we have used trailing lambdas already in previous lectures.
They are a special syntax for calling higher order functions whose power meter is a lambda outside of
parentheses.
So the romance requires a content parameter, which is a London.
So this code works but can look better when placed outside of the parentheses.
This is an example of a trading lumber, which is outside the role parentheses, and therefore the parentheses
is removed.
This way, it looks more concise and less cumbersome.
So let's compare that you see.
Like this.
So we didn't need to define the content in the brackets and so forth.
So next, our delegated properties.
These are variables declared with the by keyword and are usually associated with a state.
For example, the name state is declared using the remember keyword, and then it's used within the
text field to track the value directly when it changes.
We will see more of this in coming lectures.
And then destructing data classes, so destructing simply means creating multiple variables at once,
an example, this one creating reference ID and constraint layout as we have used before with create
refs, we can create different IDs at a goal and use them as required, so we don't need to set them
up all one by one.
A very important additional aspect of what we need to look at our code routines, which offer asynchronous
programming support and can suspend execution without blocking the main threat and jetpack compose is
a reactive UI framework and changes its state as the user interacts with it.
These states can require heavy processing and need to be performed without blocking the UI.
Threat Compose makes this easier by embracing code routine at API level rather than using callbacks.
So let's look at an example here.
A snack bar function is a call routine function, and we can easily call the Remember code routine scope
and then launch a block for show snack bar.
So showing the snack bar.
We're going to learn more about all of the idiomatic Cortland codes in the coming lectures.
All right, so this was a little overview slash introduction to new topics just to give you a first
look at them.
We are going to work with those in more depth, obviously.
So see you in the next couple of videos.