mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-23 01:06:21 +01:00
Remove unused code
This commit is contained in:
parent
7f8fbef078
commit
c9a3a01d85
1 changed files with 0 additions and 74 deletions
|
@ -1,74 +0,0 @@
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/widgets.dart';
|
|
||||||
import 'package:nc_photos/account.dart';
|
|
||||||
import 'package:nc_photos/api/api.dart';
|
|
||||||
import 'package:nc_photos/theme.dart';
|
|
||||||
|
|
||||||
class ImageGridItem extends StatelessWidget {
|
|
||||||
ImageGridItem({
|
|
||||||
Key key,
|
|
||||||
@required this.account,
|
|
||||||
@required this.imageUrl,
|
|
||||||
this.isSelected = false,
|
|
||||||
this.onTap,
|
|
||||||
this.onLongPress,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
build(BuildContext context) {
|
|
||||||
return Stack(
|
|
||||||
fit: StackFit.expand,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(2),
|
|
||||||
child: FittedBox(
|
|
||||||
clipBehavior: Clip.hardEdge,
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
child: CachedNetworkImage(
|
|
||||||
imageUrl: imageUrl,
|
|
||||||
httpHeaders: {
|
|
||||||
"Authorization": Api.getAuthorizationHeaderValue(account),
|
|
||||||
},
|
|
||||||
fadeInDuration: const Duration(),
|
|
||||||
filterQuality: FilterQuality.high,
|
|
||||||
imageRenderMethodForWeb: ImageRenderMethodForWeb.HttpGet,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (isSelected)
|
|
||||||
Positioned.fill(
|
|
||||||
child: Container(
|
|
||||||
color: AppTheme.getSelectionOverlayColor(context),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (isSelected)
|
|
||||||
Positioned.fill(
|
|
||||||
child: Align(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: Icon(
|
|
||||||
Icons.check_circle_outlined,
|
|
||||||
size: 32,
|
|
||||||
color: AppTheme.getSelectionCheckColor(context),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned.fill(
|
|
||||||
child: Material(
|
|
||||||
type: MaterialType.transparency,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: onTap,
|
|
||||||
onLongPress: onLongPress,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
final Account account;
|
|
||||||
final String imageUrl;
|
|
||||||
final bool isSelected;
|
|
||||||
final VoidCallback onTap;
|
|
||||||
final VoidCallback onLongPress;
|
|
||||||
}
|
|
Loading…
Reference in a new issue