So now we will talk about stateful widgets estate state as I say it half the state.
We read this and type in STF and we can click enter and now we get a state for which it creates in our
case we would name that minor state full which would
and got it like this.
And firstly we see this time we get two classes and that's because we get class for our state.
So this is like more or less so there's more or less the same but we get like state.
And also we have to change this up here.
Copy it and place it.
Yeah.
So firstly we have my state budget state expenses state for the budget.
Then we've got to override it and we override the great state Methot and we wanted to create a state
method.
You got my state for budget state which is this Gladstone here which extends its state from my state
for a widget.
And here we've got our Widger to boot boot context context and we've got our return contained and I
saw this build is exactly as we had it before.
And here we can simply creates all our widget again so we said call us red then child we you is sent
to cental it and then we use Eraste button race button as a child was to use child and then race button
and this race button also takes child which takes text and we just say click and then we need on preste
And here we put on parentheses first and then our sharp brackets.
So we created button now and look at it direction object.
OK.
We need to specify all our text direction text or action action left or right and reload it's.
And then we've got hot button here with click on it.
So and then we defined on preste And here we set with our parentheses in al-Shaab parentheses.
This is basically.
And then the most functionally we didn't talk about.
This was basically works as a normal function but has no name.
So we just want to execute the code that stance year one time and we don't need a name because we don't
want to execute it somewhere.
So that's basically what the anonymous function does.
And we just want to print something out and just print it.
Hey from my state
widget and closet like this and restart all app
and restart it and click it and we see high from my state for which it.
So all compressed functionality works just fine.
And yes stateful widgets can be a little bit overwhelming for us bots.
One thing you will just work and this part.
So this is this other class where we overwrite Z the create state method is not really important so
you can more or less just forget about it.
It's just as important for the background so you can just make it smaller and just forget about it for
now.
If you're not too interested in it and then yeah this is like our main point where we put all our logic
and our different styles he and so on for widgets in it.
So ever seeing that's important to come here and this is just more or less for background for creating
the state in the background.