Skip to content

Commit

Permalink
release v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SandroMaglione committed Dec 16, 2022
1 parent 2bcda29 commit 44884d7
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 23 deletions.
12 changes: 9 additions & 3 deletions CHANGELOG.md
@@ -1,4 +1,4 @@
# v0.4.0 - Soon
# v0.4.0 - 16 December 2022
- Added extension methods to work with nullable types (`T?`)
- From `T?` to `fpdart`'s types
- `toOption`
Expand Down Expand Up @@ -48,12 +48,18 @@ final first = waitWhat.first;
/// Safe 🎯
final wellYeah = Either<String, List<int>>.safeCast(
intValue,
(dynamic value) => 'Not an List!',
(dynamic value) => 'Not a List!',
);
final firstEither = wellYeah.map((list) => list.first);
```
- Added [**Open API Meteo example**](./example/open_meteo_api/) (from imperative to functional programming)
- Added article about [Option type and Null Safety in dart](https://www.sandromaglione.com/techblog/option_type_and_null_safety_dart)
- Added new articles
- [Option type and Null Safety in dart](https://www.sandromaglione.com/techblog/option_type_and_null_safety_dart)
- [Either - Error Handling in Functional Programming](https://www.sandromaglione.com/techblog/either-error-handling-functional-programming)
- [Future & Task: asynchronous Functional Programming](https://www.sandromaglione.com/techblog/async-requests-future-and-task-dart)
- [Flutter Supabase Functional Programming with fpdart](https://www.sandromaglione.com/techblog/flutter-dart-functional-programming-fpdart-supabase-app)
- [Open Meteo API - Functional programming with fpdart (Part 1)](https://www.sandromaglione.com/techblog/real_example_fpdart_open_meteo_api_part_1)
- [Open Meteo API - Functional programming with fpdart (Part 2)](https://www.sandromaglione.com/techblog/real_example_fpdart_open_meteo_api_part_2)

# v0.3.0 - 11 October 2022
- Inverted `onSome` and `onNone` functions parameters in `match` method of `Option` [⚠️ **BREAKING CHANGE**] (*Read more on why* 👉 [#56](https://github.com/SandroMaglione/fpdart/pull/56))
Expand Down
11 changes: 10 additions & 1 deletion README.md
Expand Up @@ -74,13 +74,17 @@ Check out also this series of articles about functional programming with `fpdart
- [How to use TaskEither in fpdart](https://www.sandromaglione.com/techblog/how-to-use-task-either-fpdart-functional-programming)
- [How to map an Either to a Future in fpdart](https://blog.sandromaglione.com/techblog/from-sync-to-async-functional-programming)
- [Option type and Null Safety in dart](https://www.sandromaglione.com/techblog/option_type_and_null_safety_dart)
- [Either - Error Handling in Functional Programming](https://www.sandromaglione.com/techblog/either-error-handling-functional-programming)
- [Future & Task: asynchronous Functional Programming](https://www.sandromaglione.com/techblog/async-requests-future-and-task-dart)
- [Flutter Supabase Functional Programming with fpdart](https://www.sandromaglione.com/techblog/flutter-dart-functional-programming-fpdart-supabase-app)


## 💻 Installation

```yaml
# pubspec.yaml
dependencies:
fpdart: ^0.3.0 # Check out the latest version
fpdart: ^0.4.0 # Check out the latest version
```

## ✨ Examples
Expand All @@ -95,6 +99,10 @@ Flutter app that lets you search and view your favorite Pokemon:
### [Open Meteo API](./example/open_meteo_api/)
Re-implementation using `fpdart` and functional programming of the [Open Meteo API](https://github.com/felangel/bloc/tree/master/examples/flutter_weather/packages/open_meteo_api) from the [flutter_weather](https://bloclibrary.dev/#/flutterweathertutorial) app example in the [bloc](https://pub.dev/packages/bloc) package.

A 2 parts series explains step by step the Open Meteo API code:
- [Open Meteo API - Functional programming with fpdart (Part 1)](https://www.sandromaglione.com/techblog/real_example_fpdart_open_meteo_api_part_1)
- [Open Meteo API - Functional programming with fpdart (Part 2)](https://www.sandromaglione.com/techblog/real_example_fpdart_open_meteo_api_part_2)

### [Read/Write local file](./example/read_write_file/)
Example of how to read and write a local file using functional programming.

Expand Down Expand Up @@ -328,6 +336,7 @@ In general, **any contribution or feedback is welcome** (and encouraged!).

## 📃 Versioning

- **v0.4.0** - 16 December 2022
- **v0.3.0** - 11 October 2022
- **v0.2.0** - 16 July 2022
- **v0.1.0** - 17 June 2022
Expand Down
2 changes: 1 addition & 1 deletion example/json_serializable/pubspec.lock
Expand Up @@ -175,7 +175,7 @@ packages:
path: "../.."
relative: true
source: path
version: "0.3.0"
version: "0.3.1"
frontend_server_client:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion example/open_meteo_api/pubspec.lock
Expand Up @@ -161,7 +161,7 @@ packages:
path: "../.."
relative: true
source: path
version: "0.3.0"
version: "0.4.0"
frontend_server_client:
dependency: transitive
description:
Expand Down
28 changes: 14 additions & 14 deletions example/pokeapi_functional/pubspec.lock
Expand Up @@ -28,7 +28,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.2"
version: "2.9.0"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -98,7 +98,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.2.1"
charcode:
dependency: transitive
description:
Expand Down Expand Up @@ -126,7 +126,7 @@ packages:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
code_builder:
dependency: transitive
description:
Expand Down Expand Up @@ -168,7 +168,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.3.1"
file:
dependency: transitive
description:
Expand Down Expand Up @@ -213,7 +213,7 @@ packages:
path: "../.."
relative: true
source: path
version: "0.2.1"
version: "0.3.1"
freezed:
dependency: "direct main"
description:
Expand Down Expand Up @@ -311,21 +311,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
version: "0.12.12"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
version: "0.1.5"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.8.0"
mime:
dependency: transitive
description:
Expand All @@ -346,7 +346,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
pedantic:
dependency: transitive
description:
Expand Down Expand Up @@ -414,7 +414,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.2"
version: "1.9.0"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -449,21 +449,21 @@ packages:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.9"
version: "0.4.12"
timing:
dependency: transitive
description:
Expand Down Expand Up @@ -507,5 +507,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.17.0-0 <3.0.0"
dart: ">=2.17.0 <3.0.0"
flutter: ">=1.20.0"
4 changes: 2 additions & 2 deletions example/read_write_file/pubspec.lock
Expand Up @@ -7,7 +7,7 @@ packages:
path: "../.."
relative: true
source: path
version: "0.2.1"
version: "0.3.1"
lint:
dependency: "direct dev"
description:
Expand All @@ -16,4 +16,4 @@ packages:
source: hosted
version: "1.5.3"
sdks:
dart: ">=2.16.0 <3.0.0"
dart: ">=2.17.0 <3.0.0"
2 changes: 1 addition & 1 deletion pubspec.yaml
@@ -1,5 +1,5 @@
name: fpdart
version: 0.3.0
version: 0.4.0
homepage: https://www.sandromaglione.com/
repository: https://github.com/SandroMaglione/fpdart
description: Functional programming in Dart and Flutter. All the main functional programming types and patterns fully documented, tested, and with examples.
Expand Down

0 comments on commit 44884d7

Please sign in to comment.