Ensure desktop gets high resolution photos
This commit is contained in:
parent
fbf7e055b7
commit
cf07f46930
@ -1,3 +1,4 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:wonders/_tools/unsplash_download_service.dart';
|
||||
import 'package:wonders/logic/common/platform_info.dart';
|
||||
|
||||
@ -26,7 +27,10 @@ class UnsplashPhotoData {
|
||||
size = 1200;
|
||||
break;
|
||||
}
|
||||
if (PlatformInfo.pixelRatio >= 1.5) {
|
||||
bool isDesktop = defaultTargetPlatform == TargetPlatform.windows ||
|
||||
defaultTargetPlatform == TargetPlatform.macOS ||
|
||||
defaultTargetPlatform == TargetPlatform.linux;
|
||||
if (PlatformInfo.pixelRatio >= 1.5 || isDesktop) {
|
||||
size *= 2;
|
||||
}
|
||||
return 'https://wonderous.info/unsplash/$id-$size.jpg';
|
||||
|
Loading…
x
Reference in New Issue
Block a user