46 lines
1.0 KiB
Dart
46 lines
1.0 KiB
Dart
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
import '../screens/setting_page.dart';
|
||
|
|
||
|
class PlanPoint extends StatefulWidget {
|
||
|
const PlanPoint({super.key});
|
||
|
|
||
|
@override
|
||
|
State<PlanPoint> createState() => _PlanPointState();
|
||
|
}
|
||
|
|
||
|
class _PlanPointState extends State<PlanPoint> {
|
||
|
List<ListItem> items = [];
|
||
|
@override
|
||
|
void initState() {
|
||
|
items = [
|
||
|
ListItem('下载', Icons.download, () {}),
|
||
|
ListItem('删除', Icons.delete, () {}),
|
||
|
];
|
||
|
super.initState();
|
||
|
}
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Scaffold(
|
||
|
appBar: AppBar(
|
||
|
toolbarHeight: 40,
|
||
|
title: const Text("规划点"),
|
||
|
),
|
||
|
body: ListView.builder(
|
||
|
itemCount: items.length,
|
||
|
itemBuilder: (BuildContext context, int index) {
|
||
|
return Column(
|
||
|
children: <Widget>[
|
||
|
ListTileButton(
|
||
|
item: items[index],
|
||
|
),
|
||
|
const Divider(), // 在每个列表项下方添加一条线
|
||
|
],
|
||
|
);
|
||
|
},
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|