当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
18 Star 81 Fork 26

ryanpenn / dart_in_action
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Dart语言入门

Dart语言介绍

dart语言是由谷歌公司开发的网络编程语言,于2011年10月10日发布。可以通过官网进一步了解Dart语言

Dart开发环境安装和配置

操作系统:Windows、macOS、Linux 下载地址:https://flutter.dev/docs/development/tools/sdk/releases?tab=macos

  • 以macOS为例:解压缩到目录/Users/(macuser)/Dev/flutter/

  • 配置:

vi ~/.bash_profile

  • 编辑:
# 导出dart
export DART_HOME=/Users/(macuser)/Dev/flutter/flutter/bin/cache/dart-sdk

# 导出flutter
export FLUTTER_HOME=/Users/(macuser)/Dev/flutter/flutter
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

export PATH=$DART_HOME/bin:$FLUTTER_HOME/bin:(其他导出项)
  • 校验:

dart --version

配置编辑器:VS Code

  • 安装dart支持 安装dart

  • 安装代码运行插件

  • 配置debug

  • 安装flutter(可选) flutter

主要内容

  1. Hello World
    • 运行Dart代码
    • Dart语言介绍
  2. 内置数据类型
    • 内置数据类型
    • 变量定义
  3. 条件控制语句
    • IF ELSE
    • 条件表达式
    • Switch Case
  4. 循环
    • for
    • while
    • do ..while
    • break
    • continue
    • 高级用法
  5. 函数
    • 函数定义
    • 可选参数
    • 命名参数
    • 默认参数
  6. 异常处理
    • try ..on
    • try ..catch
    • try ..finally
    • 自定义异常
  7. 类和对象
    • 定义类
    • 类成员可见性
    • 属性
    • 构造函数
      • 自定义构造函数
      • 成员变量赋值
  8. 继承
    • 继承
    • extends、implements
    • 混入(mixin)
  9. Lambda表达式
    • Lambda Expression
    • 函数返回Function
    • 函数接收Function类型的参数
  10. 闭包
  11. 集合
  12. callable classes
  13. 设计模式(13-40)
    • 常用设计模式的Dart实现
MIT License Copyright (c) 2019 ryanpenn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Dart语言入门教程,设计模式Dart语言版。 展开 收起
Dart
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Dart
1
https://gitee.com/ryanpenn/dart_in_action.git
git@gitee.com:ryanpenn/dart_in_action.git
ryanpenn
dart_in_action
dart_in_action
master

搜索帮助