[英]What's the best way to get this design layout using flutter?
通過使用 Chip 和 Wrap 小部件:
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
home: MyApp(),
));
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Chip"),
),
body: Wrap(
children: [
Chip(
label: Text("test"),
),
Chip(
label: Text("test"),
),
Chip(
label: Text("test"),
),
Chip(
label: Text("test"),
),
Chip(
label: Text("test"),
),
Chip(
label: Text("test"),
),
Chip(
label: Text("test"),
),
Chip(
label: Text("test"),
),
Chip(
label: Text("test"),
),
]
),
);
}
}
您可以使用filter_list package 過濾您的數據並實現您想要的設計
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.