| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import 'package:freezed_annotation/freezed_annotation.dart';
- import 'package:flutter/foundation.dart';
- part 'banner_list.freezed.dart';
- part 'banner_list.g.dart';
- @freezed
- abstract class BannerList with _$BannerList {
- const factory BannerList({
- Location? location,
- Banner? bannerInfo,
- List<Banner>? list,
- }) = _BannerList;
- factory BannerList.fromJson(Map<String, Object?> json) =>
- _$BannerListFromJson(json);
- }
- @freezed
- abstract class Location with _$Location {
- const factory Location({
- int? id,
- String? name,
- String? code,
- String? icon,
- String? country,
- int? sort,
- Coordinates? coordinates,
- int? userLevel,
- bool? isTrial,
- bool? showGDPR,
- }) = _Location;
- factory Location.fromJson(Map<String, Object?> json) =>
- _$LocationFromJson(json);
- }
- @freezed
- abstract class Coordinates with _$Coordinates {
- const factory Coordinates({int? lat, int? lng}) = _Coordinates;
- factory Coordinates.fromJson(Map<String, Object?> json) =>
- _$CoordinatesFromJson(json);
- }
- @freezed
- abstract class Banner with _$Banner {
- const factory Banner({
- String? action,
- String? img,
- String? title,
- String? content,
- String? data,
- }) = _Banner;
- factory Banner.fromJson(Map<String, Object?> json) => _$BannerFromJson(json);
- }
|