chore: pre-commit ci hook, dart format
This commit is contained in:
@@ -16,12 +16,7 @@ class ArtworkPickerDialog extends StatefulWidget {
|
||||
final String ratingKey;
|
||||
final String element; // "posters" or "arts"
|
||||
|
||||
const ArtworkPickerDialog({
|
||||
super.key,
|
||||
required this.client,
|
||||
required this.ratingKey,
|
||||
required this.element,
|
||||
});
|
||||
const ArtworkPickerDialog({super.key, required this.client, required this.ratingKey, required this.element});
|
||||
|
||||
@override
|
||||
State<ArtworkPickerDialog> createState() => _ArtworkPickerDialogState();
|
||||
@@ -106,10 +101,7 @@ class _ArtworkPickerDialogState extends State<ArtworkPickerDialog> {
|
||||
}
|
||||
|
||||
Future<void> _uploadFile() async {
|
||||
final result = await FilePickerService.instance.pickFiles(
|
||||
type: FileType.image,
|
||||
withData: true,
|
||||
);
|
||||
final result = await FilePickerService.instance.pickFiles(type: FileType.image, withData: true);
|
||||
|
||||
if (result == null || result.files.isEmpty || !mounted) return;
|
||||
|
||||
@@ -138,9 +130,7 @@ class _ArtworkPickerDialogState extends State<ArtworkPickerDialog> {
|
||||
content: SizedBox(
|
||||
width: 500,
|
||||
height: 400,
|
||||
child: _isLoading
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: _buildArtworkContent(),
|
||||
child: _isLoading ? const Center(child: CircularProgressIndicator()) : _buildArtworkContent(),
|
||||
),
|
||||
actions: [
|
||||
if (_isApplying)
|
||||
@@ -167,10 +157,7 @@ class _ArtworkPickerDialogState extends State<ArtworkPickerDialog> {
|
||||
FocusableButton(
|
||||
autofocus: true,
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: Text(t.common.cancel),
|
||||
),
|
||||
child: TextButton(onPressed: () => Navigator.pop(context), child: Text(t.common.cancel)),
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -214,11 +201,7 @@ class _ArtworkPickerDialogState extends State<ArtworkPickerDialog> {
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||
child: PlexOptimizedImage(
|
||||
client: widget.client,
|
||||
imagePath: thumbUrl,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
child: PlexOptimizedImage(client: widget.client, imagePath: thumbUrl, fit: BoxFit.contain),
|
||||
),
|
||||
),
|
||||
if (isSelected)
|
||||
@@ -227,10 +210,7 @@ class _ArtworkPickerDialogState extends State<ArtworkPickerDialog> {
|
||||
bottom: 6,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
decoration: BoxDecoration(color: Theme.of(context).colorScheme.primary, shape: BoxShape.circle),
|
||||
child: Icon(Symbols.check_rounded, size: 16, color: Theme.of(context).colorScheme.onPrimary),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user