Skip to content

Instantly share code, notes, and snippets.

@libindev
Last active January 28, 2020 07:02
Show Gist options
  • Save libindev/ab0053982fdd29c980a7195df3e72917 to your computer and use it in GitHub Desktop.
Save libindev/ab0053982fdd29c980a7195df3e72917 to your computer and use it in GitHub Desktop.
Dart Samples
void main() {
/// dynamic is a special type indicating it can be any type.
dynamic x = 'hal';
x = 123;
print(x);
var a = 'hal';
// a = 123;
print(x);
}
void main(){
print( 10.sum(12));
}
extension SUM on int {
int sum (int no) {
return this+no;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment