【笔记】Flutter的SizedBox尺寸盒组件

前言

Flutter的SizedBox尺寸盒组件学习笔记

SizedBox尺寸盒组件

  • 是一个可以设置宽高的容器
  • 起到分隔元素的距离的作用
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import 'package:flutter/material.dart';

void main() {
runApp(MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text("文本内容"),
),
body: const Column(
children: [
App(),
],
),
),
));
}

class App extends StatelessWidget {
const App({super.key});

@override
Widget build(BuildContext context) {
return const Column(
children: [
SizedBox(height: 20),
],
);
}
}

完成

参考文献

哔哩哔哩——筱筱知晓