当前位置:网站首页>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")),
);
}
}
边栏推荐
- ABAP 报表中如何以二进制方式上传本地文件试读版
- 900页数学论文证明旋转的黑洞不会爆炸,丘成桐:30多年来广义相对论首次重大突破...
- Shell之常用小工具(sort、uniq、tr、cut)
- WPF implements a MessageBox message prompt box with a mask
- The FFmpeg library is configured and used on win10 (libx264 is not configured)
- Batch大小不一定是2的n次幂!ML资深学者最新结论
- 【无标题】
- [Interview high-frequency questions] Linked list high-frequency questions that can be gradually optimized
- 【Untitled】
- We really need DApp?Really can't meet our fantasy App?
猜你喜欢
API调用,API传参,面向对接开发,你真的会写接口文档吗?
Byte Qiu Zhao confused me on both sides, and asked me under what circumstances would the SYN message be discarded?
[Interview high-frequency questions] Linked list high-frequency questions that can be gradually optimized
redis库没法引入
Manchester city launch emotional intelligence scarf can be detected, give the fans
【无标题】
西湖大学教授怎么看AI制药革命?|量子位智库圆桌实录
箭头函数和普通函数的常见区别
Two minutes recording can pass by second language!The volcano how to practice and become voice tone reproduction technology?
【HCIP持续更新】IS-IS协议原理与配置
随机推荐
曲鸟全栈UI自动化教学(八):框架代码讲解和进一步优化
PM2 configuration file
系统提供的堆 VS 手动改写堆
Adalvo收购其首个品牌产品Onsolis
听声辨物,这是AI视觉该干的???|ECCV 2022
Common gadgets of Shell (sort, uniq, tr, cut)
Scala 高阶(七):集合内容汇总(上篇)
基于STM32+铂电阻设计的测温仪
HAproxy: load balancing
微信小程序支付及退款整体流程
Blazor Server (9) from scratch -- modify Layout
你没见过的《老友记》镜头,AI给补出来了|ECCV 2022
读写分离后,性能居然提升100%了呀
The batch size does not have to be a power of 2!The latest conclusions of senior ML scholars
AI篮球裁判火了,走步算得特别准,就问哈登慌不慌
[Interview high-frequency questions] Linked list high-frequency questions that can be gradually optimized
手写大根堆
在北极都可以穿短袖了,温度飙升至32.5℃
软件测试——金融测试类面试题,看完直接去面试了
Apexsqlrecover无法连接数据库