mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
Optimize mobile - Avoid creating unnecessary widgets (#268)
* Avoid creating unnecessary widgets * more flexible null handling and runtime errors prevention
This commit is contained in:
parent
992f792c0a
commit
c4ef523564
29 changed files with 369 additions and 450 deletions
|
|
@ -56,7 +56,7 @@ class AlbumInfoCard extends HookConsumerWidget {
|
|||
);
|
||||
}
|
||||
|
||||
return Container();
|
||||
return const SizedBox();
|
||||
}
|
||||
|
||||
_buildImageFilter() {
|
||||
|
|
@ -151,7 +151,11 @@ class AlbumInfoCard extends HookConsumerWidget {
|
|||
),
|
||||
child: null,
|
||||
),
|
||||
Positioned(bottom: 10, left: 25, child: _buildSelectedTextBox())
|
||||
Positioned(
|
||||
bottom: 10,
|
||||
left: 25,
|
||||
child: _buildSelectedTextBox(),
|
||||
)
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
|
|
@ -176,8 +180,7 @@ class AlbumInfoCard extends HookConsumerWidget {
|
|||
Padding(
|
||||
padding: const EdgeInsets.only(top: 2.0),
|
||||
child: Text(
|
||||
albumInfo.assetCount.toString() +
|
||||
(albumInfo.isAll ? " (ALL)" : ""),
|
||||
'${albumInfo.assetCount} ${(albumInfo.isAll ? " (ALL)" : "")}',
|
||||
style: TextStyle(
|
||||
fontSize: 12, color: Colors.grey[600]),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue