当前位置:网站首页>Flutter入门进阶之旅(二)Hello Flutter
Flutter入门进阶之旅(二)Hello Flutter
2022-08-09 12:04:00 【谢栋_】
开题
好像几乎我们学习或者掌握任何一门编程语言都是Hello word开始的,本篇博文做为Flutter入门进阶的第一篇分享,我们也从最简单的Hello world开始,至于Flutter开发环境的配置,跟关于Dart语言的介绍,不是该专栏要讲解的内容,我就不详细做介绍了,读者可自行google或者百度了解一下。
准备工作
在开始之前我想先为大家介绍一下Flutter中两个常用的组件MaterialApp跟Scaffold,读者在此不需要完全掌握它们,后续还会有专门的专题对二者讲解,在此大家先简单了解MaterialApp是我们app开发中常用的符合Material Design设计理念的入口Widget,是与我们经常打交道的Widget,也就是我们渲染UI的整体入口,而Scaffold从字面意思大家就能看出是脚手架、骨架的也是,也就是它作为我们app的骨架,快速帮我们打造一个可供二次构建定制的模板,我们可以在上面可以做很多个性化的UI定制。关于Hello Flutter这一章节我们先简单了解这么多即可,读者不用急于马上掌握Flutter的所有内容,今天先简单跟Flutter打个招呼,有个简单的认识即可,后续我们会一起慢慢学习Flutter里面各种Widget。
代码:
import 'package:flutter/material.dart';
void main() {
runApp(new MaterialApp(home: new HelloFlutter()));
}
class HelloFlutter extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("Hello Flutter"),
),
body: new Center(child: new Text("Hello Flutter")),
);
}
}
边栏推荐
- 箭头函数和普通函数的常见区别
- Recommend a free 50-hour AI computing platform
- 中科院打脸谷歌:普通电脑追上量子优越性,几小时搞定原本要一万年的计算...
- AI篮球裁判火了,走步算得特别准,就问哈登慌不慌
- #物联网征文#小熊派设备开发实战
- Report: The number of students who want to learn AI has increased by 200%, and there are not enough teachers
- Golang学习之路(五):Golang的函数
- 900页数学论文证明旋转的黑洞不会爆炸,丘成桐:30多年来广义相对论首次重大突破...
- Experiment record: the process of building a network
- h264协议
猜你喜欢
阿里高工带来的20022最新面试总结太香了
鹅厂机器狗花式穿越10m梅花桩:前空翻、单桩跳、起身作揖...全程不打一个趔趄...
Win10 compiles the x264 library (there are also generated lib files)
Report: The number of students who want to learn AI has increased by 200%, and there are not enough teachers
h264 protocol
内网穿透工具ngrok使用教程
Go 事,如何成为一个Gopher ,并在7天找到 Go 语言相关工作,第1篇
AQS同步组件-FutureTask解析和用例
ansible-cmdb友好展示ansible收集主机信息
ABP 6.0.0-rc.1的新特性
随机推荐
数据挖掘-05
FFmpeg库在win10上配置使用(不配置libx264)
腾讯欲成育碧最大股东/ 米哈游招NLP内容生成研究员/ AI发现四千余物种濒临灭绝...今日更多新鲜事在此...
The redis library cannot be imported
AI basketball referee, walking is special, ask harden care don't care
用 API Factory 产品生成 API 文档
1-hour live broadcast recruitment order: industry big names share dry goods, and enterprise registration opens丨qubit·viewpoint
The latest interview summary in 20022 brought by Ali senior engineer is too fragrant
基于STM32+铂电阻设计的测温仪
ABAP 面试题:如何使用 ABAP 编程语言的 System CALL 接口,直接执行 ABAP 服务器所在操作系统的 shell 命令?
[Microservice ~ Remote Call] Integrate RestTemplate, WebClient, Feign
AI篮球裁判火了,走步算得特别准,就问哈登慌不慌
【小程序】低代码+小游戏=小游戏可视化开发
【微服务~远程调用】整合RestTemplate、WebClient、Feign
AQS Synchronization Component - FutureTask Analysis and Use Cases
苹果Meta都在冲的Pancake技术,中国VR团队YVR竟抢先交出产品答卷
Apexsqlrecover cannot connect to database
proto3-2 syntax
Blazor Server (9) from scratch -- modify Layout
已解决IndentationError: unindent does not match any oute r indentation Level