verify repo

This commit is contained in:
efrilm
2025-09-18 06:38:50 +07:00
parent 13c55afe3c
commit c40f96fc88
16 changed files with 1547 additions and 1 deletions
@@ -0,0 +1,32 @@
part of '../auth_dtos.dart';
@freezed
class VerifyDto with _$VerifyDto {
const factory VerifyDto({
@JsonKey(name: 'status') String? status,
@JsonKey(name: 'message') String? message,
@JsonKey(name: 'data') VerifyDataDto? data,
}) = _VerifyDto;
factory VerifyDto.fromJson(Map<String, dynamic> json) =>
_$VerifyDtoFromJson(json);
const VerifyDto._(); // biar bisa bikin method
/// mapping ke domain
Verify toDomain() => Verify(
status: status ?? '',
message: message ?? '',
registrationToken: data?.registrationToken ?? '',
);
}
@freezed
class VerifyDataDto with _$VerifyDataDto {
const factory VerifyDataDto({
@JsonKey(name: 'registration_token') String? registrationToken,
}) = _VerifyDataDto;
factory VerifyDataDto.fromJson(Map<String, dynamic> json) =>
_$VerifyDataDtoFromJson(json);
}