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 Deck{ | |
| List<Card> cards = new List<Card>(); | |
| Deck(){ | |
| var ranks = ['Ace','Two','Three','Four','Five']; | |
| var suits = ['Diamonds','Hearts','Clubs','Spades']; | |
| for(var suit in suits){ | |
| for(var rank in ranks){ | |
| var card = new Card(rank:rank, |
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 Person{ | |
| String firstName; | |
| int age; | |
| Person(this.firstName,this.age); | |
| printName(){ | |
| print(firstName); | |
| } | |
NewerOlder