use assets to show photos, videos and live photos in file types section

This commit is contained in:
ashilkn 2024-02-27 17:14:29 +05:30
parent 623a442a2a
commit 9e09f884cb
10 changed files with 5 additions and 1 deletions

BIN
assets/2.0x/type_live.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
assets/2.0x/type_photos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/2.0x/type_videos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
assets/3.0x/type_live.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
assets/3.0x/type_photos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
assets/3.0x/type_videos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
assets/type_live.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
assets/type_photos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
assets/type_videos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View file

@ -129,6 +129,9 @@ class _FileTypeSectionState extends State<FileTypeSection> {
class FileTypeRecommendation extends StatelessWidget {
static const knownTypesToAssetPath = {
"PHOTO": "assets/type_photos.png",
"VIDEO": "assets/type_videos.png",
"LIVE": "assets/type_live.png",
"AVI": "assets/type_AVI.png",
"GIF": "assets/type_GIF.png",
"HEIC": "assets/type_HEIC.png",
@ -150,7 +153,8 @@ class FileTypeRecommendation extends StatelessWidget {
.call()
.replaceAll(RegExp(r'.$'), "")
.split(" ")
.first;
.first
.toUpperCase();
final assetPath = knownTypesToAssetPath[fileType];
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),