ui: Add a shadow behind the delete icons
This commit is contained in:
parent
436bccf86c
commit
4d6c584841
@ -1,4 +1,5 @@
|
||||
import 'dart:io';
|
||||
import 'package:decorated_icon/decorated_icon.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:mime/mime.dart';
|
||||
@ -11,6 +12,16 @@ import 'package:moxxyv2/ui/widgets/chat/shared/video.dart';
|
||||
import 'package:moxxyv2/ui/widgets/chat/thumbnail.dart';
|
||||
import 'package:path/path.dart' as pathlib;
|
||||
|
||||
Widget _deleteIconWithShadow() {
|
||||
return const Center(
|
||||
child: DecoratedIcon(
|
||||
Icons.delete,
|
||||
size: 32,
|
||||
shadows: [BoxShadow(blurRadius: 8)],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class SendFilesPage extends StatelessWidget {
|
||||
|
||||
const SendFilesPage({ Key? key }) : super(key: key);
|
||||
@ -45,12 +56,7 @@ class SendFilesPage extends StatelessWidget {
|
||||
}
|
||||
},
|
||||
borderColor: selected ? Colors.blue : null,
|
||||
child: selected ? const Center(
|
||||
child: Icon(
|
||||
Icons.delete,
|
||||
size: 32,
|
||||
),
|
||||
) : null,
|
||||
child: selected ? _deleteIconWithShadow() : null,
|
||||
),
|
||||
);
|
||||
} else if (mime.startsWith('video/')) {
|
||||
@ -72,12 +78,7 @@ class SendFilesPage extends StatelessWidget {
|
||||
}
|
||||
},
|
||||
borderColor: selected ? Colors.blue : null,
|
||||
child: selected ? const Center(
|
||||
child: Icon(
|
||||
Icons.delete,
|
||||
size: 32,
|
||||
),
|
||||
) : null,
|
||||
child: selected ? _deleteIconWithShadow(): null,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
|
@ -260,6 +260,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.7.4"
|
||||
decorated_icon:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: decorated_icon
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
dio:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -17,6 +17,7 @@ dependencies:
|
||||
crop_your_image: 0.7.2
|
||||
cryptography: 2.0.5
|
||||
#cupertino_icons: 1.0.2
|
||||
decorated_icon: 1.2.1
|
||||
dio: 4.0.6
|
||||
equatable: 2.0.3
|
||||
external_path: 1.0.1
|
||||
|
Loading…
Reference in New Issue
Block a user