Skip to content

Commit 8a64649

Browse files
committed
v6.30.0
1 parent 6eca1c7 commit 8a64649

File tree

11 files changed

+360
-84
lines changed

11 files changed

+360
-84
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [6.30.0] - 2025-06-23
2+
3+
* Added `PullableConfig` to pullable widget.
4+
* Update pubspec.yaml
5+
16
## [6.29.0] - 2025-06-20
27

38
* Added new `visibleWhen` extension to `Widget` class. This will allow you to show or hide a widget based on a condition.

example/pubspec.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ packages:
194194
dependency: transitive
195195
description:
196196
name: flutter_local_notifications
197-
sha256: b94a50aabbe56ef254f95f3be75640f99120429f0a153b2dc30143cffc9bfdf3
197+
sha256: edae0c34573233ab03f5ba1f07465e55c384743893042cb19e010b4ee8541c12
198198
url: "https://pub.dev"
199199
source: hosted
200-
version: "19.2.1"
200+
version: "19.3.0"
201201
flutter_local_notifications_linux:
202202
dependency: transitive
203203
description:
@@ -210,10 +210,10 @@ packages:
210210
dependency: transitive
211211
description:
212212
name: flutter_local_notifications_platform_interface
213-
sha256: "2569b973fc9d1f63a37410a9f7c1c552081226c597190cb359ef5d5762d1631c"
213+
sha256: "277d25d960c15674ce78ca97f57d0bae2ee401c844b6ac80fcd972a9c99d09fe"
214214
url: "https://pub.dev"
215215
source: hosted
216-
version: "9.0.0"
216+
version: "9.1.0"
217217
flutter_local_notifications_windows:
218218
dependency: transitive
219219
description:
@@ -419,7 +419,7 @@ packages:
419419
path: ".."
420420
relative: true
421421
source: path
422-
version: "6.29.0"
422+
version: "6.30.0"
423423
path:
424424
dependency: transitive
425425
description:

lib/helpers/backpack.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Backpack {
5454
}
5555

5656
/// Flush a session using a [name].
57-
sessionFlush(String name) {
57+
void sessionFlush(String name) {
5858
if (_values.containsKey(name)) {
5959
_values.remove(name);
6060
}

lib/helpers/extensions.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ import 'package:flutter/material.dart'
5050
VerticalDivider;
5151
import 'package:get_time_ago/get_time_ago.dart';
5252
import 'package:intl/intl.dart' as intl;
53+
import '/widgets/ny_pullable.dart';
5354
import '/themes/base_theme_config.dart';
5455
import '/helpers/state_action.dart';
5556
import '/nylo.dart';
@@ -1058,6 +1059,23 @@ extension NyWidget on Widget {
10581059
child: this,
10591060
);
10601061
}
1062+
1063+
/// Make a widget pullable using the [Pullable] widget.
1064+
Widget pullable(
1065+
{required Future<void> Function()? onRefresh,
1066+
PullableConfig? pullableConfig}) {
1067+
if (pullableConfig == null) {
1068+
pullableConfig = PullableConfig(
1069+
onRefresh: onRefresh,
1070+
);
1071+
} else {
1072+
pullableConfig = pullableConfig.updateOnRefresh(onRefresh);
1073+
}
1074+
return Pullable(
1075+
config: pullableConfig,
1076+
child: this,
1077+
);
1078+
}
10611079
}
10621080

10631081
extension NyStateful on StatefulWidget {

lib/helpers/ny_action.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class NyAction {
88
/// Provide an [actionKey] for the action you want to limit.
99
/// Provide an [perform] to execute if the user is authorized.
1010
/// Provide a [maxPerDay] to limit the number of times the action can be performed.
11-
static limitPerDay(String actionKey, Function() perform,
11+
static Future<void> limitPerDay(String actionKey, Function() perform,
1212
{int maxPerDay = 5, Function()? unauthorized}) async {
1313
String key = "action_$actionKey";
1414

lib/helpers/ny_logger.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ class NyLogger {
1313
/// Logs a debug [message] to the console.
1414
/// It will only print if your app's environment is in debug mode.
1515
/// You can override this by setting [alwaysPrint] = true.
16-
static debug(dynamic message, {bool alwaysPrint = false}) {
16+
static void debug(dynamic message, {bool alwaysPrint = false}) {
1717
_loggerPrint(message ?? "", 'debug', alwaysPrint);
1818
}
1919

2020
/// Logs an error [message] to the console.
2121
/// It will only print if your app's environment is in debug mode.
2222
/// You can override this by setting [alwaysPrint] = true.
23-
static error(dynamic message, {bool alwaysPrint = false}) {
23+
static void error(dynamic message, {bool alwaysPrint = false}) {
2424
if (message is Exception) {
2525
_loggerPrint(message.toString(), 'error', alwaysPrint);
2626
return;
@@ -31,12 +31,12 @@ class NyLogger {
3131
/// Log an info [message] to the console.
3232
/// It will only print if your app's environment is in debug mode.
3333
/// You can override this by setting [alwaysPrint] = true.
34-
static info(dynamic message, {bool alwaysPrint = false}) {
34+
static void info(dynamic message, {bool alwaysPrint = false}) {
3535
_loggerPrint(message ?? "", 'info', alwaysPrint);
3636
}
3737

3838
/// Dumps a [message] with a tag.
39-
static dump(dynamic message, String? tag, {bool alwaysPrint = false}) {
39+
static void dump(dynamic message, String? tag, {bool alwaysPrint = false}) {
4040
_loggerPrint(message ?? "", tag, alwaysPrint);
4141
}
4242

@@ -75,7 +75,7 @@ class NyLogger {
7575
}
7676

7777
/// Log a message to the console.
78-
static _logMessage(dynamic message) {
78+
static void _logMessage(dynamic message) {
7979
if (kDebugMode) {
8080
if (message is String && message.length > 800) {
8181
log(message);

lib/helpers/state_action.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'helper.dart';
77
/// [StateAction] class
88
class StateAction {
99
/// Helper to find the state name
10-
static _findStateName(dynamic state) {
10+
static String _findStateName(dynamic state) {
1111
if (state is String) {
1212
return state;
1313
}

lib/widgets/navigation_hub/navigation_hub.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ abstract class NavigationHub<T extends StatefulWidget> extends NyPage<T> {
6565
};
6666

6767
/// The navigator key
68-
getNavigationKey(MapEntry<int, NavigationTab> page) {
68+
UniqueKey? getNavigationKey(MapEntry<int, NavigationTab> page) {
6969
if (navigatorKeys.containsKey(page.key)) {
7070
return navigatorKeys[page.key];
7171
} else {
@@ -75,7 +75,7 @@ abstract class NavigationHub<T extends StatefulWidget> extends NyPage<T> {
7575
}
7676

7777
/// Handle the tap event
78-
onTap(int index) {
78+
void onTap(int index) {
7979
if (reset.containsKey(index) && reset[index] == true) {
8080
if (navigatorKeys.containsKey(index)) {
8181
navigatorKeys[index] = UniqueKey();

0 commit comments

Comments
 (0)