Last active
July 7, 2020 09:46
-
-
Save xgqfrms/a912f29d6d79f674f3ba8c6d65686f68 to your computer and use it in GitHub Desktop.
dart date types 🎯
This file contains 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
/// dart block comments | |
// https://dart.dev/guides/language/effective-dart/documentation#doc-comments | |
// https://dart.dev/samples#comments | |
/** | |
* | |
* @author xgqfrms | |
* @license MIT | |
* @copyright xgqfrms | |
* @created 2020-07-07 | |
* @modified | |
* | |
* @description js class declaration | |
* @augments | |
* @example | |
* @link | |
* | |
*/ | |
void main() { | |
// abstract class String implements Comparable<String>, Pattern | |
String s = "string type"; | |
print(s); | |
// String s | |
// Number n = 123; | |
// Error: 'Number' isn't a type. | |
int i = 123; | |
// Number, int i | |
print(i); | |
double d = 3.1415926; | |
// Number, double d | |
print(d); | |
// static type | |
var vs = 'var string'; | |
var vi = 333; | |
// vs = 999; | |
// Error: A value of type 'int' can't be assigned to a variable of type 'String'. | |
// vi = 'var int'; | |
// Error: A value of type 'String' can't be assigned to a variable of type 'int'. | |
// dynamic type | |
var a; | |
a = 'abc'; | |
print(a); | |
a = 123; | |
print(a); | |
dynamic D; | |
D = 'xyz'; | |
print(D); | |
D = 666; | |
print(D); | |
} |
dart block comments
/// dart block comments
https://dart.dev/guides/language/effective-dart/documentation#doc-comments
https://dart.dev/samples#comments
Nested multiline comments in Dart
https://stackoverflow.com/questions/18693430/nested-multiline-comments-in-dart
/* Commented for debugging purposes!!! Do not forget to uncomment!!!
/**
* This class is used as an example.
*
* To ask about multiline comments.
*/
class A {
}
/**
* Another example class with comment.
*/
class B {
}
*/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/dart-lang/dart-pad/wiki/Sharing-Guide