Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@prolificcoder
Created October 24, 2022 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prolificcoder/4a10593f76cef4772e468951386cbd2d to your computer and use it in GitHub Desktop.
Save prolificcoder/4a10593f76cef4772e468951386cbd2d to your computer and use it in GitHub Desktop.
sample dart code
// This is a string
var str = "demo";
print(str);
var num =23;
print(num);
int num2 = 24;
/**
*
* */
final num3 = 25;
bool day = true;
if(toggle(day)){
print("switch is on");
} else {
print("switch is off");
}
for(var i =0 ; i< 5; i++){
print ("value is: " + i.toString() );
}
//num3 = num3 + num2;
}
bool toggle(bool isDay){
if(isDay){
return true;
}
else {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment