From 9204368d0daec2d81dfac88291eda10d1a574038 Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Fri, 15 Jan 2021 13:56:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/community/widget/trend_card.dart | 35 +++++++++++++++++++ .../total_applications_page.dart | 1 - 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/lib/pages/community/widget/trend_card.dart b/lib/pages/community/widget/trend_card.dart index 312fd7f5..5c7c4137 100644 --- a/lib/pages/community/widget/trend_card.dart +++ b/lib/pages/community/widget/trend_card.dart @@ -104,6 +104,35 @@ class _TrendCardState extends State { ); } + void _showDeletDialog() { + showCupertinoDialog( + context: context, + builder: (context) { + return CupertinoAlertDialog( + title: '你确定删除吗?'.text.black.size(34.sp).isIntrinsic.make(), + actions: [ + CupertinoDialogAction( + child: '取消'.text.black.size(34.sp).isIntrinsic.make(), + onPressed: () { + Get.back(); + }, + ), + CupertinoDialogAction( + child: '确定' + .text + .color(Color(0xFFFF8200)) + .size(34.sp) + .isIntrinsic + .make(), + onPressed: () { + Get.back(); + }, + ), + ], + ); + }); + } + Widget _columnCard(String name, String content, Image avatar) { return Stack( children: [ @@ -159,6 +188,12 @@ class _TrendCardState extends State { '1分钟前', style: _textStyleTag(), ), + 40.wb, + InkWell( + onTap: () { + _showDeletDialog(); + }, + child: '删除'.text.black.size(28.sp).make()), ], ), ], diff --git a/lib/pages/total_application_page/total_applications_page.dart b/lib/pages/total_application_page/total_applications_page.dart index bb524059..dfdf38cd 100644 --- a/lib/pages/total_application_page/total_applications_page.dart +++ b/lib/pages/total_application_page/total_applications_page.dart @@ -12,7 +12,6 @@ import 'package:akuCommunity/pages/opening_code_page/opening_code_page.dart'; import 'package:akuCommunity/pages/questionnaire_page/questionnaire_page.dart'; import 'package:akuCommunity/pages/things_page/things_page.dart'; import 'package:akuCommunity/pages/visitor_access_page/visitor_access_page.dart'; -import 'package:ani_route/ani_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/headers.dart'; From 8ea4aaae0425b8eb937c56cf33065a7b033ea8aa Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Fri, 15 Jan 2021 14:16:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?add=20toast=20'=E4=B8=BE=E6=8A=A5=E6=88=90?= =?UTF-8?q?=E5=8A=9F'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/community/widget/trend_card.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/pages/community/widget/trend_card.dart b/lib/pages/community/widget/trend_card.dart index 5c7c4137..c05cc8ad 100644 --- a/lib/pages/community/widget/trend_card.dart +++ b/lib/pages/community/widget/trend_card.dart @@ -300,7 +300,15 @@ class _TrendCardState extends State { Positioned( top: 0, right: 0, - child: PopupMenuButton( + child: PopupMenuButton( + onSelected: (value) { + switch (value) { + case 0: + BotToast.showText(text: '举报成功'); + break; + default: + } + }, padding: EdgeInsets.zero, icon: Icon( CupertinoIcons.chevron_down, @@ -309,6 +317,7 @@ class _TrendCardState extends State { itemBuilder: (context) { return [ PopupMenuItem( + value: 0, child: Container( width: 150.w, height: 50.w,