Created
October 24, 2022 00:27
-
-
Save prolificcoder/4a10593f76cef4772e468951386cbd2d to your computer and use it in GitHub Desktop.
sample dart code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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