17 changed files with 973 additions and 669 deletions
File diff suppressed because it is too large
@ -0,0 +1,92 @@ |
|||||
|
import 'package:flutter/material.dart'; |
||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
||||
|
import 'package:get/get.dart'; |
||||
|
|
||||
|
import '../controllers/meeting_controller.dart'; |
||||
|
import '../controllers/meeting_details_controller.dart'; |
||||
|
import 'generate_bottom_sheet.dart'; |
||||
|
|
||||
|
class MoreBottomSheet extends StatefulWidget { |
||||
|
const MoreBottomSheet({super.key}); |
||||
|
|
||||
|
@override |
||||
|
State<MoreBottomSheet> createState() => _MoreBottomSheetState(); |
||||
|
} |
||||
|
|
||||
|
class _MoreBottomSheetState extends State<MoreBottomSheet> { |
||||
|
final _controller = Get.find<MeetingController>(); |
||||
|
final _detailsController = Get.find<MeetingDetailsController>(); |
||||
|
|
||||
|
@override |
||||
|
Widget build(BuildContext context) { |
||||
|
return Padding( |
||||
|
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 10.w), |
||||
|
child: Column( |
||||
|
mainAxisSize: MainAxisSize.min, |
||||
|
children: [ |
||||
|
SizedBox(height: 10.w), |
||||
|
if (_detailsController.meetingDetails.value.tasktype == 3) |
||||
|
_shareItem(Icons.refresh, '重新总结', onTap: () { |
||||
|
Get.back(); |
||||
|
Get.bottomSheet( |
||||
|
const GenerateBottomSheet( |
||||
|
isSummarizeAgain: true, |
||||
|
), |
||||
|
isScrollControlled: true, |
||||
|
backgroundColor: Colors.grey[100], |
||||
|
shape: RoundedRectangleBorder( |
||||
|
borderRadius: BorderRadius.vertical( |
||||
|
top: Radius.circular(12.r), |
||||
|
), |
||||
|
), |
||||
|
); |
||||
|
}), |
||||
|
_shareItem(Icons.delete_outline, '删除', onTap: () async { |
||||
|
_controller.deleteMeeting( |
||||
|
_detailsController.meetingData.value.id, |
||||
|
_detailsController.meetingData.value.filepath, |
||||
|
); |
||||
|
Get.back(); |
||||
|
Get.back(); |
||||
|
}), |
||||
|
], |
||||
|
), |
||||
|
); |
||||
|
} |
||||
|
|
||||
|
Widget _shareItem( |
||||
|
IconData icon, |
||||
|
String title, { |
||||
|
VoidCallback? onTap, |
||||
|
}) { |
||||
|
return InkWell( |
||||
|
onTap: onTap, |
||||
|
child: Container( |
||||
|
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 15.w), |
||||
|
margin: EdgeInsets.only(bottom: 10.w), |
||||
|
decoration: BoxDecoration( |
||||
|
color: Colors.white, |
||||
|
borderRadius: BorderRadius.circular(12.r), |
||||
|
), |
||||
|
child: Row( |
||||
|
children: [ |
||||
|
Icon( |
||||
|
icon, |
||||
|
color: Colors.black87, |
||||
|
), |
||||
|
10.horizontalSpace, |
||||
|
Expanded( |
||||
|
child: Text( |
||||
|
title, |
||||
|
style: TextStyle( |
||||
|
fontSize: 14.sp, |
||||
|
color: Colors.black87, |
||||
|
), |
||||
|
), |
||||
|
), |
||||
|
], |
||||
|
), |
||||
|
), |
||||
|
); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue