-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 그 외 팁 버튼 우측 하단으로 이동 - 첫 메시지 또한 팁 조회 가능
- Loading branch information
Showing
21 changed files
with
524 additions
and
219 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
This file was deleted.
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 |
---|---|---|
@@ -1,20 +1,19 @@ | ||
|
||
import 'package:palink_v2/data/dao/mindset_dao.dart'; | ||
import 'package:palink_v2/data/mapper/mindset_mappder.dart'; | ||
import 'package:palink_v2/di/locator.dart'; | ||
|
||
import 'package:palink_v2/data/api/mindset/mindset_api.dart'; | ||
import 'package:palink_v2/domain/entities/mindset/mindset.dart'; | ||
import 'package:palink_v2/domain/repository/mindset_repository.dart'; | ||
|
||
|
||
class MindsetRepositoryImpl implements MindsetRepository { | ||
final MindsetDao mindsetDao = getIt<MindsetDao>(); | ||
final MindsetApi mindsetApi; | ||
|
||
MindsetRepositoryImpl(); | ||
MindsetRepositoryImpl(this.mindsetApi); | ||
|
||
@override | ||
Future<Mindset?> getRandomMindset() async { | ||
final entity = await mindsetDao.getRandomMindset(); | ||
return MindsetMapper.fromEntity(entity!); | ||
Mindset mindset = mindsetApi.getRandomMindset() as Mindset; | ||
return mindset; | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
class Mindset { | ||
final String content; | ||
final String reason; | ||
final String mindsetText; | ||
final String mindsetId; | ||
|
||
Mindset({ | ||
required this.content, | ||
required this.reason, | ||
required this.mindsetText, | ||
required this.mindsetId, | ||
}); | ||
} |
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
Oops, something went wrong.