Flutter学习笔记1 (Hello World)

Flutter是Google新推出的一个框架,致力于快速开发出支持多个平台的漂亮手机应用。这确实也是开发人员长期以来所拥有的一大痛点。对于这个问题,之前也有不少解决方案,比如基于HTML5的Codovar ,以及Facebook的React Native。但是都会有各种各样的问题。网页代码显示总会不太自然,RN的维护开发后期比较困难。

这次Google的Flutter有不少亮点,它是通过Google的Dart语言来编写的,这也是一个全新的语言。Dart的目标就是让大家能够快速上手,熟悉Java, Swift, JavaScript的程序员不会有太大问题。Flutter最后也是针对iOS和Android生成了native的代码来运行的。

带着对Dart和Flutter的好奇,最近准备花一点点时间研究一下。

首先要做的是查找一些相关的资料,然后搭建开发环境,创建两个简单的例子,对Flutter的整体开发有个初步的感受。

Flutter的主页是这里:

https://flutter.io

上面有关于它的介绍,有环境搭建,以及一些教程。

我的开发环境是:

1. MacBook Pro
2. XCode + iOS模拟器
3. Flutter SDK
4. Vistual Studio + Flutter插件

安装好开发环境以后,然后写一个HelloWorld的例子:

Flutter的程序风格是基于Google的Material Design.
MaterialApp是模板app,包含了title和home两个部分.
Scaffold也是Flutter提供的框架,包含了appbar和body等。
一般使用这些自带的框架,可以更加高效省心。

最后是一些学习资料链接:

Flutter Resources

Documentation: https://docs.flutter.io/

Github: https://github.com/flutter/flutter

StackOverflow: https://stackoverflow.com/questions/tagged/flutter

Gitter: https://gitter.im/flutter/flutter

Effective Dart Guide: https://www.dartlang.org/guides/language/effective-dart

Dart Tips: https://www.dartlang.org/resources/dart-tips

Flutter FAQ: https://flutter.io/faq/

Flutter Rendering: https://www.youtube.com/watch?v=UUfXWzp0-DU

Flutter Engine: https://github.com/flutter/engine/wiki

Hot Reload: https://flutter.io/hot-reload/

Flutter Inspector: https://dart-lang.github.io/observatory/

Dart Style Guide: https://www.dartlang.org/guides/language/effective-dart/style

Dart Observatory: https://dart-lang.github.io/observatory/

Flutter Widgets: https://flutter.io/widgets/

Flutter Gallery App Code: https://github.com/flutter/flutter/tree/master/examples/flutter_gallery

Flutter Gallery Android App: https://play.google.com/store/apps/details?id=io.flutter.demo.gallery

Flutter Layout: https://flutter.io/tutorials/layout/

Material: https://material.io

Icons: https://thenounproject.com

Images: https://unsplash.com

Fonts: https://fonts.google.com

Google APIs: https://pub.dartlang.org/packages/googleapis

Async and Futures: https://www.dartlang.org/tutorials/language/futures

Testing: https://flutter.io/testing/

猜你喜欢

转载自blog.csdn.net/starshus/article/details/81142545
今日推荐