Created with <3 with dartpad.dev.
-
-
Save flutterdevrelgists/e8481009edff7029bb165bad60d8dada 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 { | |
int cadence; | |
int speed; | |
int gear; | |
Bicycle(this.cadence, this.speed, this.gear); | |
@override | |
String toString() => 'Bicycle: $speed mph'; | |
} | |
void main() { | |
var bike = Bicycle(2, 0, 1); | |
print(bike); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment