part of '../wallet_dtos.dart'; @freezed abstract class OutletDto with _$OutletDto { const factory OutletDto({ @JsonKey(name: 'id') String? id, @JsonKey(name: 'name') String? name, @JsonKey(name: 'address') String? address, @JsonKey(name: 'earns_points') bool? earnsPoints, @JsonKey(name: 'earns_coins') bool? earnsCoins, }) = _OutletDto; factory OutletDto.fromJson(Map json) => _$OutletDtoFromJson(json); const OutletDto._(); Outlet toDomain() => Outlet( id: id ?? '', name: name ?? '', address: (address?.trim().isEmpty ?? true) ? null : address!.trim(), earnsPoints: earnsPoints ?? false, earnsCoins: earnsCoins ?? false, ); }