Dart & data type(static / dynamic)
阅读原文时间:2023年07月09日阅读:1

Dart & data type(static / dynamic)

Darts 飞镖

标枪 javelin/darts

https://dartpad.dartlang.org/

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);
}

https://gist.github.com/xgqfrms/a912f29d6d79f674f3ba8c6d65686f68

https://dartpad.dev/a912f29d6d79f674f3ba8c6d65686f68

fallback link
https://gist.github.com/xgqfrms/a912f29d6d79f674f3ba8c6d65686f68

iframe

<iframe height="435" style="width: 100%;" scrolling="no" title="dart data type " src="https://dartpad.dev/a912f29d6d79f674f3ba8c6d65686f68" frameborder="no" allowtransparency="true" allowfullscreen="true">
  fallback link
  <a hfre="https://gist.github.com/xgqfrms/a912f29d6d79f674f3ba8c6d65686f68">https://gist.github.com/xgqfrms/a912f29d6d79f674f3ba8c6d65686f68</a>
</iframe>

https://github.com/dart-lang/dart-pad/wiki/Sharing-Guide

gist id => DartPad url

https://gist.github.com/xgqfrms/2ada2477a76d65cbd4b16558131fcbc0

https://dartpad.dev/2ada2477a76d65cbd4b16558131fcbc0

https://medium.com/run-dart/dart-dartlang-introduction-variables-and-data-types-d269ea7d1f8f



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!