-
-
Save miquelbeltran/72f12a5bcb1418b6e8f60026d260f8da to your computer and use it in GitHub Desktop.
Java-to-Dart codelab: Basic bicycle example
This file contains hidden or 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
class Bicycle { | |
late int cadence; | |
late int speed; | |
late int gear; | |
Bicycle(this.cadence, this.speed, this.gear); | |
@override | |
String toString() => 'Bicycle: $speed mph'; | |
} | |
void main() { | |
var bike = new Bicycle(2, 0, 1); | |
print(bike); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment