21 lines
624 B
Dart
Raw Normal View History

2025-11-01 04:11:29 +07:00
part of 'report_bloc.dart';
@freezed
class ReportState with _$ReportState {
factory ReportState({
required String title,
required DateTime startDate,
required DateTime endDate,
required String rangeDateFormatted,
@Default(0) int selectedMenu,
}) = _ReportState;
factory ReportState.initial() => ReportState(
title: 'Ringkasan Laporan Penjualan',
2025-11-03 16:24:11 +07:00
startDate: DateTime.now().subtract(const Duration(days: 30)),
2025-11-01 04:11:29 +07:00
endDate: DateTime.now(),
rangeDateFormatted:
2025-11-03 16:24:11 +07:00
'${DateTime.now().subtract(const Duration(days: 30)).toFormattedDate()} - ${DateTime.now().toFormattedDate()}',
2025-11-01 04:11:29 +07:00
);
}