Flutter是什么
Flutter is Google’s SDK for crafting beautiful, fast user experiences for mobile, web and desktop from a single codebase.
Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.
Flutter是基于Dart语言的.
Dart Hello World
Dart是什么
A client-optimized language for fast apps on any platform.
打开在线DartPad,简单hello world如下
1 | void main() { |
Flutter Hello World
打开Android Studio,安装Dart和Flutter插件;选择Flutter Examples目录下的Hello World.
项目结构如下
1 | ├── hello_world |
正如Flutter的定义一样,Flutter代码能生成移动端android ios fuchsia
发布包, 并且能运行在web
端.
代码启动入口main.dart
1 | // Copyright 2015 The Chromium Authors. All rights reserved. |