/*
 * @Author: wangyang 1147192855@qq.com
 * @Date: 2022-07-14 18:16:06
 * @LastEditors: wangyang 1147192855@qq.com
 * @LastEditTime: 2022-08-01 16:17:33
 * @FilePath: \marking_app\lib\provider\user_provider.dart
 * @Description: APP上传文件状态
 */

import 'package:marking_app/common/model/job/gesture_recording.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:marking_app/common/mixin/common.dart';

// 批注轨迹
final jobHomeWorkProvider =
    StateNotifierProvider<JobHomeWorkProviderHandle, List<GestureRecording>>((ref) => JobHomeWorkProviderHandle([]));

class JobHomeWorkProviderHandle extends StateNotifier<List<GestureRecording>> with CommonMixin {
  JobHomeWorkProviderHandle(List<GestureRecording> progress) : super(progress);

  setVal(List<GestureRecording> val) {
    state = val;
  }
}

// 批注轨迹ID
final jobHomeWorkIdProvider =
    StateNotifierProvider<JobHomeWorkIdProviderHandle, int>((ref) => JobHomeWorkIdProviderHandle(-1));

class JobHomeWorkIdProviderHandle extends StateNotifier<int> with CommonMixin {
  JobHomeWorkIdProviderHandle(int taskdetailId) : super(taskdetailId);

  setVal(int val) {
    state = val;
  }
}
