美文网首页
01-helloword

01-helloword

作者: Nazarite_0141 | 来源:发表于2019-11-05 10:16 被阅读0次
/**
 * 1.dart 的入口函数是 main
 * 2.在dart中 打印的函数是 print
 * 3.dart中函数的定义
 * 4. main函数的参数作用和使用方法
 * 
 */


// main() {
//   print('hello word!');
//   print(1.88);
//   print('123');
// }


//  完整的 main 函数 写法
/**
 * 函数返回值类型 函数名称(参数列表) {
 *   函数体  
 * }
 * void  表示无返回值
 *  List 数组列表
 *   <泛型>
 */
void main(List<String> args) {
    print("Hello Flutter!");
    print(args);
}

/** 
 *   List<String> args 的作用
 * 在终端输入:
 *    dart .\01-helloword.dart abc hello 123
 * 
  *        Hello Flutter!
   *       [abc, hello, 123]
 */


image.png

相关文章

网友评论

      本文标题:01-helloword

      本文链接:https://www.haomeiwen.com/subject/fwksbctx.html