Created
March 17, 2019 07:40
-
-
Save benznest/ec08f405c2ae57ef7d49cf797de44a8f to your computer and use it in GitHub Desktop.
Cascade notation in dart
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 Spacecraft{ | |
| String name; | |
| bool available; | |
| List<Astronaut> astronauts; | |
| } | |
| class Astronaut{ | |
| String name; | |
| } | |
| main(){ | |
| Spacecraft sc = Spacecraft() | |
| ..name = "USS Discovery" | |
| ..available = true | |
| ..astronauts = List(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment