Skip to content

Commit

Permalink
Merge pull request #3 from sonbui00/fix-dart-analyzed
Browse files Browse the repository at this point in the history
Fix dart analyzed
  • Loading branch information
sonbui00 committed Apr 20, 2024
2 parents 64e9dc4 + e013c09 commit 60b854f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.1.0

- Fix coding standard.
- Fix dart score analyzed
- Improve documentation

## 1.0.0

- Initial version.
9 changes: 8 additions & 1 deletion lib/src/models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ class ReviewLog {
}
}

/// Store card data
class Card {
/// The time when the card is scheduled to be reviewed again
late DateTime due;
double stability = 0;

/// How challenging or easy you find a specific flashcard during a review session
double difficulty = 0;
int elapsedDays = 0;
int scheduledDays = 0;
Expand All @@ -71,12 +75,13 @@ class Card {
});
}

/// Construct current time for due and last review
Card() {
due = DateTime.now().toUtc();
lastReview = DateTime.now().toUtc();
}

// .from Constructor for copying
/// Helper to clone from a card
factory Card.copyFrom(Card card) {
Card newCard = Card();
newCard.due = card.due;
Expand Down Expand Up @@ -105,13 +110,15 @@ class Card {
}
}

/// Store card and review log info
class SchedulingInfo {
late Card card;
late ReviewLog reviewLog;

SchedulingInfo(this.card, this.reviewLog);
}

/// Calculate next review
class SchedulingCards {
late Card again;
late Card hard;
Expand Down
5 changes: 3 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: fsrs
description: Dart Package for FSRS
description: A Dart package for FSRS, which implements the Free Spaced Repetition Scheduler algorithm. This package assists developers in incorporating FSRS into their flashcard applications.

version: 1.0.0
repository: https://github.com/sonbui00/dart-fsrs
repository: https://github.com/open-spaced-repetition/dart-fsrs

environment:
sdk: ^3.3.0
Expand Down

0 comments on commit 60b854f

Please sign in to comment.