Created
April 7, 2020 07:44
-
-
Save dcoldeira/89590788ee04da0e030fe85b77cdc1e8 to your computer and use it in GitHub Desktop.
Basic Dart Snippets
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(){ | |
var integers = new Numbers(); | |
integers.integersNumbers(); | |
} | |
//Creating a number object | |
class Numbers{ | |
//Type of numbers (in form of methods) | |
naturalNumbers(){ | |
print('The counting numbers {1, 2, 3, ...}'); | |
} | |
integersNumbers(){ | |
print('Positive and negative counting numbers, as well as zero: {..., −3, −2, −1, 0, 1, 2, 3, ...}'); | |
realNumbers(){ | |
print('Numbers that can be expressed as a ratio of an integer to a non-zero integer'); | |
} | |
irrationalNumbers(){ | |
print('Real numbers that are not rational'); | |
} | |
imaginaryNumbers(){ | |
print('Numbers that equal the product of a real number and the square root of −1'); | |
} | |
complexNumbers(){ | |
print('Includes real numbers, imaginary numbers, and sums and differences of real and imaginary numbers.'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment