// GENERATED CODE - DO NOT MODIFY BY HAND part of 'games_dto.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** GamesDto _$GamesDtoFromJson(Map json) => GamesDto( data: (json['results'] as List?)?.map((e) => GameDto.fromJson(e as Map)).toList(), next: getNextPageNumber(json['next']), ); int? getNextPageNumber(String url) { RegExp regExp = RegExp(r'page=(\d+)'); Match? match = regExp.firstMatch(url); if (match != null) { return int.parse(match.group(1)!); } else { return null; } } GameDto _$GameDtoFromJson(Map json) => GameDto( (json['id'] as num?)?.toInt(), json['name'] as String?, json['description'] as String?, json['background_image'] as String?, json['released'] as String?, );