mirror of
https://github.com/immich-app/immich.git
synced 2024-12-19 00:32:49 +02:00
c1b22125fd
* styling light and dark theme * Icon topbar * Fixed app bar title dark theme * Fixed issue with getting thumbnail for things * Refactor sharing page * Refactor scroll thumb * Refactor chip in auto backup indiation button * Refactor sharing page * Added theme toggle * Up version for testflight build * Refactor backup controller page * Refactor album selection page * refactor album pages * Refactor gradient color profile header * Added theme switcher * Register app theme correctly * Added locale to the app * Added translation key * Styling for bottomsheet colors * up server version * Fixed font size * Fixed overlapsed sliverappbar on photos screen
73 lines
2.1 KiB
Dart
73 lines
2.1 KiB
Dart
import 'package:cached_network_image/cached_network_image.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:hive_flutter/hive_flutter.dart';
|
|
import 'package:immich_mobile/constants/hive_box.dart';
|
|
|
|
class ThumbnailWithInfo extends StatelessWidget {
|
|
const ThumbnailWithInfo({
|
|
Key? key,
|
|
required this.textInfo,
|
|
required this.imageUrl,
|
|
required this.onTap,
|
|
}) : super(key: key);
|
|
|
|
final String textInfo;
|
|
final String imageUrl;
|
|
final Function onTap;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
var box = Hive.box(userInfoBox);
|
|
|
|
return GestureDetector(
|
|
onTap: () {
|
|
onTap();
|
|
},
|
|
child: Padding(
|
|
padding: const EdgeInsets.only(right: 8.0),
|
|
child: SizedBox(
|
|
width: MediaQuery.of(context).size.width / 3,
|
|
child: Stack(
|
|
alignment: Alignment.bottomCenter,
|
|
children: [
|
|
Container(
|
|
foregroundDecoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(10),
|
|
color: Colors.black26,
|
|
),
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(10),
|
|
child: CachedNetworkImage(
|
|
width: 250,
|
|
height: 250,
|
|
fit: BoxFit.cover,
|
|
imageUrl: imageUrl,
|
|
httpHeaders: {
|
|
"Authorization": "Bearer ${box.get(accessTokenKey)}"
|
|
},
|
|
),
|
|
),
|
|
),
|
|
Positioned(
|
|
bottom: 8,
|
|
left: 10,
|
|
child: SizedBox(
|
|
width: MediaQuery.of(context).size.width / 3,
|
|
child: Text(
|
|
textInfo,
|
|
style: const TextStyle(
|
|
color: Colors.white,
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 14,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|