1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-09 23:17:29 +02:00

chore(mobile): Add const linter (#14447)

This commit is contained in:
Alex
2024-12-02 09:33:44 -06:00
committed by GitHub
parent 4eb7758f56
commit 1bb6926b5e
14 changed files with 39 additions and 34 deletions

View File

@@ -499,8 +499,8 @@ class SearchPage extends HookConsumerWidget {
controller: textSearchController,
decoration: InputDecoration(
contentPadding: prefilter != null
? EdgeInsets.only(left: 24)
: EdgeInsets.all(8),
? const EdgeInsets.only(left: 24)
: const EdgeInsets.all(8),
prefixIcon: prefilter != null
? null
: Icon(
@@ -647,7 +647,9 @@ class SearchResultGrid extends StatelessWidget {
stackEnabled: false,
emptyIndicator: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: !isSearching ? SearchEmptyContent() : SizedBox.shrink(),
child: !isSearching
? const SearchEmptyContent()
: const SizedBox.shrink(),
),
),
),
@@ -666,7 +668,7 @@ class SearchEmptyContent extends StatelessWidget {
child: ListView(
shrinkWrap: false,
children: [
SizedBox(height: 40),
const SizedBox(height: 40),
Center(
child: Image.asset(
context.isDarkTheme
@@ -675,15 +677,15 @@ class SearchEmptyContent extends StatelessWidget {
height: 125,
),
),
SizedBox(height: 16),
const SizedBox(height: 16),
Center(
child: Text(
"Search for your photos and videos",
style: context.textTheme.labelLarge,
),
),
SizedBox(height: 32),
QuickLinkList(),
const SizedBox(height: 32),
const QuickLinkList(),
],
),
);
@@ -725,13 +727,13 @@ class QuickLinkList extends StatelessWidget {
QuickLink(
title: 'videos'.tr(),
icon: Icons.play_circle_outline_rounded,
onTap: () => context.pushRoute(AllVideosRoute()),
onTap: () => context.pushRoute(const AllVideosRoute()),
),
QuickLink(
title: 'favorites'.tr(),
icon: Icons.favorite_border_rounded,
isBottom: true,
onTap: () => context.pushRoute(FavoritesRoute()),
onTap: () => context.pushRoute(const FavoritesRoute()),
),
],
),