You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
149 lines
4.9 KiB
149 lines
4.9 KiB
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
/// 纪要详情的「PPT」页签(2026-09-26 先上界面)。
|
|
///
|
|
/// 目前只有展示:一张示意图 + 「生成 PPT」按钮,点了提示功能即将上线。
|
|
/// 真正接生成服务时,把 [_onGenerate] 换成调接口、再按状态显示进度/预览即可,页签位置不用动。
|
|
class PptTab extends StatelessWidget {
|
|
const PptTab({super.key});
|
|
|
|
void _onGenerate() {
|
|
Get.snackbar(
|
|
'meetingPpt'.tr,
|
|
'meetingPptComingSoon'.tr,
|
|
snackPosition: SnackPosition.TOP,
|
|
duration: const Duration(seconds: 2),
|
|
);
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final isDark = Theme.of(context).brightness == Brightness.dark;
|
|
final Color sub = isDark ? Colors.grey[400]! : Colors.grey[600]!;
|
|
return Center(
|
|
child: SingleChildScrollView(
|
|
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
_preview(isDark),
|
|
24.verticalSpace,
|
|
Text(
|
|
'meetingPptTitle'.tr,
|
|
style: TextStyle(
|
|
fontSize: 17.sp,
|
|
fontWeight: FontWeight.w600,
|
|
color: isDark ? Colors.white : Colors.black87,
|
|
),
|
|
),
|
|
8.verticalSpace,
|
|
Text(
|
|
'meetingPptDesc'.tr,
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(fontSize: 13.sp, color: sub, height: 1.5),
|
|
),
|
|
28.verticalSpace,
|
|
GestureDetector(
|
|
onTap: _onGenerate,
|
|
child: Container(
|
|
height: 46.w,
|
|
padding: EdgeInsets.symmetric(horizontal: 40.w),
|
|
alignment: Alignment.center,
|
|
decoration: BoxDecoration(
|
|
color: isDark ? Colors.white : Colors.black,
|
|
borderRadius: BorderRadius.circular(12.r),
|
|
),
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Icon(Icons.auto_awesome,
|
|
size: 18.sp,
|
|
color: isDark ? Colors.black : Colors.white),
|
|
6.horizontalSpace,
|
|
Text(
|
|
'meetingPptGenerate'.tr,
|
|
style: TextStyle(
|
|
fontSize: 16.sp,
|
|
color: isDark ? Colors.black : Colors.white,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
/// 示意图:一张 16:9 的「幻灯片」,标题条 + 几行要点占位
|
|
Widget _preview(bool isDark) {
|
|
final Color card = isDark ? const Color(0xFF2D2D2D) : Colors.white;
|
|
final Color bar = isDark ? Colors.grey[700]! : Colors.grey[200]!;
|
|
return Container(
|
|
width: 240.w,
|
|
height: 135.w,
|
|
padding: EdgeInsets.all(14.w),
|
|
decoration: BoxDecoration(
|
|
color: card,
|
|
borderRadius: BorderRadius.circular(12.r),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.black.withValues(alpha: isDark ? 0.3 : 0.08),
|
|
blurRadius: 16,
|
|
offset: const Offset(0, 6),
|
|
),
|
|
],
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
flex: 3,
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Container(
|
|
width: 90.w,
|
|
height: 12.w,
|
|
decoration: BoxDecoration(
|
|
gradient: const LinearGradient(
|
|
colors: [Color(0xFFAB47BC), Color(0xFFEC407A)],
|
|
),
|
|
borderRadius: BorderRadius.circular(4.r),
|
|
),
|
|
),
|
|
14.verticalSpace,
|
|
for (final w in [110.0, 90.0, 100.0, 70.0]) ...[
|
|
Container(
|
|
width: w.w,
|
|
height: 7.w,
|
|
decoration: BoxDecoration(
|
|
color: bar,
|
|
borderRadius: BorderRadius.circular(3.r),
|
|
),
|
|
),
|
|
8.verticalSpace,
|
|
],
|
|
],
|
|
),
|
|
),
|
|
Expanded(
|
|
flex: 2,
|
|
child: Container(
|
|
height: double.infinity,
|
|
decoration: BoxDecoration(
|
|
color: const Color(0xFFEC407A).withValues(alpha: 0.12),
|
|
borderRadius: BorderRadius.circular(8.r),
|
|
),
|
|
child: Icon(Icons.slideshow,
|
|
size: 36.sp, color: const Color(0xFFEC407A)),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|