From bcaafe7e3325a1ee0842c3519d2f89f2bb54a092 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Thu, 30 Jan 2025 19:08:09 +0530 Subject: [PATCH] [mob][photos] Remove unused widget --- .../search/result/file_result_widget.dart | 78 ------------------- 1 file changed, 78 deletions(-) delete mode 100644 mobile/lib/ui/viewer/search/result/file_result_widget.dart diff --git a/mobile/lib/ui/viewer/search/result/file_result_widget.dart b/mobile/lib/ui/viewer/search/result/file_result_widget.dart deleted file mode 100644 index 62c9344405..0000000000 --- a/mobile/lib/ui/viewer/search/result/file_result_widget.dart +++ /dev/null @@ -1,78 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:photos/ente_theme_data.dart'; -import "package:photos/generated/l10n.dart"; -import 'package:photos/models/file/file.dart'; -import 'package:photos/models/search/file_search_result.dart'; -import 'package:photos/ui/viewer/file/detail_page.dart'; -import 'package:photos/ui/viewer/search/result/search_thumbnail_widget.dart'; -import 'package:photos/utils/navigation_util.dart'; - -class FileSearchResultWidget extends StatelessWidget { - final FileSearchResult matchedFile; - - const FileSearchResultWidget(this.matchedFile, {Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - child: Container( - color: Theme.of(context).colorScheme.searchResultsColor, - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 12), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SearchThumbnailWidget( - matchedFile.file, - "file_details", - ), - const SizedBox(width: 16), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - S.of(context).file, - style: TextStyle( - fontSize: 12, - color: Theme.of(context).colorScheme.subTextColor, - ), - ), - const SizedBox(height: 6), - SizedBox( - width: 220, - child: Text( - matchedFile.file.title!, - style: const TextStyle(fontSize: 18), - overflow: TextOverflow.ellipsis, - ), - ), - ], - ), - const Spacer(), - Icon( - Icons.chevron_right, - color: Theme.of(context).colorScheme.subTextColor, - ), - ], - ), - ), - ), - onTap: () { - _routeToDetailPage(matchedFile.file, context); - }, - ); - } - - void _routeToDetailPage(EnteFile file, BuildContext context) { - final page = DetailPage( - DetailPageConfiguration( - List.unmodifiable([file]), - 0, - "file_details", - ), - ); - routeToPage(context, page); - } -}