demo_hive/lib/bloc/reminder_state.dart

23 lines
688 B
Dart
Raw Normal View History

2021-06-28 11:01:00 +00:00
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});
2021-06-28 11:01:00 +00:00
ReminderState update(
{bool isEmpty, List<ReminderEntity> list, String title, bool isLoading}) {
2021-06-28 11:01:00 +00:00
return ReminderState(
isLoading: isLoading ?? this.isLoading,
2021-06-28 11:01:00 +00:00
isEmpty: isEmpty ?? this.isEmpty,
list: list ?? this.list,
title: title ?? this.title);
}
List<Object> get props => [isEmpty, list, this.isLoading, this.title];
2021-06-28 11:01:00 +00:00
}