Flutter学习笔记08:Wrap
本文最后更新于 79 天前,其中的信息可能已经有所发展或是发生改变。

Wrap是flutter里面的流排列组件,例如各大APP的搜索历史排列。

Wrap(
            children: [
              const Chip(label: Text("Chip")),
              const SizedBox(width: 10),
              const Chip(
                label: Text("Chip"),
                avatar: Icon(Icons.add),
              ),
              const SizedBox(width: 10),
              const Chip(
                label: Text("Chip"),
                avatar: CircleAvatar(
                  child: Text("A"),
                ),
              ),
              const SizedBox(width: 10),
              const Chip(
                label: Text("Chip"),
                avatar: CircleAvatar(
                  backgroundImage: NetworkImage(
                      "https://www.w3schools.com/w3images/avatar2.png"),
                ),
              ),
              const SizedBox(width: 10),
              Chip(
                label: const Text("Chip"),
                avatar: const CircleAvatar(
                  backgroundImage: NetworkImage(
                      "https://www.w3schools.com/w3images/avatar2.png"),
                ),
                deleteIcon: const Icon(Icons.close),
                onDeleted: () {
                  if (kDebugMode) {
                    print("Delete");
                  }
                },
              ),
            ],
          )

效果:

你刚刚浪费了人生中宝贵的几分钟。
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇