agarWidget function

Widget agarWidget(
  1. dynamic firstValue,
  2. String operator,
  3. dynamic secondValue,
  4. Widget trueWidget,
  5. Widget falseWidget,
)

Implementation

Widget agarWidget(dynamic firstValue,String operator,dynamic secondValue,Widget trueWidget,Widget falseWidget){
  bool returnBool=false;
  if(operator=="=") {
      returnBool= firstValue == secondValue;
    }

  if(operator=="!="){
      returnBool= firstValue != secondValue;
    }
  if(operator==">") {
      returnBool= firstValue > secondValue;
    }

  if(operator==">=") {
      returnBool= firstValue >= secondValue;
    }
  if(operator=="<=") {
      returnBool= firstValue <= secondValue;

    }
  if(operator=="<") {
      returnBool= firstValue < secondValue;
    }

  if(returnBool==true){
    return trueWidget;
  }else{
    return falseWidget;
  }
}