chnages has been made
This commit is contained in:
36
lib/data/dto/theme_response_dto.dart
Normal file
36
lib/data/dto/theme_response_dto.dart
Normal file
@@ -0,0 +1,36 @@
|
||||
class ThemeResponseDto {
|
||||
final int statusCode;
|
||||
final bool isSuccess;
|
||||
final String? message;
|
||||
final ThemeDataDto? data;
|
||||
|
||||
ThemeResponseDto({
|
||||
required this.statusCode,
|
||||
required this.isSuccess,
|
||||
required this.message,
|
||||
required this.data,
|
||||
});
|
||||
|
||||
factory ThemeResponseDto.fromJson(Map<String, dynamic> json) {
|
||||
return ThemeResponseDto(
|
||||
statusCode: json['statusCode'] ?? 0,
|
||||
isSuccess: json['isSuccess'] ?? false,
|
||||
message: json['message']?.toString(),
|
||||
data: json['data'] == null ? null : ThemeDataDto.fromJson(json['data']),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ThemeDataDto {
|
||||
final String name;
|
||||
final String logo;
|
||||
|
||||
ThemeDataDto({required this.name, required this.logo});
|
||||
|
||||
factory ThemeDataDto.fromJson(Map<String, dynamic> json) {
|
||||
return ThemeDataDto(
|
||||
name: (json['name'] ?? '').toString(),
|
||||
logo: (json['logo'] ?? '').toString(),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user