|
|
@ -6,7 +6,6 @@ import 'package:aku_new_community/constants/saas_api.dart';
|
|
|
|
import 'package:aku_new_community/model/common/img_model.dart';
|
|
|
|
import 'package:aku_new_community/model/common/img_model.dart';
|
|
|
|
import 'package:aku_new_community/models/community/all_dynamic_list_model.dart';
|
|
|
|
import 'package:aku_new_community/models/community/all_dynamic_list_model.dart';
|
|
|
|
import 'package:aku_new_community/provider/user_provider.dart';
|
|
|
|
import 'package:aku_new_community/provider/user_provider.dart';
|
|
|
|
import 'package:aku_new_community/ui/community/community_func.dart';
|
|
|
|
|
|
|
|
import 'package:aku_new_community/ui/community/community_views/add_new_event_page.dart';
|
|
|
|
import 'package:aku_new_community/ui/community/community_views/add_new_event_page.dart';
|
|
|
|
import 'package:aku_new_community/ui/community/community_views/event_detail_page.dart';
|
|
|
|
import 'package:aku_new_community/ui/community/community_views/event_detail_page.dart';
|
|
|
|
import 'package:aku_new_community/utils/bee_date_util.dart';
|
|
|
|
import 'package:aku_new_community/utils/bee_date_util.dart';
|
|
|
@ -26,7 +25,7 @@ import 'package:velocity_x/velocity_x.dart';
|
|
|
|
class ChatCard extends StatefulWidget {
|
|
|
|
class ChatCard extends StatefulWidget {
|
|
|
|
final AllDynamicListModel model;
|
|
|
|
final AllDynamicListModel model;
|
|
|
|
final VoidCallback? onDelete;
|
|
|
|
final VoidCallback? onDelete;
|
|
|
|
final VoidCallback? onBack;
|
|
|
|
|
|
|
|
final bool hideLine;
|
|
|
|
final bool hideLine;
|
|
|
|
final bool canTap;
|
|
|
|
final bool canTap;
|
|
|
|
|
|
|
|
|
|
|
@ -35,7 +34,7 @@ class ChatCard extends StatefulWidget {
|
|
|
|
required this.model,
|
|
|
|
required this.model,
|
|
|
|
this.onDelete,
|
|
|
|
this.onDelete,
|
|
|
|
this.hideLine = false,
|
|
|
|
this.hideLine = false,
|
|
|
|
this.canTap = true, this.onBack,
|
|
|
|
this.canTap = true,
|
|
|
|
}) : super(key: key);
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
@ -143,7 +142,9 @@ class _ChatCardState extends State<ChatCard> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
20.wb,
|
|
|
|
20.wb,
|
|
|
|
Material(
|
|
|
|
GestureDetector(
|
|
|
|
|
|
|
|
onTap: widget.model.isComment == 1 ? () async {} : () async {},
|
|
|
|
|
|
|
|
child: Material(
|
|
|
|
color: Colors.transparent,
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
@ -159,6 +160,7 @@ class _ChatCardState extends State<ChatCard> {
|
|
|
|
.make(),
|
|
|
|
.make(),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -174,7 +176,6 @@ class _ChatCardState extends State<ChatCard> {
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
|
|
|
|
|
|
return DecoratedBox(
|
|
|
|
return DecoratedBox(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
@ -183,19 +184,10 @@ class _ChatCardState extends State<ChatCard> {
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
onPressed: widget.canTap
|
|
|
|
onPressed: widget.canTap
|
|
|
|
? () async {
|
|
|
|
? () async {
|
|
|
|
|
|
|
|
Get.to(() => EventDetailPage(
|
|
|
|
var result =
|
|
|
|
|
|
|
|
await Get.to(() => EventDetailPage(
|
|
|
|
|
|
|
|
dynamicId: widget.model.id,
|
|
|
|
dynamicId: widget.model.id,
|
|
|
|
onDelete: widget.onDelete,
|
|
|
|
onDelete: widget.onDelete,
|
|
|
|
));
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
CommunityFunc.dynamicAddViews(widget.model.id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (result != null && result) {
|
|
|
|
|
|
|
|
widget.onBack!();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
@ -272,8 +264,11 @@ class _ChatCardState extends State<ChatCard> {
|
|
|
|
));
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
if (result == true) {
|
|
|
|
if (result == true) {
|
|
|
|
|
|
|
|
await NetUtil().get(
|
|
|
|
await CommunityFunc.deleteDynamicAddViews(widget.model.id);
|
|
|
|
API.community.deleteMyEvent,
|
|
|
|
|
|
|
|
params: {'themeId': widget.model.id},
|
|
|
|
|
|
|
|
showMessage: true,
|
|
|
|
|
|
|
|
);
|
|
|
|
if (widget.onDelete != null) widget.onDelete!();
|
|
|
|
if (widget.onDelete != null) widget.onDelete!();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|