mirror of
https://github.com/immich-app/immich.git
synced 2026-04-16 23:51:55 -04:00
* refactor: yank old timeline # Conflicts: # mobile/lib/presentation/pages/editing/drift_edit.page.dart # mobile/lib/providers/websocket.provider.dart # mobile/lib/routing/router.dart * more cleanup * remove native code * chore: bump sqlite-data version * remove old background tasks from BGTaskSchedulerPermittedIdentifiers * rebase --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
33 lines
974 B
Dart
33 lines
974 B
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:immich_mobile/widgets/asset_grid/thumbnail_placeholder.dart';
|
|
import 'package:immich_mobile/widgets/common/fade_in_placeholder_image.dart';
|
|
import 'package:octo_image/octo_image.dart';
|
|
|
|
OctoPlaceholderBuilder blurHashPlaceholderBuilder(Uint8List? blurhash, {BoxFit? fit}) {
|
|
return (context) => blurhash == null
|
|
? const ThumbnailPlaceholder()
|
|
: FadeInPlaceholderImage(
|
|
placeholder: const ThumbnailPlaceholder(),
|
|
image: MemoryImage(blurhash),
|
|
fit: fit ?? BoxFit.cover,
|
|
);
|
|
}
|
|
|
|
OctoErrorBuilder blurHashErrorBuilder(
|
|
Uint8List? blurhash, {
|
|
BoxFit? fit,
|
|
Text? message,
|
|
IconData? icon,
|
|
Color? iconColor,
|
|
double? iconSize,
|
|
}) {
|
|
return OctoError.placeholderWithErrorIcon(
|
|
blurHashPlaceholderBuilder(blurhash, fit: fit),
|
|
message: message,
|
|
icon: icon,
|
|
iconColor: iconColor,
|
|
iconSize: iconSize,
|
|
);
|
|
}
|