mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-02 16:20:57 +02:00
refactor(core): reduce generated and duplicate code
This commit is contained in:
@@ -254,13 +254,3 @@ void precacheCoverImage(BuildContext context, String? url) {
|
||||
context,
|
||||
);
|
||||
}
|
||||
|
||||
int coverImageCacheExtent(
|
||||
BuildContext context,
|
||||
double logicalSize, {
|
||||
int min = 64,
|
||||
int max = 512,
|
||||
}) {
|
||||
final dpr = MediaQuery.devicePixelRatioOf(context).clamp(1.0, 3.0).toDouble();
|
||||
return (logicalSize * dpr).round().clamp(min, max).toInt();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user