Skip to content

Instantly share code, notes, and snippets.

@prolificcoder
Created October 24, 2022 00:27
Embed
What would you like to do?
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