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 Card { | |
Card(this.suit, this.rank); | |
final String suit; | |
final int rank; | |
final Map<int, String> rankNames = { | |
11 : 'Jack', | |
12 : 'Queen', | |
13 : 'King', |
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 Card { | |
Card(this.suit, this.rank); | |
final String suit; | |
final int rank; | |
final Map<int, String> rankNames = { | |
11 : 'Jack', | |
12 : 'Queen', | |
13 : 'King', |
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 Card { | |
Card(this.suit, this.rank); | |
final String suit; | |
final int rank; | |
@override | |
String toString() { | |
return '$rank of $suit'; | |
} |
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 Card { | |
Card(this.suit, this.rank); | |
final String suit; | |
final int rank; | |
Map<int, String> rankNames = { | |
11 : 'Jack', | |
12 : 'Queen', | |
13 : 'King', |
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
void main() { | |
printCustomerName('Joennie', 'Sindo'); | |
printCustomerName('Arsene', 'Lupin', 'III'); | |
final double itemPrice = 3999.99; | |
final int itemQuantity = 42; | |
final double itemDiscount = .10; | |
final int quantityOrdered = 5; |
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
void main() { | |
final int itemQuantity = 123; | |
final double itemPrice = 3499.55; | |
final bool isDiscounted = true; | |
final List<String> countries = ['US', 'UK', 'MX', 'TH', 'PH', 'HK']; | |
print(itemQuantity.toString()); | |
print(itemPrice.toString()); | |
print(isDiscounted.toString()); | |
print(countries.toString()); |
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
void main() { | |
final String bookName = 'Arduino For Dummies'; | |
print(bookName.contains('Dummies')); | |
print(bookName.indexOf('For')); | |
final List<String> countries = ['US', 'UK', 'MX', 'TH', 'PH', 'HK']; | |
print(countries.contains('PH')); | |
print(countries.indexOf('PH')); |
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 Saiyan { | |
Saiyan({this.name, this.power}); | |
Saiyan.superForm(this.name) : power = 10000; | |
final String name; | |
final int power; | |
Saiyan operator +(Saiyan otherSaiyan) { | |
return Saiyan( |
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 Saiyan { | |
Saiyan({this.name, this.power}); | |
Saiyan.superForm(this.name) : power = 10000; | |
final String name; | |
final int power; | |
@override | |
String toString() => 'Saiyan $name Power Level : $power'; |
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 Saiyan { | |
Saiyan({this.name, this.power}); | |
final String name; | |
final int power; | |
// Methods | |
void punch() { | |
print ('$name punched'); | |
} |