first commit

This commit is contained in:
2026-04-29 12:53:22 +07:00
commit e6a30eddd3
394 changed files with 16408 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
class RefreshTokenResponse {
RefreshTokenResponse({
required this.status,
required this.message,
required this.accessToken,
required this.refreshToken,
required this.tokenType,
required this.expiresIn,
});
factory RefreshTokenResponse.fromJson(Map<String, dynamic> json) {
final data = json['data'] as Map<String, dynamic>? ?? {};
return RefreshTokenResponse(
status: json['status']?.toString() ?? '',
message: json['message']?.toString() ?? '',
accessToken: data['access_token']?.toString() ?? '',
refreshToken: data['refresh_token']?.toString() ?? '',
tokenType: data['token_type']?.toString() ?? '',
expiresIn: int.tryParse(data['expires_in']?.toString() ?? '0') ?? 0,
);
}
final String status;
final String message;
final String accessToken;
final String refreshToken;
final String tokenType;
final int expiresIn;
}