Preserve explicit model and provider architecture (#30)
This commit is contained in:
1 parent
54f50ad6b7
commit
8b0662e340
10 files changed
+104
-7
No files matched your search
@@ -53,6 +53,11 @@ class OperationDTO {
|
||||
final bool fail;
|
||||
}
|
||||
|
||||
class ProfileDTO {
|
||||
const ProfileDTO(this.locale);
|
||||
final String locale;
|
||||
}
|
||||
|
||||
abstract final class WalletMapper {
|
||||
static CurrencyAccount account(AccountDTO d) => CurrencyAccount(
|
||||
id: d.id,
|
||||
@@ -85,5 +90,5 @@ abstract final class WalletMapper {
|
||||
status: OperationStatus.values.byName(d.status),
|
||||
createdAt: d.created,
|
||||
);
|
||||
static AccountProfile profile(String locale) => AccountProfile(locale);
|
||||
static AccountProfile profile(ProfileDTO dto) => AccountProfile(dto.locale);
|
||||
}
|
||||
Reference in new issue
Block a user