2024-02-18 04:31:34 +01:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
2024-08-06 16:20:27 +02:00
|
|
|
import 'package:immich_mobile/extensions/theme_extensions.dart';
|
2024-02-18 04:31:34 +01:00
|
|
|
|
|
|
|
class ThumbnailPlaceholder extends StatelessWidget {
|
|
|
|
final EdgeInsets margin;
|
|
|
|
final double width;
|
|
|
|
final double height;
|
|
|
|
|
|
|
|
const ThumbnailPlaceholder({
|
|
|
|
super.key,
|
|
|
|
this.margin = EdgeInsets.zero,
|
|
|
|
this.width = 250,
|
|
|
|
this.height = 250,
|
|
|
|
});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2024-08-06 16:20:27 +02:00
|
|
|
var gradientColors = [
|
|
|
|
context.colorScheme.surfaceContainer,
|
|
|
|
context.colorScheme.surfaceContainer.darken(amount: .1),
|
|
|
|
];
|
|
|
|
|
2024-02-18 04:31:34 +01:00
|
|
|
return Container(
|
|
|
|
width: width,
|
|
|
|
height: height,
|
|
|
|
margin: margin,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
gradient: LinearGradient(
|
2024-08-06 16:20:27 +02:00
|
|
|
colors: gradientColors,
|
2024-02-18 04:31:34 +01:00
|
|
|
begin: Alignment.topCenter,
|
|
|
|
end: Alignment.bottomCenter,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|