-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
19 changed files
with
518 additions
and
78 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import 'package:json_annotation/json_annotation.dart'; | ||
import 'package:copy_with_extension/copy_with_extension.dart'; | ||
import 'package:storypad/core/databases/models/base_db_model.dart'; | ||
|
||
part 'story_preferences_db_model.g.dart'; | ||
|
||
@CopyWith() | ||
@JsonSerializable() | ||
class StoryPreferencesDbModel extends BaseDbModel { | ||
final String? starIcon; | ||
final bool? showDayCount; | ||
|
||
StoryPreferencesDbModel({ | ||
required this.showDayCount, | ||
required this.starIcon, | ||
}); | ||
|
||
@override | ||
int get id => 0; | ||
|
||
@override | ||
DateTime? get updatedAt => null; | ||
|
||
factory StoryPreferencesDbModel.create() { | ||
return StoryPreferencesDbModel( | ||
showDayCount: false, | ||
starIcon: null, | ||
); | ||
} | ||
|
||
@override | ||
Map<String, dynamic> toJson() => _$StoryPreferencesDbModelToJson(this); | ||
factory StoryPreferencesDbModel.fromJson(Map<String, dynamic> json) => _$StoryPreferencesDbModelFromJson(json); | ||
} |
Oops, something went wrong.