refactor: deduplicate shared patterns, replace hardcoded colors
This commit is contained in:
@@ -129,9 +129,7 @@ class _ArtworkPickerDialogState extends State<ArtworkPickerDialog> {
|
||||
height: 400,
|
||||
child: _isLoading
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: (_artworkList == null || _artworkList!.isEmpty)
|
||||
? Center(child: Text(t.metadataEdit.noArtworkAvailable))
|
||||
: _buildGrid(),
|
||||
: _buildArtworkContent(),
|
||||
),
|
||||
actions: [
|
||||
if (_isApplying)
|
||||
@@ -167,6 +165,13 @@ class _ArtworkPickerDialogState extends State<ArtworkPickerDialog> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildArtworkContent() {
|
||||
if (_artworkList == null || _artworkList!.isEmpty) {
|
||||
return Center(child: Text(t.metadataEdit.noArtworkAvailable));
|
||||
}
|
||||
return _buildGrid();
|
||||
}
|
||||
|
||||
Widget _buildGrid() {
|
||||
final crossAxisCount = _isPosters ? 3 : 2;
|
||||
final aspectRatio = _isPosters ? 2.0 / 3.0 : 16.0 / 9.0;
|
||||
|
||||
Reference in New Issue
Block a user