import 'package:cpt_main/modules/notification/notification_group_data.dart';
import 'package:widgets/load_state_layout.dart';

class NotificationState {
  //页面 LoadView 状态的展示
  LoadState loadingState;
  String? errorMessage;

  List<NotificationGroupData> datas; //页面列表数据

  // ===================================  Begin  ↓  ===================================

  NotificationState({
    this.loadingState = LoadState.State_Loading,
    this.errorMessage,
    required this.datas,
  });

  NotificationState copyWith({
    LoadState? loadingState,
    String? errorMessage,
    bool? needShowPlaceholder,
    List<NotificationGroupData>? datas,
  }) {
    return NotificationState(
      errorMessage: errorMessage ?? this.errorMessage,
      loadingState: loadingState ?? this.loadingState,
      datas: datas ?? this.datas,
    );
  }
}
