komutun tamamı bu
`class _HomePageState extends State<HomePage> {
int firstnum;
int secondnum;
String texttodisplay = “0”;
String result;
String operationtoperform;
void buttonclicked(String buttontext) {
if (buttontext == “C”) {
texttodisplay = “0”;
firstnum = 0;
secondnum = 0;
result = “0”;
} else if (buttontext == “+” ||
buttontext == “-” ||
buttontext == “x” ||
buttontext == “/” ||
buttontext == “%” ||
buttontext == “+/-”) {
firstnum = int.parse(texttodisplay);
result = "";
operationtoperform = buttontext;
} else if (buttontext == “=”) {
secondnum = int.parse(texttodisplay);
if (operationtoperform == “+”) {
result = (firstnum + secondnum).toString();
}
if (operationtoperform == “-”) {
result = (firstnum - secondnum).toString();
}
if (operationtoperform == “x”) {
result = (firstnum * secondnum).toString();
}
if (operationtoperform == “/”) {
result = (firstnum / secondnum).toString();
}
if (operationtoperform == “%”) {
result = (firstnum % secondnum).toString();
}
} else {
result = int.parse(texttodisplay + buttontext).toString();
}
setState(() {
texttodisplay = result;
});
}`