-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #355 from yorifuji/feature/drift
Drift
- Loading branch information
Showing
89 changed files
with
2,275 additions
and
5,573 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
|
||
.PHONY: build-runner build-launcher-icons update-goldens | ||
|
||
.PHONY: build-runner | ||
build-runner: | ||
test -e .env || cp .env_example .env | ||
flutter pub get && dart run build_runner build -d && dart format -l 80 lib/i18n | ||
|
||
.PHONY: build-launcher-icons | ||
build-launcher-icons: | ||
flutter pub run flutter_launcher_icons:main | ||
|
||
.PHONY: update-goldens | ||
update-goldens: | ||
flutter test --update-goldens --tags=golden |
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
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,23 @@ | ||
import 'package:buzz_recipe_viewer/model/search_hit.dart'; | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'favorite.freezed.dart'; | ||
|
||
@freezed | ||
class Favorite with _$Favorite { | ||
const factory Favorite({ | ||
required SearchHit searchHit, | ||
required DateTime createdAt, | ||
required DateTime updatedAt, | ||
int? id, | ||
}) = _Favorite; | ||
|
||
factory Favorite.from(SearchHit searchHit) { | ||
final now = DateTime.now(); | ||
return Favorite( | ||
searchHit: searchHit, | ||
createdAt: now, | ||
updatedAt: now, | ||
); | ||
} | ||
} |
Oops, something went wrong.