1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-23 04:38:12 +02:00

refactor(mobile): remove shared module (#9363)

This commit is contained in:
Alex
2024-05-10 11:40:41 -05:00
committed by GitHub
parent 3a68190b99
commit fed8d11fb8
20 changed files with 14 additions and 14 deletions

View File

@ -0,0 +1,17 @@
import 'dart:convert';
import 'dart:typed_data';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:immich_mobile/entities/asset.entity.dart';
import 'package:thumbhash/thumbhash.dart' as thumbhash;
ObjectRef<Uint8List?> useBlurHashRef(Asset? asset) {
if (asset?.thumbhash == null) {
return useRef(null);
}
final rbga = thumbhash.thumbHashToRGBA(
base64Decode(asset!.thumbhash!),
);
return useRef(thumbhash.rgbaToBmp(rbga));
}