Hello friends welcome back. Today in this video I am going to develop our second project named calculator. And this project I will use button visit our calculator will look like this. So let's move on Bye but attained route or recess resettable pseudo pseudo it becomes fixed size our application will be of fixed size Our application will always remains at the top of the screen by writing this at this line of code. By writing this, we have created a label With one named calculator app, now let some define variables. calculation to label route comma text variable call to equation by writing this result equation will continue are reserved.
And when we do some calculation, our result is shown there. Question dot set interview expression as I showed you before. ghoulish dot grid columns call to eight know there let's make our 13 to 15 buttons from zero to nine and plus minus divide multiplication equal to clear this all buttons that start Zero. Call to report on Route text a call to zero. Come on, quarter to one equal to solid grade growth equal to six column equal to two karma bad x 10 karma bad boy just like it. We will create some more buttons.
Just copy this whole line and paste it 1-234-567-8123 or 5678 you have to do version here also on 278 And now we have to do production here 31323 444123 All right, bye. You have to do some more buttons. Go up and nine and then we add minus than four multiply or divide. Then four call and at last for clear nine Isn't it plus, minus, Multiply Divide equal clear minus equal to two years or this I will make a new command clear Press on this world press. Let's do some change here. 343 for Four Four and now here five, four then 646361 dot mean, you know let me define all the function which we have created now.
First by The button press any variable name equation then equation equal to equation plus spring equation offset offset Now for definition equal press, which you can below. Cool. Press PTC is treatment global Upset total At last you going to make or definition for clear press For cleared empty string set naming string, string, Zoo there. Now I think there's no error. Yeah. Go flutter app, the turtle which we had returned here.
Calculator app. This is the level enter your x equation here we return then 123445678 910 is all real is less here plus minus into equal to c divide all now see know how some demo three plus three equal to six. Now, I want to clear this clicked clear all clear nine less life into 954 and then clear this is a very good example for estimating on button visit as well as level and also for grid which I told you geometry geometry management method row calls span how to write it how to Use them and very good manner in spit in various specified manner. So, this is in this project to calculator. source code is also available, you can check out in my GitHub repository. So don't know.
Happy coding. Keep learning and keep moving