import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:making_school_asignment_app/page/home_page/children/homework_review/configuration_files/index.dart';

// 底部状态栏隐藏后的开关
class ButtonFloatingAction extends GetView<HomeworkReviewLogic> {
  const ButtonFloatingAction({super.key});

  @override
  Widget build(BuildContext context) {
    return Obx(() {
      if (controller.annotationState.opControl.value) return const SizedBox();

      return FloatingActionButton(
        elevation: 8,
        tooltip: "点击打开工具栏",
        backgroundColor: Colors.white,
        onPressed: () => controller.annotationState.opControl.value = true,
        child: Icon(Icons.edit, size: 20.sp, color: Theme.of(context).primaryColor),
      );
    });
  }
}
