calcCell_Negative method
Implementation
calcCell_Negative(XCol xCol, TextEditingController controller, numForCalc) {
var x;
if (controller.text == "") {
} else {
if (xCol.dataType == double) {
x = double.parse(controller.text);
if (x > 0) {
var res = (x - numForCalc);
if (res < 0) {
} else {
controller.text = res.toString();
}
}
} else if (xCol.dataType == int) {
x = int.parse(controller.text);
if (x > 0) {
var res = (x - numForCalc);
if (res < 0) {
} else {
controller.text = res.toString();
}
}
} else {
x = int.parse(controller.text);
if (x > 0) {
var res = (x - numForCalc);
if (res < 0) {
} else {
controller.text = res.toString();
}
}
}
}
return x;
}