Skip to content

Commit

Permalink
v6.16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
agordn52 committed Jan 16, 2025
1 parent 70fffdc commit 31985bb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [6.16.1] - 2025-01-16

* Small change to `getPublicAsset` to remove first slash if it exists

## [6.16.0] - 2025-01-16

* Add `Field.capitalizeSentences` and `Field.capitalizeWords`
Expand Down
8 changes: 7 additions & 1 deletion lib/helpers/helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ String getImageAsset(String imageName) =>
/// Usage e.g. getPublicAsset('videos/welcome.mp4');
///
/// Returns a [String].
String getPublicAsset(String asset) => "${getEnv("ASSET_PATH_PUBLIC")}/$asset";
String getPublicAsset(String asset) {
// remove the first slash if it exists
if (asset.startsWith('/')) {
asset = asset.substring(1);
}
return "${getEnv("ASSET_PATH_PUBLIC")}/$asset";
}

/// Returns a text theme for a app font.
/// Returns a [TextTheme].
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nylo_support
description: Support library for the Nylo framework. This library supports routing, widgets, localization, cli, storage and more.
version: 6.16.0
version: 6.16.1
homepage: https://nylo.dev
repository: https://github.com/nylo-core/support/tree/6.x
issue_tracker: https://github.com/nylo-core/support/issues
Expand Down

0 comments on commit 31985bb

Please sign in to comment.