Skip to content

Instantly share code, notes, and snippets.

@xgqfrms
Last active July 7, 2020 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xgqfrms/a912f29d6d79f674f3ba8c6d65686f68 to your computer and use it in GitHub Desktop.
Save xgqfrms/a912f29d6d79f674f3ba8c6d65686f68 to your computer and use it in GitHub Desktop.
dart date types 🎯
/// 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);
}
@xgqfrms
Copy link
Author

xgqfrms commented Jul 7, 2020

@xgqfrms
Copy link
Author

xgqfrms commented Jul 7, 2020

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