// import 'package:achievement_view/achievement_view.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter_riverpod/flutter_riverpod.dart';
// import 'package:flutter_screenutil/flutter_screenutil.dart';
// import 'package:marking_app/common/model/enum/job_enums.dart';
// import 'package:marking_app/provider/annotation_graffiti_switch_provider.dart';
// import 'package:marking_app/utils/index.dart';

// import '../hooks/use_data.dart';

// class NextQuestionButton extends ConsumerWidget {
//   final bool isFinish;
//   final UseData useData;
//   const NextQuestionButton({required this.isFinish, required this.useData, super.key});

//   @override
//   Widget build(BuildContext context, WidgetRef ref) {
//     // 此处作用：打开作图绘画不能切换试题
//     // bool annotationSwitch = ref.watch(annotationGraffitiSwitchProvider).annotationSwitch;
//     // if (annotationSwitch) return Container();
//     return Positioned(
//       right: 2.w,
//       top: ScreenUtil().setHeight(MediaQuery.of(context).size.height) / 2 * 0.86,
//       child: FloatingActionButton(
//         elevation: 0,
//         tooltip: '点击前往下一题',
//         splashColor: Theme.of(context).primaryColor, //水波纹颜色
//         backgroundColor: !isFinish ? const Color.fromRGBO(24, 32, 32, 0.04) : const Color.fromRGBO(24, 32, 32, 0.1),
//         foregroundColor: Colors.white,
//         onPressed: () => easyThrottle(
//             'TestQuestionSwitch',
//             () => !isFinish
//                 ? AchievementView(
//                     elevation: 0.5,
//                     duration: Duration(seconds: 1),
//                     title: "提示",
//                     subTitle: "请批阅当前试题,再前往下一题",
//                     color: Theme.of(context).primaryColor,
//                   ).show(context)
//                 : toNext(context, ref),
//             duration: Duration(seconds: 1)),
//         child: const Icon(
//           Icons.arrow_forward_ios,
//           color: Colors.white,
//         ),
//       ),
//     );
//   }

//   void toNext(BuildContext context, WidgetRef ref) {
//     // ref.read(annotationGraffitiSwitchProvider.notifier).setSwitch(false);  此处作用是关闭作图工具
//     setTimeOut(0, () {
//       useData.futureState.value = useData.getData(context, switchAction: ReviewSwitching.TO_NEXT_QUESTION);
//     });
//   }
// }
