本头条核心宗旨
欢迎来到「技术刚刚好」作者,「技术刚刚好」是个人维护,每天至少更新一篇Flutter技术文章,实时为大家播报Flutter最新消息。如果你刚好也在关注Flutter这门技术,那就跟我一起学习进步吧,你的赞,收藏,转发是对我个人最大的支持,维护不易,欢迎关注。
技术刚刚好经历
近几年,移动端跨平台开发技术层出不穷,从Facebook家的ReactNative,到阿里家WEEX,前端技术在移动端跨平台开发中大展身手,技术刚刚好作为一名Android开发,经历了从Reactjs到Vuejs的不断学习。而在2018年,我们的主角变成了Flutter,这是Goolge开源的一个移动端跨平台解决方案,可以快速开发精美的移动App。希望跟大家一起学习,一起进步!
今天我来介绍一个简单入门的flutter应用,
项目结构
main.dart文件
import 'package:flutter/material.dart';void main() { runApp(MaterialApp( // Title title: "Simple Material App", // Home home: Scaffold( // Appbar appBar: AppBar( // Title title: Text("Simple Material App"), ), // Body body: Container( // Center the content child: Center( // Add Text child: Text("Hello World!"), ), ), )));}
pubspec.yaml文件
name: simple_material_appdescription: A new Flutter project.dependencies: flutter: sdk: flutterdev_dependencies: flutter_test: sdk: flutter# For information on the generic Dart part of this file, see the# following page: https://www.dartlang.org/tools/pub/pubspec# The following section is specific to Flutter.flutter: # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the Icons class. uses-material-design: true # To add assets to your application, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.io/assets-and-images/. # To add assets from package dependencies, first ensure the asset # is in the lib/ directory of the dependency. Then, # refer to the asset with a path prefixed with # `packages/PACKAGE_NAME/`. The `lib/` is implied, do not # include `lib/` in the asset path. # # Here is an example: # # assets: # - packages/PACKAGE_NAME/path/to/asset # To add custom fonts to your application, add a fonts section here, # in this "flutter" section. Each entry in this list should have a # "family" key with the font family name, and a "fonts" key with a # list giving the asset and other descriptors for the font. For # example: # fonts: # - family: Schyler # fonts: # - asset: fonts/Schyler-Regular.ttf # - asset: fonts/Schyler-Italic.ttf # style: italic # - family: Trajan Pro # fonts: # - asset: fonts/TrajanPro.ttf # - asset: fonts/TrajanPro_Bold.ttf # weight: 700
谢谢观看技术刚刚好的文章,技术刚刚好是个人维护,每天至少更新一篇Flutter技术文章,实时为大家播报Flutter最新消息。如果你刚好也在关注Flutter这门技术,那就跟我一起学习进步吧,你的赞,收藏,转发是对我个人最大的支持,维护不易,欢迎关注。
推荐阅读:小米手环公交卡
-
水果捞 做法简单 规格比普通水果盘高雅 色彩
用料西瓜 菠萝、香橙、荔枝、火龙果、香蕉、油桃、火龙果、芒果、猕猴桃适量调料冰糖10克牛奶200毫升淡奶油100毫升水适量水果捞的做法1.将各种水果洗净晾干或剥...
2020-02-12 -
鸡翅的101种吃法,灵魂美食,蒜香炸鸡翅
大家好,我是柚子,大家周末快乐啊,我发现啊,我的粉丝宝宝们都喜欢我发的香辣口味重的美食,哈哈哈,我也喜欢吃,因为我是四川人啊,那今天也不废话啦,给你们带来一道灵...
2020-02-12 -
百吃不厌的腌萝卜
用料白萝卜 1根蒜片 根据个人适量姜片 适量小米辣 少许白醋 3小杯生抽 5小杯白糖 2勺白萝卜,切块切成连刀片,放腌,拌匀,约半小时准备蒜片,姜片,小米辣准备...
2020-02-12 -
六道没有肉的菜、味道比有肉更香,更有营养欢迎
蒜蓉娃娃菜材料::娃娃菜、粉丝、蒜蓉、红椒、海鲜酱油、鸡粉、盐、做法:1、洗净娃娃菜叶,撕成大片叶状,放盘子中。2、煮沸半锅水,开大火将娃娃菜隔水蒸五六分钟左右...
2020-02-12 -
了解饮食文化——火锅
冬天来了,温度骤降,此刻大家应该都喜欢吃一种美食,那就是火锅啦!不管是自己在家准备还是出去火锅店,吃着辣辣的火锅,哈着冰啤酒或者冰可乐,人生不要太圆满呀!火锅,...
2020-02-12 -
不知道明天吃什么,分享六道下饭小炒菜,每天下
上班族们每天除了工作上的烦恼,还有就是在吃上面的烦恼。在单位上就吃一顿,剩下的要自己解决,下班后就烦恼买什么菜,吃什么好?今天就分享六道下饭的小炒菜,都是非常下...
2020-02-12