import 'package:flutter/material.dart';
import 'package:flyinsono/lab/components/classify_data_selector/classify_data_selector.dart';
import 'package:flyinsono/lab/components/operate_button/mini_operate_button.dart';
import 'package:flyinsono/lab/pages/lab_task/controller.dart';
import 'package:get/get.dart';

class TaskList extends GetView<LabTaskController> {
  const TaskList({Key? key, this.tabHashCode}) : super(key: key);
  final String? tabHashCode;
  @override
  String? get tag => tabHashCode;
  @override
  Widget build(BuildContext context) {
    return GetBuilder<LabTaskController>(
      id: LabTaskController.taskListId,
      tag: tabHashCode,
      builder: (context) {
        return ClassifyDataSelector(
          selectedClassifyIndex: controller.selectedClassifyIndex,
          selectedItemIndex: controller.selectedTaskIndex,
          classifyData: controller.taskStatusClassifyData,
          onItemClick: (classifyIndex, itemIndex) {
            controller.onTaskClick(classifyIndex, itemIndex);
          },
        );
      },
    );
  }
}
