Skip to content

Commit 22e47a9

Browse files
ci: bump version to v0.18.12
1 parent 1bbcfae commit 22e47a9

20 files changed

+334
-208
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [0.18.12]
4+
5+
- Released @ 12/2025 (UTC)
6+
- Add fromStream constructor for Pod
7+
38
## [0.18.11]
49

510
- Released @ 7/2025 (UTC)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
[![banner](https://github.com/dev-cetera/df_pod/blob/v0.18.11/doc/assets/banner.png?raw=true)](https://github.com/dev-cetera)
1+
[![banner](https://github.com/dev-cetera/df_pod/blob/v0.18.12/doc/assets/banner.png?raw=true)](https://github.com/dev-cetera)
22

33
[![pub](https://img.shields.io/pub/v/df_pod.svg)](https://pub.dev/packages/df_pod)
4-
[![tag](https://img.shields.io/badge/Tag-v0.18.11-purple?logo=github)](https://github.com/dev-cetera/df_pod/tree/v0.18.11)
4+
[![tag](https://img.shields.io/badge/Tag-v0.18.12-purple?logo=github)](https://github.com/dev-cetera/df_pod/tree/v0.18.12)
55
[![buymeacoffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-FFDD00?logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/dev_cetera)
66
[![sponsor](https://img.shields.io/badge/Sponsor-grey?logo=github-sponsors&logoColor=pink)](https://github.com/sponsors/dev-cetera)
77
[![patreon](https://img.shields.io/badge/Patreon-grey?logo=patreon)](https://www.patreon.com/robelator)
@@ -210,7 +210,7 @@ PodListBuilder(
210210
if (!loggedIn) {
211211
return const Text('Please log in.');
212212
}
213-
return Text('You have $count items in your cart. Total: \$total');
213+
return Text('You have $count items in your cart. Total: \$$total');
214214
},
215215
);
216216
```

lib/src/builders/builder_utils.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ final class PodBuilderCacheManager {
2626
static final i = PodBuilderCacheManager._(CacheManager<Object>());
2727
}
2828

29-
typedef TGlobalPod<T extends Object> = Resolvable<GenericPod<Option<Result<T>>>>;
29+
typedef TGlobalPod<T extends Object> =
30+
Resolvable<GenericPod<Option<Result<T>>>>;

lib/src/builders/pod_builder.dart

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,9 @@ final class PodResultBuilderState<T extends Object>
286286
void _setValue() {
287287
final key = widget.key;
288288
if (key != null) {
289-
final cachedValue = PodBuilderCacheManager.i.cacheManager
290-
.get(key.toString()) as Result<T>?;
289+
final cachedValue =
290+
PodBuilderCacheManager.i.cacheManager.get(key.toString())
291+
as Result<T>?;
291292
if (cachedValue != null) {
292293
_value = cachedValue;
293294
return;
@@ -384,12 +385,10 @@ final class PodBuilderSnapshot<T extends Object> extends OnOptionSnapshot<T> {
384385
});
385386
}
386387

387-
typedef TOnOptionBuilder<T extends Object,
388-
TSnapshot extends OnOptionSnapshot<T>>
389-
= Widget Function(
390-
BuildContext context,
391-
TSnapshot snapshot,
392-
);
388+
typedef TOnOptionBuilder<
389+
T extends Object,
390+
TSnapshot extends OnOptionSnapshot<T>
391+
> = Widget Function(BuildContext context, TSnapshot snapshot);
393392

394393
final class OnOptionSnapshot<T extends Object> extends BuilderSnapshot {
395394
final Option<Result<T>> value;

lib/src/builders/pod_list_builder.dart

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ class ForcedAsyncPodListBuilder<T extends Object> extends StatelessWidget {
169169
return FutureBuilder(
170170
future: () async {
171171
return await Future.wait(
172-
podList.map((e) => e.toAsync().value).map(
172+
podList
173+
.map((e) => e.toAsync().value)
174+
.map(
173175
(e) => () async {
174176
return e;
175177
}(),
@@ -240,7 +242,8 @@ final class PodResultListBuilder<T extends Object> extends StatefulWidget {
240242

241243
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
242244

243-
final class PodResultListBuilderState<T extends Object> extends State<PodResultListBuilder<T>> {
245+
final class PodResultListBuilderState<T extends Object>
246+
extends State<PodResultListBuilder<T>> {
244247
//
245248
//
246249
//
@@ -282,7 +285,8 @@ final class PodResultListBuilderState<T extends Object> extends State<PodResultL
282285
final key = widget.key;
283286
if (key != null) {
284287
final cachedValue =
285-
PodBuilderCacheManager.i.cacheManager.get(key.toString()) as Iterable<Result<T>>?;
288+
PodBuilderCacheManager.i.cacheManager.get(key.toString())
289+
as Iterable<Result<T>>?;
286290
if (cachedValue != null) {
287291
_valueList = cachedValue;
288292
return;
@@ -398,7 +402,8 @@ final class PodResultListBuilderState<T extends Object> extends State<PodResultL
398402

399403
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
400404

401-
final class PodListBuilderSnapshot<T extends Object> extends OnOptionListSnapshot<T> {
405+
final class PodListBuilderSnapshot<T extends Object>
406+
extends OnOptionListSnapshot<T> {
402407
final Option<Iterable<Result<ValueListenable<T>>>> podList;
403408

404409
const PodListBuilderSnapshot({
@@ -408,8 +413,10 @@ final class PodListBuilderSnapshot<T extends Object> extends OnOptionListSnapsho
408413
});
409414
}
410415

411-
typedef TOnOptionListBuilder<T extends Object, TSnapshot extends OnOptionListSnapshot<T>> = Widget
412-
Function(BuildContext context, TSnapshot snapshot);
416+
typedef TOnOptionListBuilder<
417+
T extends Object,
418+
TSnapshot extends OnOptionListSnapshot<T>
419+
> = Widget Function(BuildContext context, TSnapshot snapshot);
413420

414421
class OnOptionListSnapshot<T extends Object> extends BuilderSnapshot {
415422
final Option<Iterable<Option<Result<T>>>> value;

lib/src/builders/polling_pod_builder.dart

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import '/_common.dart';
1515

1616
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
1717

18-
class PollingPodBuilder<T extends Object> extends ResolvablePollingPodBuilder<T> {
18+
class PollingPodBuilder<T extends Object>
19+
extends ResolvablePollingPodBuilder<T> {
1920
PollingPodBuilder({
2021
super.key,
2122
// ignore: no_future_outcome_type_or_error
@@ -64,7 +65,8 @@ class ResolvablePollingPodBuilder<T extends Object> extends StatefulWidget {
6465
//
6566

6667
@override
67-
State<ResolvablePollingPodBuilder<T>> createState() => _ResolvablePollingPodBuilderState<T>();
68+
State<ResolvablePollingPodBuilder<T>> createState() =>
69+
_ResolvablePollingPodBuilderState<T>();
6870
}
6971

7072
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
@@ -88,7 +90,8 @@ final class _ResolvablePollingPodBuilderState<T extends Object>
8890
@override
8991
void didUpdateWidget(ResolvablePollingPodBuilder<T> oldWidget) {
9092
super.didUpdateWidget(oldWidget);
91-
if (oldWidget.podPoller != widget.podPoller || oldWidget.interval != widget.interval) {
93+
if (oldWidget.podPoller != widget.podPoller ||
94+
oldWidget.interval != widget.interval) {
9295
_maybeStartPolling();
9396
}
9497
}
@@ -138,7 +141,8 @@ final class _ResolvablePollingPodBuilderState<T extends Object>
138141
PodBuilderSnapshot<T>(
139142
pod: const None(),
140143
value: Option.from(
141-
PodBuilderCacheManager.i.cacheManager.get(widget.key?.toString()) as Result<T>?,
144+
PodBuilderCacheManager.i.cacheManager.get(widget.key?.toString())
145+
as Result<T>?,
142146
),
143147
child: _staticChild,
144148
),

lib/src/pods/core/_child_pod.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ part of 'core.dart';
1515

1616
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
1717

18-
final class ChildPod<TParent extends Object, TChild extends Object> extends PodNotifier<TChild>
18+
final class ChildPod<TParent extends Object, TChild extends Object>
19+
extends PodNotifier<TChild>
1920
with GenericPod<TChild>, ProtectedPodMixin<TChild> {
2021
//
2122
//
@@ -36,8 +37,8 @@ final class ChildPod<TParent extends Object, TChild extends Object> extends PodN
3637
ChildPod({
3738
required TPodsResponderFn<TParent> responder,
3839
required TValuesReducerFn<TChild, TParent> reducer,
39-
}) : _reducer = reducer,
40-
_responder = responder {
40+
}) : _reducer = reducer,
41+
_responder = responder {
4142
_parents = responder();
4243
value = reducer(parents.map((p) => p.value).toList());
4344
_initializeParents(parents);
@@ -108,6 +109,7 @@ final class ChildPod<TParent extends Object, TChild extends Object> extends PodN
108109

109110
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
110111

111-
typedef TValuesReducerFn<TChild, TParentList> = TChild Function(List<TParentList> parentValues);
112+
typedef TValuesReducerFn<TChild, TParentList> =
113+
TChild Function(List<TParentList> parentValues);
112114

113115
typedef TPodsResponderFn<T extends Object> = Iterable<GenericPod<T>> Function();

lib/src/pods/core/_reducer_pod.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ part of 'core.dart';
2626
///
2727
/// Note that when this pod disposes via [dispose], it will not dispose the Pods
2828
/// provided by [responder]. Explicit disposal is needed.
29-
base class ReducerPod<T extends Object> extends PodNotifier<T> with GenericPod<T> {
29+
base class ReducerPod<T extends Object> extends PodNotifier<T>
30+
with GenericPod<T> {
3031
//
3132
//
3233
//

lib/src/pods/core/_reducers/pod_reducer_1.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ final class PodReducer1 {
5252

5353
typedef TResponderFn1<P1 extends Object> = (GenericPod<P1> p1,) Function();
5454

55-
typedef TNullableReducerFn1<C extends Object, P1 extends Object> = C Function(GenericPod<P1> p1);
55+
typedef TNullableReducerFn1<C extends Object, P1 extends Object> =
56+
C Function(GenericPod<P1> p1);
5657

57-
typedef TReducerFn1<C extends Object, P1 extends Object> = C Function(GenericPod<P1> p1);
58+
typedef TReducerFn1<C extends Object, P1 extends Object> =
59+
C Function(GenericPod<P1> p1);

lib/src/pods/core/_reducers/pod_reducer_2.dart

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ final class PodReducer2 {
2020
PodReducer2._();
2121

2222
/// Reduces 2 Pods into a [ChildPod].
23-
static ChildPod<Object, C>
24-
reduce<C extends Object, P1 extends Object, P2 extends Object>(
25-
TResponderFn2<P1, P2> responder,
26-
TNullableReducerFn2<C, P1, P2> reducer,
27-
) {
23+
static ChildPod<Object, C> reduce<
24+
C extends Object,
25+
P1 extends Object,
26+
P2 extends Object
27+
>(TResponderFn2<P1, P2> responder, TNullableReducerFn2<C, P1, P2> reducer) {
2828
return ChildPod<Object, C>(
2929
responder: () => _toList(responder),
3030
reducer: (_) => _reduce(responder, reducer),
@@ -51,18 +51,14 @@ final class PodReducer2 {
5151

5252
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
5353

54-
typedef TResponderFn2<P1 extends Object, P2 extends Object>
55-
= (GenericPod<P1> p1, GenericPod<P2> p2) Function();
54+
typedef TResponderFn2<P1 extends Object, P2 extends Object> =
55+
(GenericPod<P1> p1, GenericPod<P2> p2) Function();
5656

57-
typedef TNullableReducerFn2<C extends Object, P1 extends Object,
58-
P2 extends Object>
59-
= C Function(
60-
GenericPod<P1> p1,
61-
GenericPod<P2> p2,
62-
);
57+
typedef TNullableReducerFn2<
58+
C extends Object,
59+
P1 extends Object,
60+
P2 extends Object
61+
> = C Function(GenericPod<P1> p1, GenericPod<P2> p2);
6362

64-
typedef TReducerFn2<C extends Object, P1 extends Object, P2 extends Object> = C
65-
Function(
66-
GenericPod<P1> p1,
67-
GenericPod<P2> p2,
68-
);
63+
typedef TReducerFn2<C extends Object, P1 extends Object, P2 extends Object> =
64+
C Function(GenericPod<P1> p1, GenericPod<P2> p2);

0 commit comments

Comments
 (0)