Skip to content

Commit

Permalink
Fix Image fetching for iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
fotiDim committed Oct 18, 2021
1 parent fdb9268 commit 4952602
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/spotify_sdk.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io' show Platform;
import 'dart:typed_data';

import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:logger/logger.dart';
import 'package:spotify_sdk/extensions/image_dimension_extension.dart';

import 'enums/image_dimension_enum.dart';
import 'enums/repeat_mode_enum.dart';
Expand Down Expand Up @@ -500,7 +502,7 @@ class SpotifySdk {
try {
return _channel.invokeMethod(MethodNames.getImage, {
ParamNames.imageUri: imageUri.raw,
ParamNames.imageDimension: dimension
ParamNames.imageDimension: Platform.isIOS ? dimension.value : dimension
});
} on Exception catch (e) {
_logException(MethodNames.getImage, e);
Expand Down

0 comments on commit 4952602

Please sign in to comment.