Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update examples and fix lint warnings #93

Merged
merged 1 commit into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
analyzer:
exclude:
- '**/*.g.dart'
language:
strict-casts: true
strict-inference: true
Expand Down
7 changes: 4 additions & 3 deletions example/json_serializable/lib/user.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

102 changes: 47 additions & 55 deletions example/json_serializable/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: "4826f97faae3af9761f26c52e56b2aa5ffd18d2c1721d984ad85137721c25f43"
sha256: e440ac42679dfc04bbbefb58ed225c994bc7e07fccc8a68ec7d3631a127e5da9
url: "https://pub.dev"
source: hosted
version: "31.0.0"
version: "54.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: "7337610c3f9cd13e6b7c6bb0f410644091cf63c9a1436e73352a70f3286abb03"
sha256: "2c2e3721ee9fb36de92faa060f3480c81b23e904352b087e5c64224b1a044427"
url: "https://pub.dev"
source: hosted
version: "2.8.0"
version: "5.6.0"
args:
dependency: transitive
description:
Expand Down Expand Up @@ -53,42 +53,42 @@ packages:
dependency: transitive
description:
name: build_config
sha256: ad77deb6e9c143a3f550fbb4c5c1e0c6aadabe24274898d06b9526c61b9cf4fb
sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1
url: "https://pub.dev"
source: hosted
version: "1.0.0"
version: "1.1.1"
build_daemon:
dependency: transitive
description:
name: build_daemon
sha256: "6bc5544ea6ce4428266e7ea680e945c68806c4aae2da0eb5e9ccf38df8d6acbf"
sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
version: "3.1.1"
build_resolvers:
dependency: transitive
description:
name: build_resolvers
sha256: "4666aef1d045c5ca15ebba63e400bd4e4fbd9f0dd06e791b51ab210da78a27f7"
sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95
url: "https://pub.dev"
source: hosted
version: "2.0.6"
version: "2.2.0"
build_runner:
dependency: "direct dev"
description:
name: build_runner
sha256: "361d73f37cd48c47a81a61421eb1cc4cfd2324516fbb52f1bc4c9a01834ef2de"
sha256: a3335cae313ea41f193e5637f98185e5cb37b3fde2c5c4654ac546b8164e59ac
url: "https://pub.dev"
source: hosted
version: "2.1.11"
version: "2.4.0"
build_runner_core:
dependency: transitive
description:
name: build_runner_core
sha256: "0db1b64c84fa803603fa406f8721959036e898cc9575d6ce4a3067581b9276c0"
sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292"
url: "https://pub.dev"
source: hosted
version: "7.2.2"
version: "7.2.7"
built_collection:
dependency: transitive
description:
Expand All @@ -109,18 +109,10 @@ packages:
dependency: transitive
description:
name: checked_yaml
sha256: dd007e4fb8270916820a0d66e24f619266b60773cddd082c6439341645af2659
sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c"
url: "https://pub.dev"
source: hosted
version: "0.3.5"
version: "2.0.2"
code_builder:
dependency: transitive
description:
Expand Down Expand Up @@ -149,10 +141,10 @@ packages:
dependency: transitive
description:
name: coverage
sha256: "17cf9a839208acaed741b1f00ac87cd1fde00548198ba57205cca45c749cb379"
sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097"
url: "https://pub.dev"
source: hosted
version: "1.3.2"
version: "1.6.3"
crypto:
dependency: transitive
description:
Expand All @@ -165,10 +157,10 @@ packages:
dependency: transitive
description:
name: dart_style
sha256: "6e8086e1d3c2f6bc15056ee248c4ddc48c2bc71287c0961bf801a08633ed4333"
sha256: "7a03456c3490394c8e7665890333e91ae8a49be43542b616e414449ac358acd4"
url: "https://pub.dev"
source: hosted
version: "2.2.1"
version: "2.2.4"
file:
dependency: transitive
description:
Expand Down Expand Up @@ -196,10 +188,10 @@ packages:
dependency: transitive
description:
name: frontend_server_client
sha256: "4f4a162323c86ffc1245765cfe138872b8f069deb42f7dbb36115fa27f31469b"
sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612"
url: "https://pub.dev"
source: hosted
version: "2.1.3"
version: "3.2.0"
glob:
dependency: transitive
description:
Expand Down Expand Up @@ -252,26 +244,26 @@ packages:
dependency: "direct dev"
description:
name: json_annotation
sha256: "0aa7409f6c82acfab96853b8b0c7503de49918cbe705a57cfdeb477756b4521b"
sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317
url: "https://pub.dev"
source: hosted
version: "4.1.0"
version: "4.8.0"
json_serializable:
dependency: "direct main"
description:
name: json_serializable
sha256: "4af8658055786907c7cecb7fc207b00995fb81201c59542ef6378fc92304cc1c"
sha256: dadc08bd61f72559f938dd08ec20dbfec6c709bba83515085ea943d2078d187a
url: "https://pub.dev"
source: hosted
version: "5.0.2"
version: "6.6.1"
lint:
dependency: "direct dev"
description:
name: lint
sha256: "4a539aa34ec5721a2c7574ae2ca0336738ea4adc2a34887d54b7596310b33c85"
sha256: "3e9343b1cededcfb1e8b40d0dbd3592b7a1c6c0121545663a991433390c2bc97"
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "2.0.1"
logging:
dependency: transitive
description:
Expand All @@ -284,10 +276,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "2e2c34e631f93410daa3ee3410250eadc77ac6befc02a040eda8a123f34e6f5a"
sha256: c94db23593b89766cda57aab9ac311e3616cf87c6fa4e9749df032f66f30dcb8
url: "https://pub.dev"
source: hosted
version: "0.12.11"
version: "0.12.14"
meta:
dependency: transitive
description:
Expand Down Expand Up @@ -348,10 +340,10 @@ packages:
dependency: transitive
description:
name: pubspec_parse
sha256: "0e01f805457ef610ccaf8d18067596afc34107a27149778b06b2083edbc140c1"
sha256: "75f6614d6dde2dc68948dffbaa4fe5dae32cd700eb9fb763fe11dfb45a3c4d0a"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.2.1"
shelf:
dependency: transitive
description:
Expand Down Expand Up @@ -388,18 +380,18 @@ packages:
dependency: transitive
description:
name: source_gen
sha256: "00f8b6b586f724a8c769c96f1d517511a41661c0aede644544d8d86a1ab11142"
sha256: c2bea18c95cfa0276a366270afaa2850b09b4a76db95d546f3d003dcc7011298
url: "https://pub.dev"
source: hosted
version: "1.2.2"
version: "1.2.7"
source_helper:
dependency: transitive
description:
name: source_helper
sha256: "522d9b05c40ec14f479ce4428337d106c0465fedab42f514582c198460a784fe"
sha256: "3b67aade1d52416149c633ba1bb36df44d97c6b51830c2198e934e3fca87ca1f"
url: "https://pub.dev"
source: hosted
version: "1.3.2"
version: "1.3.3"
source_map_stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -468,34 +460,34 @@ packages:
dependency: "direct dev"
description:
name: test
sha256: "5f59ad7ae322905b1299ef250744e1e266320aa90a0a76e51f00b6e06e49ac51"
sha256: "5301f54eb6fe945daa99bc8df6ece3f88b5ceaa6f996f250efdaaf63e22886be"
url: "https://pub.dev"
source: hosted
version: "1.20.2"
version: "1.23.1"
test_api:
dependency: transitive
description:
name: test_api
sha256: d8ca35bbbeef2d037e5693a3c8a381505afebfbfee7bc33fff5581bc4e16a939
sha256: "6182294da5abf431177fccc1ee02401f6df30f766bc6130a0852c6b6d7ee6b2d"
url: "https://pub.dev"
source: hosted
version: "0.4.9"
version: "0.4.18"
test_core:
dependency: transitive
description:
name: test_core
sha256: cc8bc45cbe52e8133293537ac4cffc4d9b35c93e91481eb64ef2304e2e722949
sha256: d2e9240594b409565524802b84b7b39341da36dd6fd8e1660b53ad928ec3e9af
url: "https://pub.dev"
source: hosted
version: "0.4.11"
version: "0.4.24"
timing:
dependency: transitive
description:
name: timing
sha256: c386d07d7f5efc613479a7c4d9d64b03710b03cfaa7e8ad5f2bfb295a1f0dfad
sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
version: "1.0.1"
typed_data:
dependency: transitive
description:
Expand All @@ -508,10 +500,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: e686ae49284939abc06972e25f634ccdb5007d5664c4dfa1995002e8b6aa27a9
sha256: f24bfb5ea0b015205e583dda73d67de44785d583ad0889929deaff3a32359ff5
url: "https://pub.dev"
source: hosted
version: "8.3.0"
version: "11.1.0"
watcher:
dependency: transitive
description:
Expand Down Expand Up @@ -545,4 +537,4 @@ packages:
source: hosted
version: "3.1.1"
sdks:
dart: ">=2.19.0 <4.0.0"
dart: ">=3.0.0-134.0.dev <4.0.0"
4 changes: 2 additions & 2 deletions example/json_serializable/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ environment:
sdk: '>=2.13.0 <3.0.0'

dependencies:
json_serializable: ^5.0.0
json_serializable: ^6.6.1
fpdart:
path: ../../.

dev_dependencies:
test: ^1.17.5
lint: ^1.5.3
lint: ^2.0.1
json_annotation: ^4.1.0
build_runner: ^2.0.6
3 changes: 3 additions & 0 deletions example/managing_imports/lib/functional.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// ignore_for_file: dangling_library_doc_comments

/// This file is used to export all the functional programming libraries used in
/// the project. It also exports the `FpState` type alias, which is used to
/// avoid conflicts with the `State` class from the Flutter SDK.

import 'package:fpdart/fpdart.dart' as fpdart show State;

// The `fpdart` library is used to create functional programming constructs.
Expand Down
8 changes: 6 additions & 2 deletions example/open_meteo_api/lib/src/fpdart/location_failure.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: comment_references

import 'package:http/http.dart' as http;

/// Abstract class which represents a failure in the `locationSearch` request.
Expand Down Expand Up @@ -27,7 +29,8 @@ class LocationInvalidJsonDecodeFpdartFailure
final String body;
}

/// [OpenMeteoApiFpdartLocationFailure] when location response is not a valid [Map].
/// [OpenMeteoApiFpdartLocationFailure] when location response is not a valid
/// [Map].
class LocationInvalidMapFpdartFailure
implements OpenMeteoApiFpdartLocationFailure {
const LocationInvalidMapFpdartFailure(this.json);
Expand All @@ -39,7 +42,8 @@ class LocationInvalidMapFpdartFailure
class LocationKeyNotFoundFpdartFailure
implements OpenMeteoApiFpdartLocationFailure {}

/// [OpenMeteoApiFpdartLocationFailure] when location data is not a valid [List].
/// [OpenMeteoApiFpdartLocationFailure] when location data is not a valid
/// [List].
class LocationInvalidListFpdartFailure
implements OpenMeteoApiFpdartLocationFailure {
const LocationInvalidListFpdartFailure(this.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class OpenMeteoApiClientFpdart {

/// Finds a [Location] `/v1/search/?name=(query)`.
TaskEither<OpenMeteoApiFpdartLocationFailure, Location> locationSearch(
String query) =>
String query,
) =>
TaskEither<OpenMeteoApiFpdartLocationFailure, http.Response>.tryCatch(
() => _httpClient.get(
Uri.https(
Expand Down
8 changes: 6 additions & 2 deletions example/open_meteo_api/lib/src/fpdart/weather_failure.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: comment_references

import 'package:http/http.dart' as http;

/// Abstract class which represents a failure in the `getWeather` request.
Expand All @@ -17,7 +19,8 @@ class WeatherRequestFpdartFailure implements OpenMeteoApiFpdartWeatherFailure {
final http.Response response;
}

/// [OpenMeteoApiFpdartWeatherFailure] when weather response is not a valid [Map].
/// [OpenMeteoApiFpdartWeatherFailure] when weather response is not a valid
/// [Map].
class WeatherInvalidMapFpdartFailure
implements OpenMeteoApiFpdartWeatherFailure {
const WeatherInvalidMapFpdartFailure(this.body);
Expand All @@ -41,7 +44,8 @@ class WeatherInvalidListFpdartFailure
class WeatherDataNotFoundFpdartFailure
implements OpenMeteoApiFpdartWeatherFailure {}

/// [OpenMeteoApiFpdartWeatherFailure] when the response is not a valid [Weather]
/// [OpenMeteoApiFpdartWeatherFailure] when the response is not a valid
/// [Weather].
class WeatherFormattingFpdartFailure
implements OpenMeteoApiFpdartWeatherFailure {
const WeatherFormattingFpdartFailure(this.object, this.stackTrace);
Expand Down
Loading