Skip to content

Commit 31985bb

Browse files
committed
v6.16.1
1 parent 70fffdc commit 31985bb

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [6.16.1] - 2025-01-16
2+
3+
* Small change to `getPublicAsset` to remove first slash if it exists
4+
15
## [6.16.0] - 2025-01-16
26

37
* Add `Field.capitalizeSentences` and `Field.capitalizeWords`

lib/helpers/helper.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ String getImageAsset(String imageName) =>
5757
/// Usage e.g. getPublicAsset('videos/welcome.mp4');
5858
///
5959
/// Returns a [String].
60-
String getPublicAsset(String asset) => "${getEnv("ASSET_PATH_PUBLIC")}/$asset";
60+
String getPublicAsset(String asset) {
61+
// remove the first slash if it exists
62+
if (asset.startsWith('/')) {
63+
asset = asset.substring(1);
64+
}
65+
return "${getEnv("ASSET_PATH_PUBLIC")}/$asset";
66+
}
6167

6268
/// Returns a text theme for a app font.
6369
/// Returns a [TextTheme].

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: nylo_support
22
description: Support library for the Nylo framework. This library supports routing, widgets, localization, cli, storage and more.
3-
version: 6.16.0
3+
version: 6.16.1
44
homepage: https://nylo.dev
55
repository: https://github.com/nylo-core/support/tree/6.x
66
issue_tracker: https://github.com/nylo-core/support/issues

0 commit comments

Comments
 (0)