fetchLogsByDate static method

Future<void> fetchLogsByDate(
  1. String startDate,
  2. String endDate
)

Implementation

static Future<void> fetchLogsByDate(String startDate, String endDate) async {
  final dbLogs =
      await LogDatabaseHelper().fetchLogsByDate(startDate, endDate);
  _logs
    ..clear()
    ..addAll(dbLogs);
  _logController.add(List.from(_logs)); // 更新 Stream 数据
}