added linear gradient to the thumbnail of trash files

This commit is contained in:
ashilkn 2022-05-12 11:50:21 +05:30
parent e8b3f79d79
commit d6d3f9ebcd
2 changed files with 13 additions and 3 deletions

View file

@ -62,7 +62,7 @@ Widget button(
);
}
final emptyContainer = Container();
final emptyContainer = const SizedBox.shrink();
Animatable<Color> passwordStrengthColors = TweenSequence<Color>(
[

View file

@ -44,12 +44,22 @@ class ThumbnailWidget extends StatefulWidget {
Widget getFileInfoContainer(BuildContext context, File file) {
if (file is TrashFile) {
return Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [Colors.black.withOpacity(0.33), Colors.transparent],
),
),
child: Text(
daysLeft(file.deleteBy),
style: TextStyle(color: Colors.white),
style: Theme.of(context)
.textTheme
.subtitle2
.copyWith(color: Colors.white), //same for both themes
),
alignment: Alignment.bottomCenter,
padding: EdgeInsets.fromLTRB(0, 0, 0, 5),
padding: EdgeInsets.only(bottom: 5),
);
}
return emptyContainer;