Skip to content

Boolean extentions

Mohamed Dawood edited this page Mar 21, 2021 · 1 revision

Boolean extentions

  • onTrue
  • onTrueOrNull
  • onFalseOrNull
  • onFalse
    final v = true;
    var res1 = v.onTrue("1"); // will return 1;
    var re2 = v.onFalse("1", "2"); // will return 2;
    
    InkWell(
      onTap: v.onTrue(() {
        print("1"); //this will be 
      }),
    );
Clone this wiki locally