Skip to content

Commit d358487

Browse files
committed
+Update dependencies
1 parent 37ef9ed commit d358487

5 files changed

Lines changed: 13 additions & 37 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<a href="https://www.buymeacoffee.com/dev_cetera" target="_blank"><img align="right" src="https://cdn.buymeacoffee.com/buttons/default-orange.png" height="48"></a>
2-
<a href="https://discord.gg/gEQ8y2nfyX" target="_blank"><img align="right" src="https://raw.githubusercontent.com/dev-cetera/resources/refs/heads/main/assets/discord_icon/discord_icon.svg" height="48"></a>
2+
<a href="https://discord.gg/gEQ8y2nfyX" target="_blank"><img align="right" src="https://raw.githubusercontent.com/dev-cetera/resources/refs/heads/main/assets/icons/discord_icon/discord_icon.svg" height="48"></a>
33

44
Dart & Flutter Packages by dev-cetera.com & contributors.
55

@@ -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
```
@@ -342,3 +342,4 @@ If you're enjoying this package and find it valuable, consider showing your appr
342342
## 🧑‍⚖️ License
343343
344344
This project is released under the [MIT License](https://raw.githubusercontent.com/dev-cetera/df_pod/main/LICENSE). See [LICENSE](https://raw.githubusercontent.com/dev-cetera/df_pod/main/LICENSE) for more information.
345+

lib/src/builders/pod_builder.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -388,12 +388,4 @@ typedef TOnOptionBuilder<
388388
final class OnOptionSnapshot<T extends Object> extends BuilderSnapshot {
389389
final Option<Result<T>> value;
390390
const OnOptionSnapshot({required this.value, required super.child});
391-
392-
Option<Result<R>> reduce<R extends Object>() {
393-
final reduced = value.reduce<R>();
394-
if (reduced.isAsync()) {
395-
return const None();
396-
}
397-
return reduced.sync().unwrap().value.swap();
398-
}
399391
}

lib/src/builders/pod_list_builder.dart

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,7 @@ class ForcedAsyncPodListBuilder<T extends Object> extends StatelessWidget {
173173
return FutureBuilder(
174174
future: () async {
175175
return await Future.wait(
176-
podList
177-
.map((e) => e.toAsync().value)
178-
.map(
176+
podList.map((e) => e.toAsync().value).map(
179177
(e) => () async {
180178
return e;
181179
}(),
@@ -246,8 +244,7 @@ final class PodResultListBuilder<T extends Object> extends StatefulWidget {
246244

247245
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
248246

249-
final class PodResultListBuilderState<T extends Object>
250-
extends State<PodResultListBuilder<T>> {
247+
final class PodResultListBuilderState<T extends Object> extends State<PodResultListBuilder<T>> {
251248
//
252249
//
253250
//
@@ -289,8 +286,7 @@ final class PodResultListBuilderState<T extends Object>
289286
final key = widget.key;
290287
if (key != null) {
291288
final cachedValue =
292-
PodBuilderCacheManager.i.cacheManager.get(key.toString())
293-
as Iterable<Result<T>>?;
289+
PodBuilderCacheManager.i.cacheManager.get(key.toString()) as Iterable<Result<T>>?;
294290
if (cachedValue != null) {
295291
_valueList = cachedValue;
296292
return;
@@ -401,8 +397,7 @@ final class PodResultListBuilderState<T extends Object>
401397

402398
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
403399

404-
final class PodListBuilderSnapshot<T extends Object>
405-
extends OnOptionListSnapshot<T> {
400+
final class PodListBuilderSnapshot<T extends Object> extends OnOptionListSnapshot<T> {
406401
final Option<Iterable<Result<ValueListenable<T>>>> podList;
407402

408403
const PodListBuilderSnapshot({
@@ -412,24 +407,10 @@ final class PodListBuilderSnapshot<T extends Object>
412407
});
413408
}
414409

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

420413
class OnOptionListSnapshot<T extends Object> extends BuilderSnapshot {
421414
final Option<Iterable<Option<Result<T>>>> value;
422415
const OnOptionListSnapshot({required this.value, required super.child});
423-
424-
Option<Iterable<Option<Result<R>>>> reduce<R extends Object>() {
425-
return value.map(
426-
(e) => e.map((e) {
427-
final reduced = e.reduce<R>();
428-
if (reduced.isAsync()) {
429-
return const None();
430-
}
431-
return reduced.sync().unwrap().value.swap();
432-
}),
433-
);
434-
}
435416
}

lib/src/utils/value_listenable_x.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import '/src/_src.g.dart';
1616

1717
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
1818

19-
extension ValueListenableX<T extends Object> on ValueListenable<T> {
19+
extension ValueListenableExt<T extends Object> on ValueListenable<T> {
2020
/// Returns the Pod as a [ValueListenable].
2121
ValueListenable<T> asValueListenable() {
2222
return this;

pubspec.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repository: https://github.com/robmllze/df_pod
1616
funding:
1717
- https://www.buymeacoffee.com/dev_cetera
1818
description: A package offering tools to manage app state using ValueListenable objects called Pods.
19-
version: 0.18.6
19+
version: 0.18.7
2020
topics:
2121
- bloc
2222
- provider
@@ -46,4 +46,6 @@ dependencies:
4646

4747
dev_dependencies:
4848
flutter_lints: ^6.0.0
49+
custom_lint: ^0.7.5
50+
df_safer_dart_lints: ^0.3.2
4951

0 commit comments

Comments
 (0)