1
This commit is contained in:
@@ -2,10 +2,8 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:plan/api/dto/plan_item_dto.dart';
|
||||
import 'package:plan/api/endpoints/plan_api.dart';
|
||||
import 'package:remixicon/remixicon.dart';
|
||||
|
||||
import 'widgets/history_item.dart';
|
||||
import '../../../widgets/ui_kit/popup/popup_action.dart';
|
||||
import 'widgets/loading_box.dart';
|
||||
|
||||
class PlanHistoryPage extends StatefulWidget {
|
||||
@@ -38,23 +36,11 @@ class _PlanHistoryPageState extends State<PlanHistoryPage> {
|
||||
});
|
||||
}
|
||||
|
||||
///popup事件
|
||||
void _onPopupActionSelected(String value) {
|
||||
switch (value) {
|
||||
case 'edit':
|
||||
setState(() {
|
||||
_isDelete = !_isDelete;
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
///确认删除
|
||||
void _confirmDelete(int id) {
|
||||
print(_record.map((e) => e.toJson()));
|
||||
setState(() {
|
||||
_record.removeWhere((element) => element.id == id);
|
||||
print(_record.map((e) => e.toJson()));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user