You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
map.extract<String>('b'); /// 👈 `None()`, not of type `String` ⚠️
32
+
33
+
final map = <String, dynamic>{'a': 1};
34
+
map.extractMap('a'); /// 👈 `None()`, not a `Map`
35
+
36
+
final map = <String, dynamic>{'a': {'b': 2} };
37
+
map.extractMap('a'); /// 👈 `Some({'b': 2})`
38
+
```
39
+
40
+
-`Option.of` and `Option.none` factories `const` (thanks to [f-person](https://github.com/f-person) 🎉)
41
+
42
+
> **Note**: People who have the [prefer_const_constructors](https://dart.dev/tools/linter-rules#prefer_const_constructors) lint enabled will notice a warning to use `const` 🤝
43
+
44
+
- New [`managing_imports`](./example/managing_imports) example (thanks to [RandalSchwartz](https://github.com/RandalSchwartz) 🎉)
45
+
- Updated [README](./README.md) introduction
46
+
1
47
# v0.4.0 - 16 December 2022
2
48
- Added extension methods to work with nullable types (`T?`)
All the main functional programming types and patterns **fully documented**, tested, and with examples.
32
+
## Introduction
22
33
23
34
> **Fpdart is fully documented. You do not need to have any previous experience with functional programming to start using `fpdart`. Give it a try!**
24
35
@@ -28,10 +39,15 @@ Fpdart is inspired by [fp-ts](https://gcanti.github.io/fp-ts/), [cats](https://t
28
39
29
40
***
30
41
42
+
-[Introduction](#introduction)
31
43
-[📖 Learn `functional programming` and `fpdart`](#-learn-functional-programming-and-fpdart)
32
44
-[👨💻 Blog posts and tutorials](#-blog-posts-and-tutorials)
33
45
-[💻 Installation](#-installation)
34
46
-[✨ Examples](#-examples)
47
+
-[Pokeapi](#pokeapi)
48
+
-[Open Meteo API](#open-meteo-api)
49
+
-[Read/Write local file](#readwrite-local-file)
50
+
-[Manage imports](#manage-imports)
35
51
-[Option](#option)
36
52
-[Either](#either)
37
53
-[IO](#io)
@@ -84,7 +100,7 @@ Check out also this series of articles about functional programming with `fpdart
84
100
```yaml
85
101
# pubspec.yaml
86
102
dependencies:
87
-
fpdart: ^0.4.0# Check out the latest version
103
+
fpdart: ^0.4.1# Check out the latest version
88
104
```
89
105
90
106
## ✨ Examples
@@ -106,6 +122,9 @@ A 2 parts series explains step by step the Open Meteo API code:
106
122
### [Read/Write local file](./example/read_write_file/)
107
123
Example of how to read and write a local file using functional programming.
108
124
125
+
### [Manage imports](./example/managing_imports)
126
+
Using `fpdart` with other libraries and noticing naming conflicts? Learn how to rename the classes that conflict with other SDK or third-party packages.
127
+
109
128
### [Option](./lib/src/option.dart)
110
129
Used when a return value can be missing.
111
130
> For example, when parsing a `String` to `int`, since not all `String`
@@ -336,6 +355,7 @@ In general, **any contribution or feedback is welcome** (and encouraged!).
0 commit comments