Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Use StatelessWidget instead of helper method

ashilkn1c6e3439949e
diff --git a/mobile/lib/ui/viewer/search/result/contact_result_page.dart b/mobile/lib/ui/viewer/search/result/contact_result_page.dart
index 7144058ca3..53b675ed3e 100644
--- a/mobile/lib/ui/viewer/search/result/contact_result_page.dart
+++ b/mobile/lib/ui/viewer/search/result/contact_result_page.dart
@@ -137,7 +137,8 @@ class _ContactResultPageState extends State<ContactResultPage> {
},
),
),
- if (collections.isNotEmpty) _buildAlbumSection(collections),
+ if (collections.isNotEmpty)
+ _AlbumsSection(context: context, collections: collections),
],
),
);
@@ -191,8 +192,19 @@ class _ContactResultPageState extends State<ContactResultPage> {
),
);
}
+}
+
+class _AlbumsSection extends StatelessWidget {
+ const _AlbumsSection({
+ required this.context,
+ required this.collections,
+ });
- Widget _buildAlbumSection(List<Collection> collections) {
+ final BuildContext context;
+ final List<Collection> collections;
+
+ @override
+ Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(bottom: 24, top: 8),
child: Column(