import 'package:fis_common/event/event_type.dart';
import 'package:flyinsono/managers/interfaces/network_error_handler.dart';
import 'package:fis_common/logger/logger.dart';

import 'base_manager.dart';

class NetworkErrorHandlerManager extends BaseManager
    implements INetworkErrorHandlerManager {
  bool _isInterruption = false;

  ///网络是否中断
  bool get isNetworkInterruption => _isInterruption;
  set isNetworkInterruption(bool val) {
    _isInterruption = val;
    logger.i(
        "NetworkErrorHandlerManager isNetworkInterruption changed: $isNetworkInterruption");
  }

  /// 通知网络断开
  final FEventHandler<bool> onNetworkInterruption = FEventHandler<bool>();

  NetworkErrorHandlerManager();
}
