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
void main() { | |
//objects | |
Car lexusEs300 = Car('grey'); | |
print(lexusEs300.colour); | |
lexusEs300.drive(); | |
lexusEs300.currentSpeed = 57.4; | |
lexusEs300.drive(); | |
print(lexusEs300.numOfDoors); | |
} |
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
void main() { | |
//objects | |
Human yaw = Human(5.9); | |
print(yaw.height); | |
// Humaniod francios = Humaniod(); | |
// print(francios.height); | |
// francios.height = 5.9; |
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
import 'dart:math'; | |
void main() { | |
loveCalculator(); | |
} | |
void loveCalculator() { | |
int loveNumber = Random().nextInt(100) + 1; |
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
void main() { | |
} |
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
void main() { | |
//call function | |
greet(); | |
greetPerson('Francis'); | |
int result = sumFunc(2,4); | |
print(result); | |
} | |
//named function w/o input or output |
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
void main () { | |
//primitive data types | |
late int num; | |
num = 10; | |
String myName = 'Francis'; | |
bool isMale = true; | |
dynamic foo = 2; | |
foo = 'hello world!'; | |
print(num); |