From d17304df589c23bab5b364f076fcd53fb9c853cd Mon Sep 17 00:00:00 2001 From: Angelo Cassano Date: Sun, 12 Mar 2023 12:40:02 +0100 Subject: [PATCH] Release 1.0.2 --- CHANGELOG.md | 4 + README.md | 2 +- example/lib/app.dart | 2 +- example/lib/blocs/news/news_bloc.dart | 2 +- example/lib/blocs/news/news_event.dart | 2 +- example/lib/blocs/news/news_state.dart | 2 +- example/lib/di/blocs.dart | 2 +- example/lib/di/dependency_injector.dart | 2 +- example/lib/di/mappers.dart | 4 +- example/lib/di/providers.dart | 2 +- example/lib/di/repositories.dart | 2 +- example/lib/main.dart | 2 +- example/lib/models/article.dart | 2 +- example/lib/pages/home_page.dart | 2 +- example/lib/pages/webview_page.dart | 37 +- .../repositories/mappers/article_mapper.dart | 5 +- example/lib/repositories/news_repository.dart | 2 +- example/lib/services/news_service.dart | 2 +- example/lib/services/news_service.g.dart | 24 +- .../lib/services/responses/article_dto.dart | 4 +- .../responses/everything_response.dart | 4 +- example/lib/widgets/article_widget.dart | 2 +- example/pubspec.lock | 403 +++++++----------- example/test/pages/home_page_test.dart | 2 +- lib/di/dependency_injector_helper.dart | 2 +- lib/dto/dto.dart | 6 +- lib/pine.dart | 2 +- lib/utils/mapper.dart | 6 +- pubspec.yaml | 6 +- 29 files changed, 244 insertions(+), 295 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c1f669..165b6f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.2. + +* Mapper, DTOMapper and DTO are now constants + ## 1.0.1. * Fixed DTOMapper subtype diff --git a/README.md b/README.md index eb088be..8be7e9d 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ in your [pubspec.yaml](https://dart.dev/tools/pub/pubspec): ```yaml dev_dependencies: - pine: ^1.0.1 + pine: ^1.0.2 ``` You can install packages from the command line: diff --git a/example/lib/app.dart b/example/lib/app.dart index cd57840..b674bcb 100644 --- a/example/lib/app.dart +++ b/example/lib/app.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/example/lib/blocs/news/news_bloc.dart b/example/lib/blocs/news/news_bloc.dart index 22ae7ed..000f342 100644 --- a/example/lib/blocs/news/news_bloc.dart +++ b/example/lib/blocs/news/news_bloc.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/example/lib/blocs/news/news_event.dart b/example/lib/blocs/news/news_event.dart index 1c2812f..5913026 100644 --- a/example/lib/blocs/news/news_event.dart +++ b/example/lib/blocs/news/news_event.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/example/lib/blocs/news/news_state.dart b/example/lib/blocs/news/news_state.dart index 25e4008..a611fcd 100644 --- a/example/lib/blocs/news/news_state.dart +++ b/example/lib/blocs/news/news_state.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/example/lib/di/blocs.dart b/example/lib/di/blocs.dart index ad55b07..7f43ddb 100644 --- a/example/lib/di/blocs.dart +++ b/example/lib/di/blocs.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/example/lib/di/dependency_injector.dart b/example/lib/di/dependency_injector.dart index 9aaa4d6..022bcc2 100644 --- a/example/lib/di/dependency_injector.dart +++ b/example/lib/di/dependency_injector.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/example/lib/di/mappers.dart b/example/lib/di/mappers.dart index 85fd6a1..6e54786 100644 --- a/example/lib/di/mappers.dart +++ b/example/lib/di/mappers.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -27,6 +27,6 @@ part of 'dependency_injector.dart'; final List _mappers = [ Provider>( - create: (_) => ArticleMapper(), + create: (_) => const ArticleMapper(), ), ]; diff --git a/example/lib/di/providers.dart b/example/lib/di/providers.dart index 00d127b..259ccee 100644 --- a/example/lib/di/providers.dart +++ b/example/lib/di/providers.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/example/lib/di/repositories.dart b/example/lib/di/repositories.dart index 6453dbc..5b342d5 100644 --- a/example/lib/di/repositories.dart +++ b/example/lib/di/repositories.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/example/lib/main.dart b/example/lib/main.dart index a5f793e..f8c7ec4 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/example/lib/models/article.dart b/example/lib/models/article.dart index 9963de9..092388e 100644 --- a/example/lib/models/article.dart +++ b/example/lib/models/article.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/example/lib/pages/home_page.dart b/example/lib/pages/home_page.dart index c7e302f..96095d2 100644 --- a/example/lib/pages/home_page.dart +++ b/example/lib/pages/home_page.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/example/lib/pages/webview_page.dart b/example/lib/pages/webview_page.dart index 5311663..fafc87d 100644 --- a/example/lib/pages/webview_page.dart +++ b/example/lib/pages/webview_page.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -27,7 +27,7 @@ import 'package:flutter/material.dart'; import 'package:news_app/models/article.dart'; import 'package:webview_flutter/webview_flutter.dart'; -class WebViewPage extends StatelessWidget { +class WebViewPage extends StatefulWidget { final Article article; const WebViewPage( @@ -35,16 +35,41 @@ class WebViewPage extends StatelessWidget { Key? key, }) : super(key: key); + @override + State createState() => _WebViewPageState(); +} + +class _WebViewPageState extends State { + final WebViewController _controller = WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setBackgroundColor(const Color(0x00000000)) + ..setNavigationDelegate( + NavigationDelegate( + onProgress: (int progress) { + // Update loading bar. + }, + onPageStarted: (String url) {}, + onPageFinished: (String url) {}, + onWebResourceError: (WebResourceError error) {}, + ), + ); + + @override + void initState() { + _controller.loadRequest(Uri.parse(widget.article.url)); + super.initState(); + } + @override Widget build(BuildContext context) => Scaffold( appBar: AppBar( - title: Text(article.title), + title: Text(widget.article.title), ), body: _webView(), ); - Widget _webView() => WebView( - key: Key('webview_${article.url}'), - initialUrl: article.url, + Widget _webView() => WebViewWidget( + key: Key('webview_${widget.article.url}'), + controller: _controller, ); } diff --git a/example/lib/repositories/mappers/article_mapper.dart b/example/lib/repositories/mappers/article_mapper.dart index 4d8f69e..6a1e0f4 100644 --- a/example/lib/repositories/mappers/article_mapper.dart +++ b/example/lib/repositories/mappers/article_mapper.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -28,6 +28,9 @@ import 'package:news_app/services/responses/article_dto.dart'; import 'package:pine/pine.dart'; class ArticleMapper extends DTOMapper { + + const ArticleMapper(); + @override Article fromDTO(ArticleDTO dto) => Article( title: dto.title, diff --git a/example/lib/repositories/news_repository.dart b/example/lib/repositories/news_repository.dart index b4f76c1..b91fe3c 100644 --- a/example/lib/repositories/news_repository.dart +++ b/example/lib/repositories/news_repository.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/example/lib/services/news_service.dart b/example/lib/services/news_service.dart index 8b192ab..2fc3cbc 100644 --- a/example/lib/services/news_service.dart +++ b/example/lib/services/news_service.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/example/lib/services/news_service.g.dart b/example/lib/services/news_service.g.dart index 118af97..9f9ecff 100644 --- a/example/lib/services/news_service.g.dart +++ b/example/lib/services/news_service.g.dart @@ -9,7 +9,10 @@ part of 'news_service.dart'; // ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers class _NewsService implements NewsService { - _NewsService(this._dio, {this.baseUrl}); + _NewsService( + this._dio, { + this.baseUrl, + }); final Dio _dio; @@ -22,12 +25,19 @@ class _NewsService implements NewsService { final _headers = {r'Authorization': 'Bearer '}; _headers.removeWhere((k, v) => v == null); final _data = {}; - final _result = await _dio.fetch>( - _setStreamType( - Options(method: 'GET', headers: _headers, extra: _extra) - .compose(_dio.options, 'everything', - queryParameters: queryParameters, data: _data) - .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final _result = await _dio + .fetch>(_setStreamType(Options( + method: 'GET', + headers: _headers, + extra: _extra, + ) + .compose( + _dio.options, + 'everything', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); final value = EverythingResponse.fromJson(_result.data!); return value; } diff --git a/example/lib/services/responses/article_dto.dart b/example/lib/services/responses/article_dto.dart index b2151f7..2b9927c 100644 --- a/example/lib/services/responses/article_dto.dart +++ b/example/lib/services/responses/article_dto.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -34,7 +34,7 @@ class ArticleDTO extends DTO with EquatableMixin { final String? publishedAt; final String? content; - ArticleDTO({ + const ArticleDTO({ required this.title, required this.description, this.urlToImage, diff --git a/example/lib/services/responses/everything_response.dart b/example/lib/services/responses/everything_response.dart index 2c114cd..1f5e9aa 100644 --- a/example/lib/services/responses/everything_response.dart +++ b/example/lib/services/responses/everything_response.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -31,7 +31,7 @@ class EverythingResponse extends DTO { final int totalResults; final List articles; - EverythingResponse({ + const EverythingResponse({ required this.status, required this.totalResults, required this.articles, diff --git a/example/lib/widgets/article_widget.dart b/example/lib/widgets/article_widget.dart index a4679c7..3cd26da 100644 --- a/example/lib/widgets/article_widget.dart +++ b/example/lib/widgets/article_widget.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/example/pubspec.lock b/example/pubspec.lock index c2200c6..c50d63e 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,248 +5,217 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "8745ddb5f27423c6ba4cc3b182688407239fe38f73ef93a0db0a3497ddf4c2e6" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "46.0.0" + version: "47.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "2c93c461a00a27dad2849137304d32b3c6b79c75b1d10ec9547ce329de329524" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "4.6.0" + version: "4.7.0" args: dependency: transitive description: name: args - sha256: b003c3098049a51720352d219b0bb5f219b60fbfb68e7a4748139a06a5676515 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.3.1" + version: "2.4.0" async: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.10.0" + version: "2.9.0" bloc: dependency: transitive description: name: bloc - sha256: bd4f8027bfa60d96c8046dec5ce74c463b2c918dce1b0d36593575995344534a - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "8.1.0" + version: "8.1.1" bloc_test: dependency: "direct dev" description: name: bloc_test - sha256: "622b97678bf8c06a94f4c26a89ee9ebf7319bf775383dee2233e86e1f94ee28d" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "9.1.0" + version: "9.1.1" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.0" build: dependency: transitive description: name: build - sha256: "29a03af98de60b4eb9136acd56608a54e989f6da238a80af739415b05589d6df" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.3.1" build_config: dependency: transitive description: name: build_config - sha256: "5b7355c14258f5e7df24bad1566f7b991de3e54aeacfb94e1a65e5233d9739c1" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" build_daemon: dependency: transitive description: name: build_daemon - sha256: "6bc5544ea6ce4428266e7ea680e945c68806c4aae2da0eb5e9ccf38df8d6acbf" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "3.1.0" + version: "3.1.1" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "9aae031a54ab0beebc30a888c93e900d15ae2fd8883d031dbfbd5ebdb57f5a4c" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.0.10" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "56942f8114731d1e79942cd981cfef29501937ff1bccf4dbdce0273f31f13640" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.3.0" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: f4d6244cc071ba842c296cb1c4ee1b31596b9f924300647ac7a1445493471a3f - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "7.2.3" + version: "7.2.7" built_collection: dependency: transitive description: name: built_collection - sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "5.1.1" built_value: dependency: transitive description: name: built_value - sha256: d7a9cd57c215bdf8d502772447aa6b52a8ab3f956d25d5fdea6ef1df2d2dad60 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "8.4.1" + version: "8.4.4" characters: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.2.1" checked_yaml: dependency: transitive description: name: checked_yaml - sha256: dd007e4fb8270916820a0d66e24f619266b60773cddd082c6439341645af2659 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" clock: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.1.1" code_builder: dependency: transitive description: name: code_builder - sha256: "43743b95913fd28b95184eb1bed7e4bd85b802b8fad0a52522702dbeda4ee3d5" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "4.2.0" + version: "4.4.0" collection: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.17.0" + version: "1.16.0" convert: dependency: transitive description: name: convert - sha256: "196284f26f69444b7f5c50692b55ec25da86d9e500451dc09333bf2e3ad69259" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "3.0.2" + version: "3.1.1" coverage: dependency: transitive description: name: coverage - sha256: "525ac94733f9ce82507a050bfd62ad89eb1dcbc56308e1e2e17ab11abeee4a75" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.5.0" + version: "1.6.3" crypto: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "3.0.2" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.0.5" dart_style: dependency: transitive description: name: dart_style - sha256: "8aff82f9b26fd868992e5430335a9d773bfef01e1d852d7ba71bf4c5d9349351" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.2.3" + version: "2.2.4" diff_match_patch: dependency: transitive description: name: diff_match_patch - sha256: "2efc9e6e8f449d0abe15be240e2c2a3bcd977c8d126cfd70598aee60af35c0a4" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "0.4.1" dio: dependency: "direct main" description: name: dio - sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "4.0.6" equatable: dependency: "direct main" description: name: equatable - sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "2.0.5" fake_async: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.3.1" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "6.1.4" fixnum: dependency: transitive description: name: fixnum - sha256: "04be3e934c52e082558cc9ee21f42f5c1cd7a1262f4c63cd0357c08d5bba81ec" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" flutter: @@ -258,16 +227,14 @@ packages: dependency: "direct main" description: name: flutter_bloc - sha256: "890c51c8007f0182360e523518a0c732efb89876cb4669307af7efada5b55557" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "8.1.1" + version: "8.1.2" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" flutter_test: @@ -279,168 +246,147 @@ packages: dependency: transitive description: name: frontend_server_client - sha256: "4f4a162323c86ffc1245765cfe138872b8f069deb42f7dbb36115fa27f31469b" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "2.1.3" glob: dependency: transitive description: name: glob - sha256: c51b4fdfee4d281f49b8c957f1add91b815473597f76bcf07377987f66a55729 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" graphs: dependency: transitive description: name: graphs - sha256: ae0b3d956ff324c6f8671f08dcb2dbd71c99cdbf2aa3ca63a14190c47aa6679c - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.2.0" http_multi_server: dependency: transitive description: name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - sha256: db3060f22889f3d9d55f6a217565486737037eec3609f7f3eca4d0c67ee0d8a0 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "4.0.1" + version: "4.0.2" io: dependency: transitive description: name: io - sha256: "0d4c73c3653ab85bf696d51a9657604c900a370549196a91f33e4c39af760852" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "1.0.4" js: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "0.6.5" json_annotation: dependency: transitive description: name: json_annotation - sha256: cb314f00b2488de7bc575207e54402cd2f92363f333a7933fd1b0631af226baa - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "4.6.0" + version: "4.7.0" json_serializable: dependency: "direct dev" description: name: json_serializable - sha256: "0cec7060459254cf1ff980c08dedca6fa50917724a3c3ec8c5026cb88dee8238" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "6.3.1" + version: "6.5.4" lints: dependency: transitive description: name: lints - sha256: "5cfd6509652ff5e7fe149b6df4859e687fca9048437857cb2e65c8d780f396e3" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" logging: dependency: transitive description: name: logging - sha256: "293ae2d49fd79d4c04944c3a26dfd313382d5f52e821ec57119230ae16031ad4" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.1.1" matcher: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "0.12.13" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.1.5" meta: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" mime: dependency: transitive description: name: mime - sha256: dab22e92b41aa1255ea90ddc4bc2feaf35544fd0728e209638cad041a6e3928a - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.0.4" mockito: dependency: "direct dev" description: name: mockito - sha256: c3454a63ae0e880c7c9dd2dcae2dd7df103cb491889333fd0a50560de803dc78 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "5.3.0" + version: "5.3.2" mocktail: dependency: transitive description: name: mocktail - sha256: "80a996cd9a69284b3dc521ce185ffe9150cde69767c2d3a0720147d93c0cef53" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "0.3.0" nested: dependency: transitive description: name: nested - sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" node_preamble: dependency: transitive description: name: node_preamble - sha256: "8ebdbaa3b96d5285d068f80772390d27c21e1fa10fb2df6627b1b9415043608d" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" package_config: dependency: transitive description: name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" path: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.8.2" pine: @@ -449,103 +395,84 @@ packages: path: ".." relative: true source: path - version: "1.0.1" + version: "1.0.2" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: "075f927ebbab4262ace8d0b283929ac5410c0ac4e7fc123c76429564facfb757" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.1.2" + version: "2.1.4" pool: dependency: transitive description: name: pool - sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.5.1" provider: dependency: "direct main" description: name: provider - sha256: "8d7d4c2df46d6a6270a4e10404bfecb18a937e3e00f710c260d0a10415ce6b7b" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "6.0.3" + version: "6.0.5" pub_semver: dependency: transitive description: name: pub_semver - sha256: "816c1a640e952d213ddd223b3e7aafae08cd9f8e1f6864eed304cc13b0272b07" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.3" pubspec_parse: dependency: transitive description: name: pubspec_parse - sha256: "75f6614d6dde2dc68948dffbaa4fe5dae32cd700eb9fb763fe11dfb45a3c4d0a" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.2.1" - quiver: - dependency: transitive - description: - name: quiver - sha256: "93982981971e812c94d4a6fa3a57b89f9ec12b38b6380cd3c1370c3b01e4580e" - url: "https://pub.dev" - source: hosted - version: "3.1.0" retrofit: dependency: "direct main" description: name: retrofit - sha256: "4100836f2c4a4bbbf3a72ace4b631634827362209373740180c4a76f8d70480c" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "3.0.1+1" + version: "3.3.1" retrofit_generator: dependency: "direct dev" description: name: retrofit_generator - sha256: c33afa3b353332ae3237e071d61753dea7ad8f0a22e0e796d9dbb44b828d4996 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "4.0.3+1" + version: "4.2.0" shelf: dependency: transitive description: name: shelf - sha256: "8ec607599dd0a78931a5114cdac7d609b6dbbf479a38acc9a6dba024b2a30ea0" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.3.2" + version: "1.4.0" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler - sha256: aef74dc9195746a384843102142ab65b6a4735bb3beea791e63527b88cc83306 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "3.0.1" shelf_static: dependency: transitive description: name: shelf_static - sha256: e792b76b96a36d4a41b819da593aff4bdd413576b3ba6150df5d8d9996d2e74c - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.1.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: "6db16374bc3497d21aa0eebe674d3db9fdf82082aac0f04dc7b44e4af5b08afc" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.0.3" sky_engine: dependency: transitive description: flutter @@ -555,208 +482,182 @@ packages: dependency: transitive description: name: source_gen - sha256: "00f8b6b586f724a8c769c96f1d517511a41661c0aede644544d8d86a1ab11142" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "1.2.6" source_helper: dependency: transitive description: name: source_helper - sha256: "522d9b05c40ec14f479ce4428337d106c0465fedab42f514582c198460a784fe" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.3.2" + version: "1.3.3" source_map_stack_trace: dependency: transitive description: name: source_map_stack_trace - sha256: "8c463326277f68a628abab20580047b419c2ff66756fd0affd451f73f9508c11" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" source_maps: dependency: transitive description: name: source_maps - sha256: "52de2200bb098de739794c82d09c41ac27b2e42fd7e23cce7b9c74bf653c7296" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "0.10.10" + version: "0.10.12" source_span: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.9.1" + version: "1.9.0" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.11.0" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.0" stream_transform: dependency: transitive description: name: stream_transform - sha256: ed464977cb26a1f41537e177e190c67223dbd9f4f683489b6ab2e5d211ec564e - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.2.1" test: dependency: transitive description: name: test - sha256: a5fcd2d25eeadbb6589e80198a47d6a464ba3e2049da473943b8af9797900c2d - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.22.0" + version: "1.21.4" test_api: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "0.4.16" + version: "0.4.12" test_core: dependency: transitive description: name: test_core - sha256: "0ef9755ec6d746951ba0aabe62f874b707690b5ede0fecc818b138fcc9b14888" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "0.4.20" + version: "0.4.16" timing: dependency: transitive description: name: timing - sha256: c386d07d7f5efc613479a7c4d9d64b03710b03cfaa7e8ad5f2bfb295a1f0dfad - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" tuple: dependency: transitive description: name: tuple - sha256: fe3ae4f0dca3f9aac0888e2e0d117b642ce283a82d7017b54136290c0a3b0dd3 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" typed_data: dependency: transitive description: name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.3.1" vector_math: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.1.4" + version: "2.1.2" vm_service: dependency: transitive description: name: vm_service - sha256: "41db1e8658a31fe5bf636139f7b918e388a31eea1a3491cd00bf2d3147d3dad0" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "9.3.0" + version: "9.4.0" watcher: dependency: transitive description: name: watcher - sha256: e42dfcc48f67618344da967b10f62de57e04bae01d9d3af4c2596f3712a88c99 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: "3a969ddcc204a3e34e863d204b29c0752716f78b6f9cc8235083208d268a4ccd" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.3.0" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol - sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" webview_flutter: dependency: "direct main" description: name: webview_flutter - sha256: b6cd42db3ced5411f3d01599906156885b18e4188f7065a8a351eb84bee347e0 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "4.0.6" webview_flutter_android: dependency: transitive description: name: webview_flutter_android - sha256: c849dcb6bf7367f696869006fb9575c15bdc6a1d624ae13f12de5a147a740b12 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "3.4.2" webview_flutter_platform_interface: dependency: transitive description: name: webview_flutter_platform_interface - sha256: df6472164b3f4eaf3280422227f361dc8424b106726b7f21d79a8656ba53f71f - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.1.0" webview_flutter_wkwebview: dependency: transitive description: name: webview_flutter_wkwebview - sha256: ab12479f7a0cf112b9420c36aaf206a1ca47cd60cd42de74a4be2e97a697587b - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "3.2.1" yaml: dependency: transitive description: name: yaml - sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "3.1.1" sdks: diff --git a/example/test/pages/home_page_test.dart b/example/test/pages/home_page_test.dart index 6d32e87..e1d2994 100644 --- a/example/test/pages/home_page_test.dart +++ b/example/test/pages/home_page_test.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/lib/di/dependency_injector_helper.dart b/lib/di/dependency_injector_helper.dart index ce197fe..7c8ef3f 100644 --- a/lib/di/dependency_injector_helper.dart +++ b/lib/di/dependency_injector_helper.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/lib/dto/dto.dart b/lib/dto/dto.dart index a2804ac..240efe7 100644 --- a/lib/dto/dto.dart +++ b/lib/dto/dto.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -23,4 +23,6 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -abstract class DTO {} +abstract class DTO { + const DTO(); +} diff --git a/lib/pine.dart b/lib/pine.dart index 62ca086..f19e1c7 100644 --- a/lib/pine.dart +++ b/lib/pine.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation diff --git a/lib/utils/mapper.dart b/lib/utils/mapper.dart index cb29111..dd58617 100644 --- a/lib/utils/mapper.dart +++ b/lib/utils/mapper.dart @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 MyLittleSuite + * Copyright (c) 2023 MyLittleSuite * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -26,12 +26,16 @@ import 'package:pine/dto/dto.dart' as dto; abstract class Mapper { + const Mapper(); + T from(F from); F to(T to); } abstract class DTOMapper { + const DTOMapper(); + Model fromDTO(DTO dto); DTO toDTO(Model model); diff --git a/pubspec.yaml b/pubspec.yaml index 6715c2e..7fd99d2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: pine description: A lightweight architecture helper for your Flutter projects. -version: 1.0.1 +version: 1.0.2 repository: https://github.com/MyLittleSuite/pine issue_tracker: https://github.com/MyLittleSuite/pine/issues homepage: https://www.mylittlesuite.com @@ -12,8 +12,8 @@ environment: dependencies: flutter: sdk: flutter - flutter_bloc: ^8.1.1 - provider: ^6.0.3 + flutter_bloc: ^8.1.2 + provider: ^6.0.5 dev_dependencies: flutter_test: