Skip to content

Commit

Permalink
fix format from path.extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexedia committed Oct 10, 2024
1 parent fb53500 commit b8e137b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/builders/image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ImageBuilder {
ImageBuilder.gif(this.data) : format = 'gif';

static Future<ImageBuilder> fromFile(File file, {String? format}) async {
format ??= p.extension(file.path);
format ??= p.extension(file.path).substring(1);

const formats = {
'png': 'png',
Expand Down
2 changes: 1 addition & 1 deletion lib/src/builders/sound.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SoundBuilder {
SoundBuilder.ogg(this.data) : format = 'ogg';

static Future<SoundBuilder> fromFile(File file, {String? format}) async {
format ??= p.extension(file.path);
format ??= p.extension(file.path).substring(1);

const formats = {
'mp3': 'mpeg',
Expand Down

0 comments on commit b8e137b

Please sign in to comment.