当前位置:网站首页>Flutter “Hello world“ 程代码
Flutter “Hello world“ 程代码
2022-08-01 02:45:00 【小公鸡卡哇伊呀~】
代码如下:
// main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyClass());
}
class MyClass extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(home: Text('Hello world'));
}
}
build
函数是 Dart 和 Flutter 尝试在屏幕上绘制内容时最终调用的函数,因此 build
方法需要返回一个组件。
输出没有任何 styling:
边栏推荐
- The fledgling Xiao Li's 114th blog project notes: Wisdom cloud intelligent flower watering device combat (3) - basic Demo implementation
- RTL8762DK Lighting/LED (3)
- SC7A20 (Silan Micro-Accelerometer) Example
- gateway gateway cross domain
- Basic usage concepts of vim
- What practical projects can machine learning beginners learn?
- 【消息通知】用公众号模板消息怎么样?
- 【入门教程】Rollup模块打包器整合
- The device node structure is converted into a platform_device structure
- HCIP(15)
猜你喜欢
机器学习初学者可以学哪些实战项目?
The fledgling Xiao Li's 113th blog project notes: Wisdom cloud smart flower watering device combat (2) - basic Demo implementation
MYSQL two-phase commit
Basic implementation of vector
How to get started with YOLO?How to implement your own training set?
You need to know the TCP wave four times
《少年派2》:新男友竟脚踩两只船,林妙妙与钱三一感情回温
opencv 缩小放大用哪种插值更好??
情人节浪漫3D照片墙【附源码】
IDEA修改注释字体
随机推荐
机器学习初学者可以学哪些实战项目?
STK8321 I2C (Shengjia-accelerometer) example
ROS2 series of knowledge (4): understand the concept of [service]
How to get started with YOLO?How to implement your own training set?
MYSQL two-phase commit
Detailed explanation of TCP protocol
After specifying set 'execution.savepoint.path', restart flinksql and report this error
高维高斯分布基础
test
元宇宙改变人类工作模式的四种方式
带wiringPi库在unbutu 编译 并且在树莓派运行
Summary of JVM interview questions (continuously updated)
机器学习应该如何入门?
IDEA debugging
MYSQL master-slave replication
测试
【SemiDrive源码分析】系列文章链接汇总(全)
RTL8762DK uses DebugAnalyzer (four)
OSF understands the agile development model in one minute
When opening a MYSQL table, some can display editing, some do not, how to set.