Skip to content

Instantly share code, notes, and snippets.

@dcoldeira
Created April 7, 2020 07:44
Show Gist options
  • Save dcoldeira/89590788ee04da0e030fe85b77cdc1e8 to your computer and use it in GitHub Desktop.
Save dcoldeira/89590788ee04da0e030fe85b77cdc1e8 to your computer and use it in GitHub Desktop.
Basic Dart Snippets
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