import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:marking_app/common/model/marking/switch_keyboard_to_reload_images.dart';
import 'package:marking_app/pages/common/event_bus_mixin.dart';

// CachedNetworkImage 重新加载图片
class UseCachedImgRefresh with EventBusMixinSub<SwitchKeyboardToReloadImages> {
  ValueNotifier<int> refreshNumber;
  ValueNotifier<Key> imageKey;

  UseCachedImgRefresh._({required this.refreshNumber, required this.imageKey});

  // 工厂构造函数
  factory UseCachedImgRefresh.use() {
    return UseCachedImgRefresh._(refreshNumber: useState(0), imageKey: useState(UniqueKey()));
  }
}
