demo_hive/lib/bloc/reminder_state.dart

23 lines
688 B
Dart

import 'package:demo_hive/domain/entity/reminder.dart';
import 'package:equatable/equatable.dart';
class ReminderState extends Equatable {
final bool isEmpty;
final List<ReminderEntity> list;
final String title;
final bool isLoading;
ReminderState({this.isEmpty, this.list, this.title, this.isLoading});
ReminderState update(
{bool isEmpty, List<ReminderEntity> list, String title, bool isLoading}) {
return ReminderState(
isLoading: isLoading ?? this.isLoading,
isEmpty: isEmpty ?? this.isEmpty,
list: list ?? this.list,
title: title ?? this.title);
}
List<Object> get props => [isEmpty, list, this.isLoading, this.title];
}