From e64f2c1af156ec9625c9b727d225fe2b2f74edd3 Mon Sep 17 00:00:00 2001 From: Mairon Lucas Date: Tue, 11 Jun 2024 20:18:52 -0300 Subject: [PATCH] Data layer to live games endpoint --- .gitignore | 3 +- domain/lib/error_logger.dart | 5 + domain/lib/exceptions.dart | 7 + domain/lib/model/game_status.dart | 11 + domain/lib/model/game_summary.dart | 27 ++ domain/lib/model/team.dart | 15 + domain/lib/model/team_score.dart | 11 + domain/lib/repository/game_repository.dart | 5 + domain/lib/use_case/get_live_games_uc.dart | 16 + domain/lib/use_case/use_case.dart | 26 ++ lib/data/mapper/game_status_mapper.dart | 17 + lib/data/mapper/game_summary_mapper.dart | 26 ++ lib/data/mapper/team_mapper.dart | 12 + lib/data/mapper/team_scores_mapper.dart | 10 + lib/data/remote/data_sources/game_rds.dart | 16 +- lib/data/remote/model/arena_rm.dart | 21 ++ lib/data/remote/model/date_rm.dart | 18 ++ lib/data/remote/model/game_status_rm.dart | 19 ++ lib/data/remote/model/game_summary_rm.dart | 33 ++ lib/data/remote/model/periods_rm.dart | 19 ++ lib/data/remote/model/scores_rm.dart | 18 ++ lib/data/remote/model/team_rm.dart | 22 ++ lib/data/remote/model/team_score_rm.dart | 19 ++ lib/data/remote/model/teams_rm.dart | 18 ++ lib/data/repository/game_repository.dart | 21 ++ lib/main.dart | 31 +- pubspec.lock | 352 +++++++++++++++++++++ pubspec.yaml | 4 + 28 files changed, 796 insertions(+), 6 deletions(-) create mode 100644 domain/lib/error_logger.dart create mode 100644 domain/lib/exceptions.dart create mode 100644 domain/lib/model/game_status.dart create mode 100644 domain/lib/model/game_summary.dart create mode 100644 domain/lib/model/team.dart create mode 100644 domain/lib/model/team_score.dart create mode 100644 domain/lib/use_case/get_live_games_uc.dart create mode 100644 lib/data/mapper/game_status_mapper.dart create mode 100644 lib/data/mapper/game_summary_mapper.dart create mode 100644 lib/data/mapper/team_mapper.dart create mode 100644 lib/data/mapper/team_scores_mapper.dart create mode 100644 lib/data/remote/model/arena_rm.dart create mode 100644 lib/data/remote/model/date_rm.dart create mode 100644 lib/data/remote/model/game_status_rm.dart create mode 100644 lib/data/remote/model/game_summary_rm.dart create mode 100644 lib/data/remote/model/periods_rm.dart create mode 100644 lib/data/remote/model/scores_rm.dart create mode 100644 lib/data/remote/model/team_rm.dart create mode 100644 lib/data/remote/model/team_score_rm.dart create mode 100644 lib/data/remote/model/teams_rm.dart create mode 100644 lib/data/repository/game_repository.dart diff --git a/.gitignore b/.gitignore index 7684330..316903c 100644 --- a/.gitignore +++ b/.gitignore @@ -42,4 +42,5 @@ app.*.map.json /android/app/profile /android/app/release -.env \ No newline at end of file +.env +*.g.dart \ No newline at end of file diff --git a/domain/lib/error_logger.dart b/domain/lib/error_logger.dart new file mode 100644 index 0000000..8a47690 --- /dev/null +++ b/domain/lib/error_logger.dart @@ -0,0 +1,5 @@ +typedef ErrorLogger = Future Function( + String errorType, + dynamic error, [ + StackTrace? stackTrace, +]); diff --git a/domain/lib/exceptions.dart b/domain/lib/exceptions.dart new file mode 100644 index 0000000..3d790b9 --- /dev/null +++ b/domain/lib/exceptions.dart @@ -0,0 +1,7 @@ +abstract class NBAppException {} + +class UnknownException extends NBAppException {} + +class BackendException extends NBAppException {} + +class DataMappingException extends NBAppException {} \ No newline at end of file diff --git a/domain/lib/model/game_status.dart b/domain/lib/model/game_status.dart new file mode 100644 index 0000000..666e747 --- /dev/null +++ b/domain/lib/model/game_status.dart @@ -0,0 +1,11 @@ +class GameStatus { + GameStatus({ + required this.isFinished, + required this.isHalfTime, + this.clock, + }); + + final String? clock; + final bool isHalfTime; + final bool isFinished; +} diff --git a/domain/lib/model/game_summary.dart b/domain/lib/model/game_summary.dart new file mode 100644 index 0000000..21a750d --- /dev/null +++ b/domain/lib/model/game_summary.dart @@ -0,0 +1,27 @@ +import 'package:domain/model/game_status.dart'; +import 'package:domain/model/team.dart'; +import 'package:domain/model/team_score.dart'; + +class GameSummary { + GameSummary({ + required this.date, + required this.period, + required this.gameStatus, + required this.id, + required this.arenaName, + required this.homeTeam, + required this.visitorTeam, + required this.homeTeamScore, + required this.visitorTeamScore, + }); + + final String id; + final DateTime date; + final int period; + final GameStatus gameStatus; + final String arenaName; + final Team homeTeam; + final Team visitorTeam; + final TeamScore homeTeamScore; + final TeamScore visitorTeamScore; +} diff --git a/domain/lib/model/team.dart b/domain/lib/model/team.dart new file mode 100644 index 0000000..39823fb --- /dev/null +++ b/domain/lib/model/team.dart @@ -0,0 +1,15 @@ +class Team { + Team({ + required this.id, + required this.name, + required this.nickName, + required this.code, + required this.logoUrl, + }); + + final String id; + final String name; + final String nickName; + final String code; + final String logoUrl; +} diff --git a/domain/lib/model/team_score.dart b/domain/lib/model/team_score.dart new file mode 100644 index 0000000..b219425 --- /dev/null +++ b/domain/lib/model/team_score.dart @@ -0,0 +1,11 @@ +class TeamScore { + TeamScore({ + required this.wins, + required this.loses, + required this.points, +}); + + final int wins; + final int loses; + final int points; +} \ No newline at end of file diff --git a/domain/lib/repository/game_repository.dart b/domain/lib/repository/game_repository.dart index e69de29..78306da 100644 --- a/domain/lib/repository/game_repository.dart +++ b/domain/lib/repository/game_repository.dart @@ -0,0 +1,5 @@ +import 'package:domain/model/game_summary.dart'; + +abstract class GameDataRepository { + Future> getLiveGames(); +} diff --git a/domain/lib/use_case/get_live_games_uc.dart b/domain/lib/use_case/get_live_games_uc.dart new file mode 100644 index 0000000..d24b354 --- /dev/null +++ b/domain/lib/use_case/get_live_games_uc.dart @@ -0,0 +1,16 @@ +import 'package:domain/model/game_summary.dart'; +import 'package:domain/repository/game_repository.dart'; +import 'package:domain/use_case/use_case.dart'; + +class GetLiveGamesUC extends UseCase> { + GetLiveGamesUC({ + required super.errorLogger, + required GameDataRepository repository, + }) : _repository = repository; + + final GameDataRepository _repository; + + @override + Future> getRawFuture(void params) => + _repository.getLiveGames(); +} diff --git a/domain/lib/use_case/use_case.dart b/domain/lib/use_case/use_case.dart index e69de29..9d17723 100644 --- a/domain/lib/use_case/use_case.dart +++ b/domain/lib/use_case/use_case.dart @@ -0,0 +1,26 @@ +import 'package:domain/error_logger.dart'; +import 'package:domain/exceptions.dart'; + +abstract class UseCase { + const UseCase({ + required this.errorLogger, + }); + + final ErrorLogger errorLogger; + + Future getRawFuture(Param params); + + Future getFuture(Param params) async { + try { + return await getRawFuture(params); + } catch (e, stackTrace) { + errorLogger('Domain level error', e, stackTrace); + + if (e is! NBAppException) { + throw UnknownException(); + } else { + rethrow; + } + } + } +} diff --git a/lib/data/mapper/game_status_mapper.dart b/lib/data/mapper/game_status_mapper.dart new file mode 100644 index 0000000..78720ac --- /dev/null +++ b/lib/data/mapper/game_status_mapper.dart @@ -0,0 +1,17 @@ +import 'package:domain/exceptions.dart'; +import 'package:domain/model/game_status.dart'; +import 'package:nbapp/data/remote/model/game_status_rm.dart'; + +extension GameStatusRMtoDM on GameStatusRM { + GameStatus toDM() { + try { + return GameStatus( + clock: clock, + isFinished: long == 'Finished', + isHalfTime: halftime, + ); + } catch (_) { + throw DataMappingException(); + } + } +} diff --git a/lib/data/mapper/game_summary_mapper.dart b/lib/data/mapper/game_summary_mapper.dart new file mode 100644 index 0000000..e825434 --- /dev/null +++ b/lib/data/mapper/game_summary_mapper.dart @@ -0,0 +1,26 @@ +import 'package:domain/exceptions.dart'; +import 'package:domain/model/game_summary.dart'; +import 'package:nbapp/data/mapper/game_status_mapper.dart'; +import 'package:nbapp/data/mapper/team_mapper.dart'; +import 'package:nbapp/data/mapper/team_scores_mapper.dart'; +import 'package:nbapp/data/remote/model/game_summary_rm.dart'; + +extension GameSummaryRMtoDM on GameSummaryRM { + GameSummary toDM() { + try { + return GameSummary( + date: DateTime.parse(date.start), + period: periods.current, + gameStatus: status.toDM(), + id: id, + arenaName: arena.name, + homeTeam: teams.home.toDM(), + visitorTeam: teams.visitors.toDM(), + homeTeamScore: scores.home.toDM(), + visitorTeamScore: scores.visitors.toDM(), + ); + } catch (_) { + throw DataMappingException(); + } + } +} diff --git a/lib/data/mapper/team_mapper.dart b/lib/data/mapper/team_mapper.dart new file mode 100644 index 0000000..14d8478 --- /dev/null +++ b/lib/data/mapper/team_mapper.dart @@ -0,0 +1,12 @@ +import 'package:domain/model/team.dart'; +import 'package:nbapp/data/remote/model/team_rm.dart'; + +extension TeamMapper on TeamRM { + Team toDM() => Team( + id: id, + name: name, + code: code, + logoUrl: logo, + nickName: nickname, + ); +} diff --git a/lib/data/mapper/team_scores_mapper.dart b/lib/data/mapper/team_scores_mapper.dart new file mode 100644 index 0000000..92308e4 --- /dev/null +++ b/lib/data/mapper/team_scores_mapper.dart @@ -0,0 +1,10 @@ +import 'package:domain/model/team_score.dart'; +import 'package:nbapp/data/remote/model/team_score_rm.dart'; + +extension TeamScoresMapper on TeamScoreRM { + TeamScore toDM() => TeamScore( + wins: win, + loses: loss, + points: points, + ); +} diff --git a/lib/data/remote/data_sources/game_rds.dart b/lib/data/remote/data_sources/game_rds.dart index e52876e..ceb878f 100644 --- a/lib/data/remote/data_sources/game_rds.dart +++ b/lib/data/remote/data_sources/game_rds.dart @@ -1,5 +1,7 @@ import 'package:dio/dio.dart'; +import 'package:domain/exceptions.dart'; import 'package:nbapp/common/utils.dart'; +import 'package:nbapp/data/remote/model/game_summary_rm.dart'; class GameRDS { GameRDS({ @@ -8,7 +10,17 @@ class GameRDS { final Dio _dio; - Future getLiveGames() async { - _dio.get('${baseUrl}/games?live=all'); + Future> getLiveGames() async { + final response = await _dio.get('${baseUrl}/games?live=all'); + if (response.statusCode == 200 || response.data == null) { + final games = []; + final data = response.data as Map; + for (final game in data['response']) { + games.add(GameSummaryRM.fromJson(game)); + } + return games; + } else { + throw BackendException(); + } } } \ No newline at end of file diff --git a/lib/data/remote/model/arena_rm.dart b/lib/data/remote/model/arena_rm.dart new file mode 100644 index 0000000..359701f --- /dev/null +++ b/lib/data/remote/model/arena_rm.dart @@ -0,0 +1,21 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'arena_rm.g.dart'; + +@JsonSerializable() +class ArenaRM { + ArenaRM( + this.city, + this.name, + this.state, + this.country, + ); + + final String city; + final String name; + final String state; + final String country; + + factory ArenaRM.fromJson(Map json) => + _$ArenaRMFromJson(json); +} diff --git a/lib/data/remote/model/date_rm.dart b/lib/data/remote/model/date_rm.dart new file mode 100644 index 0000000..0b23877 --- /dev/null +++ b/lib/data/remote/model/date_rm.dart @@ -0,0 +1,18 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'date_rm.g.dart'; + +@JsonSerializable() +class DateRM { + DateRM( + this.start, + this.end, + this.duration, + ); + + final String start; + final String end; + final String duration; + + factory DateRM.fromJson(Map json) => _$DateRMFromJson(json); +} diff --git a/lib/data/remote/model/game_status_rm.dart b/lib/data/remote/model/game_status_rm.dart new file mode 100644 index 0000000..9b231b3 --- /dev/null +++ b/lib/data/remote/model/game_status_rm.dart @@ -0,0 +1,19 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'game_status_rm.g.dart'; + +@JsonSerializable() +class GameStatusRM { + GameStatusRM( + this.clock, + this.halftime, + this.long, + ); + + final String? clock; + final bool halftime; + final String long; + + factory GameStatusRM.fromJson(Map json) => + _$GameStatusRMFromJson(json); +} diff --git a/lib/data/remote/model/game_summary_rm.dart b/lib/data/remote/model/game_summary_rm.dart new file mode 100644 index 0000000..767acca --- /dev/null +++ b/lib/data/remote/model/game_summary_rm.dart @@ -0,0 +1,33 @@ +import 'package:json_annotation/json_annotation.dart'; +import 'package:nbapp/data/remote/model/arena_rm.dart'; +import 'package:nbapp/data/remote/model/date_rm.dart'; +import 'package:nbapp/data/remote/model/game_status_rm.dart'; +import 'package:nbapp/data/remote/model/periods_rm.dart'; +import 'package:nbapp/data/remote/model/scores_rm.dart'; +import 'package:nbapp/data/remote/model/teams_rm.dart'; + +part 'game_summary_rm.g.dart'; + +@JsonSerializable() +class GameSummaryRM { + GameSummaryRM( + this.id, + this.date, + this.status, + this.periods, + this.arena, + this.teams, + this.scores, + ); + + final String id; + final DateRM date; + final GameStatusRM status; + final PeriodsRM periods; + final ArenaRM arena; + final TeamsRM teams; + final ScoresRM scores; + + factory GameSummaryRM.fromJson(Map json) => + _$GameSummaryRMFromJson(json); +} diff --git a/lib/data/remote/model/periods_rm.dart b/lib/data/remote/model/periods_rm.dart new file mode 100644 index 0000000..5caa78e --- /dev/null +++ b/lib/data/remote/model/periods_rm.dart @@ -0,0 +1,19 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'periods_rm.g.dart'; + +@JsonSerializable() +class PeriodsRM { + PeriodsRM( + this.current, + this.total, + this.endOfPeriod, + ); + + final int current; + final int total; + final bool endOfPeriod; + + factory PeriodsRM.fromJson(Map json) => + _$PeriodsRMFromJson(json); +} diff --git a/lib/data/remote/model/scores_rm.dart b/lib/data/remote/model/scores_rm.dart new file mode 100644 index 0000000..55f1187 --- /dev/null +++ b/lib/data/remote/model/scores_rm.dart @@ -0,0 +1,18 @@ +import 'package:json_annotation/json_annotation.dart'; +import 'package:nbapp/data/remote/model/team_score_rm.dart'; + +part 'scores_rm.g.dart'; + +@JsonSerializable() +class ScoresRM { + ScoresRM( + this.visitors, + this.home, + ); + + final TeamScoreRM visitors; + final TeamScoreRM home; + + factory ScoresRM.fromJson(Map json) => + _$ScoresRMFromJson(json); +} diff --git a/lib/data/remote/model/team_rm.dart b/lib/data/remote/model/team_rm.dart new file mode 100644 index 0000000..e1cf4e6 --- /dev/null +++ b/lib/data/remote/model/team_rm.dart @@ -0,0 +1,22 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'team_rm.g.dart'; + +@JsonSerializable() +class TeamRM { + TeamRM( + this.id, + this.name, + this.nickname, + this.code, + this.logo, + ); + + final String id; + final String name; + final String nickname; + final String code; + final String logo; + + factory TeamRM.fromJson(Map json) => _$TeamRMFromJson(json); +} diff --git a/lib/data/remote/model/team_score_rm.dart b/lib/data/remote/model/team_score_rm.dart new file mode 100644 index 0000000..4208be9 --- /dev/null +++ b/lib/data/remote/model/team_score_rm.dart @@ -0,0 +1,19 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'team_score_rm.g.dart'; + +@JsonSerializable() +class TeamScoreRM { + TeamScoreRM( + this.win, + this.loss, + this.points, + ); + + final int win; + final int loss; + final int points; + + factory TeamScoreRM.fromJson(Map json) => + _$TeamScoreRMFromJson(json); +} diff --git a/lib/data/remote/model/teams_rm.dart b/lib/data/remote/model/teams_rm.dart new file mode 100644 index 0000000..d97e4a3 --- /dev/null +++ b/lib/data/remote/model/teams_rm.dart @@ -0,0 +1,18 @@ +import 'package:json_annotation/json_annotation.dart'; +import 'package:nbapp/data/remote/model/team_rm.dart'; + +part 'teams_rm.g.dart'; + +@JsonSerializable() +class TeamsRM { + TeamsRM( + this.visitors, + this.home, + ); + + final TeamRM visitors; + final TeamRM home; + + factory TeamsRM.fromJson(Map json) => + _$TeamsRMFromJson(json); +} diff --git a/lib/data/repository/game_repository.dart b/lib/data/repository/game_repository.dart new file mode 100644 index 0000000..99f4164 --- /dev/null +++ b/lib/data/repository/game_repository.dart @@ -0,0 +1,21 @@ +import 'package:domain/model/game_summary.dart'; +import 'package:domain/repository/game_repository.dart'; +import 'package:nbapp/data/mapper/game_summary_mapper.dart'; +import 'package:nbapp/data/remote/data_sources/game_rds.dart'; + +class GameRepository extends GameDataRepository { + GameRepository({ + required GameRDS gameRDS, + }) : _gameRDS = gameRDS; + + final GameRDS _gameRDS; + + @override + Future> getLiveGames() => _gameRDS.getLiveGames().then( + (games) => games + .map( + (game) => game.toDM(), + ) + .toList(), + ); +} diff --git a/lib/main.dart b/lib/main.dart index daf3136..03123e7 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,8 +1,33 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; +import 'package:logger/logger.dart'; + +class Log { + Logger logger = Logger(printer: PrettyPrinter()); + + Future logError( + String errorType, + dynamic error, [ + StackTrace? stackTrace, + ]) async { + logger.e(errorType, error: error, stackTrace: stackTrace); + } +} -void main() { - runApp( - const MyApp(), +void main() async { + final errorLogger = Log().logError; + await runZonedGuarded( + () async { + runApp( + MyApp(), + ); + }, + (error, stackTrace) => errorLogger( + 'Zoned Guaded Error', + error, + stackTrace, + ), ); } diff --git a/pubspec.lock b/pubspec.lock index a72b931..61c4d67 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,30 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + url: "https://pub.dev" + source: hosted + version: "67.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + url: "https://pub.dev" + source: hosted + version: "6.4.1" + args: + dependency: transitive + description: + name: args + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" async: dependency: transitive description: @@ -17,6 +41,70 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" + url: "https://pub.dev" + source: hosted + version: "2.4.11" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe + url: "https://pub.dev" + source: hosted + version: "7.3.1" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" characters: dependency: transitive description: @@ -25,6 +113,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" clock: dependency: transitive description: @@ -33,6 +129,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" collection: dependency: transitive description: @@ -41,6 +145,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" cupertino_icons: dependency: "direct main" description: @@ -49,6 +169,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.8" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.dev" + source: hosted + version: "2.3.6" dio: dependency: "direct main" description: @@ -72,6 +200,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -82,6 +226,38 @@ packages: description: flutter source: sdk version: "0.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" http_parser: dependency: transitive description: @@ -90,6 +266,38 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + js: + dependency: transitive + description: + name: js + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" + source: hosted + version: "0.7.1" + json_annotation: + dependency: "direct main" + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + json_serializable: + dependency: "direct dev" + description: + name: json_serializable + sha256: ea1432d167339ea9b5bb153f0571d0039607a873d6e04e0117af043f14a1fd4b + url: "https://pub.dev" + source: hosted + version: "6.8.0" leak_tracker: dependency: transitive description: @@ -114,6 +322,22 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.1" + logger: + dependency: "direct main" + description: + name: logger + sha256: af05cc8714f356fd1f3888fb6741cbe9fbe25cdb6eedbab80e1a6db21047d4a4 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" matcher: dependency: transitive description: @@ -138,6 +362,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.12.0" + mime: + dependency: transitive + description: + name: mime + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + url: "https://pub.dev" + source: hosted + version: "1.0.5" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" path: dependency: transitive description: @@ -146,11 +386,67 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.0" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" + url: "https://pub.dev" + source: hosted + version: "2.0.0" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" + url: "https://pub.dev" + source: hosted + version: "1.3.4" source_span: dependency: transitive description: @@ -175,6 +471,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" string_scanner: dependency: transitive description: @@ -199,6 +503,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.0" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" typed_data: dependency: transitive description: @@ -223,6 +535,46 @@ packages: url: "https://pub.dev" source: hosted version: "14.2.1" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "24301d8c293ce6fe327ffe6f59d8fd8834735f0ec36e4fd383ec7ff8a64aa078" + url: "https://pub.dev" + source: hosted + version: "0.1.5" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276 + url: "https://pub.dev" + source: hosted + version: "3.0.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" sdks: dart: ">=3.4.1 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/pubspec.yaml b/pubspec.yaml index c8582ad..5beeb9b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,10 +13,14 @@ dependencies: dio: ^5.4.3+1 domain: path: ./domain + logger: ^2.3.0 + json_annotation: ^4.9.0 dev_dependencies: + build_runner: ^2.4.11 flutter_test: sdk: flutter + json_serializable: ^6.8.0 flutter: uses-material-design: true