[Setup] Added build.yaml and check.yaml (#1)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2024-09-21 11:59:28 +02:00 committed by GitHub
parent 226686eb18
commit 7b3e733b76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
112 changed files with 3926 additions and 3784 deletions

View file

@ -27,7 +27,7 @@ class BookViewerReader extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
return Container(
child: Text("Web not supported."),
child: const Text("Web not supported."),
);
}
}

View file

@ -159,14 +159,14 @@ class _BookViewerScreenState extends ConsumerState<BookViewerScreen> {
),
} else ...{
const SizedBox(height: 32),
Card(
const Card(
child: Padding(
padding: const EdgeInsets.all(16),
padding: EdgeInsets.all(16),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.info_rounded),
const SizedBox(width: 16),
SizedBox(width: 16),
Text("No next chapter"),
],
),
@ -211,14 +211,14 @@ class _BookViewerScreenState extends ConsumerState<BookViewerScreen> {
),
} else ...{
const SizedBox(height: 32),
Card(
const Card(
child: Padding(
padding: const EdgeInsets.all(16),
padding: EdgeInsets.all(16),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.info_rounded),
const SizedBox(width: 16),
SizedBox(width: 16),
Text("First chapter"),
],
),

View file

@ -120,9 +120,9 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
),
),
} else if (AdaptiveLayout.of(context).isDesktop)
DefaultSliverTopBadding(),
const DefaultSliverTopBadding(),
if (AdaptiveLayout.of(context).isDesktop)
SliverToBoxAdapter(
const SliverToBoxAdapter(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
@ -191,7 +191,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
posters: view.recentlyAdded,
),
)),
].whereNotNull().toList().addInBetween(SliverToBoxAdapter(child: SizedBox(height: 16))),
].whereNotNull().toList().addInBetween(const SliverToBoxAdapter(child: SizedBox(height: 16))),
const DefautlSliverBottomPadding(),
],
),

View file

@ -83,7 +83,7 @@ class OverviewHeader extends ConsumerWidget {
if (onTitleClicked != null)
IconButton(
onPressed: onTitleClicked,
icon: Transform.translate(offset: Offset(0, 1.5), child: Icon(Icons.read_more_rounded)))
icon: Transform.translate(offset: const Offset(0, 1.5), child: const Icon(Icons.read_more_rounded)))
],
),
),

View file

@ -58,7 +58,7 @@ class _SeasonDetailScreenState extends ConsumerState<SeasonDetailScreen> {
crossAxisAlignment: WrapCrossAlignment.center,
children: [
ConstrainedBox(
constraints: BoxConstraints(
constraints: const BoxConstraints(
maxWidth: 600,
),
child: Column(
@ -86,7 +86,7 @@ class _SeasonDetailScreenState extends ConsumerState<SeasonDetailScreen> {
),
),
ConstrainedBox(
constraints: BoxConstraints(maxWidth: 300),
constraints: const BoxConstraints(maxWidth: 300),
child: Card(child: FladderImage(image: details.getPosters?.primary))),
],
).padding(padding),
@ -122,7 +122,7 @@ class _SeasonDetailScreenState extends ConsumerState<SeasonDetailScreen> {
Card(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(200)),
child: SegmentedButton(
style: ButtonStyle(
style: const ButtonStyle(
elevation: WidgetStatePropertyAll(5),
side: WidgetStatePropertyAll(BorderSide.none),
),

View file

@ -41,7 +41,7 @@ class FavouritesScreen extends ConsumerWidget {
else
const DefaultSliverTopBadding(),
if (AdaptiveLayout.of(context).isDesktop)
SliverToBoxAdapter(
const SliverToBoxAdapter(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [

View file

@ -142,7 +142,7 @@ class _LibrarySearchScreenState extends ConsumerState<LibrarySearchScreen> {
floatingActionButtonLocation:
playerState == VideoPlayerState.minimized ? FloatingActionButtonLocation.centerFloat : null,
floatingActionButton: switch (playerState) {
VideoPlayerState.minimized => Padding(
VideoPlayerState.minimized => const Padding(
padding: EdgeInsets.symmetric(horizontal: 8),
child: FloatingPlayerBar(),
),
@ -171,7 +171,7 @@ class _LibrarySearchScreenState extends ConsumerState<LibrarySearchScreen> {
label: Text(context.localized.viewPhotos),
icon: const Icon(IconsaxBold.gallery),
)
].addInBetween(SizedBox(height: 10)),
].addInBetween(const SizedBox(height: 10)),
),
),
},
@ -251,12 +251,12 @@ class _LibrarySearchScreenState extends ConsumerState<LibrarySearchScreen> {
[];
final itemCountWidget = ItemActionButton(
label: Text(context.localized.itemCount(librarySearchResults.totalItemCount)),
icon: Icon(IconsaxBold.document_1),
icon: const Icon(IconsaxBold.document_1),
);
final refreshAction = ItemActionButton(
label: Text(context.localized.forceRefresh),
action: () => refreshKey.currentState?.show(),
icon: Icon(IconsaxOutline.refresh),
icon: const Icon(IconsaxOutline.refresh),
);
final itemViewAction = ItemActionButton(
label: Text(context.localized.selectViewType),
@ -279,7 +279,7 @@ class _LibrarySearchScreenState extends ConsumerState<LibrarySearchScreen> {
.map(
(e) => FilledButton.tonal(
style: FilledButtonTheme.of(context).style?.copyWith(
padding: WidgetStatePropertyAll(
padding: const WidgetStatePropertyAll(
EdgeInsets.symmetric(
horizontal: 12, vertical: 24)),
backgroundColor: WidgetStateProperty.resolveWith(
@ -373,7 +373,7 @@ class _LibrarySearchScreenState extends ConsumerState<LibrarySearchScreen> {
}),
if (AdaptiveLayout.of(context).layout == LayoutState.phone) ...[
const SizedBox(width: 6),
SizedBox.square(dimension: 46, child: SettingsUserIcon()),
const SizedBox.square(dimension: 46, child: SettingsUserIcon()),
],
const SizedBox(width: 12)
],
@ -421,7 +421,7 @@ class _LibrarySearchScreenState extends ConsumerState<LibrarySearchScreen> {
),
),
),
Row(),
const Row(),
],
),
),
@ -429,7 +429,7 @@ class _LibrarySearchScreenState extends ConsumerState<LibrarySearchScreen> {
),
),
if (AdaptiveLayout.of(context).isDesktop)
SliverToBoxAdapter(
const SliverToBoxAdapter(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
@ -476,15 +476,15 @@ class _LibrarySearchScreenState extends ConsumerState<LibrarySearchScreen> {
borderRadius: BorderRadius.circular(16),
),
child: Padding(
padding: EdgeInsets.all(16),
padding: const EdgeInsets.all(16),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
CircularProgressIndicator.adaptive(),
const CircularProgressIndicator.adaptive(),
Text(context.localized.fetchingLibrary, style: Theme.of(context).textTheme.titleMedium),
IconButton(
onPressed: () => libraryProvider.cancelFetch(),
icon: Icon(IconsaxOutline.close_square),
icon: const Icon(IconsaxOutline.close_square),
)
].addInBetween(const SizedBox(width: 16)),
),
@ -598,7 +598,7 @@ class _LibrarySearchBottomBar extends ConsumerWidget {
if (context.mounted) context.refreshData();
},
label: Text(context.localized.addToCollection),
icon: Icon(
icon: const Icon(
IconsaxOutline.save_add,
size: 20,
),
@ -726,7 +726,7 @@ class _LibrarySearchBottomBar extends ConsumerWidget {
),
);
},
icon: Icon(IconsaxOutline.more))
icon: const Icon(IconsaxOutline.more))
},
],
),
@ -775,7 +775,7 @@ class _LibrarySearchBottomBar extends ConsumerWidget {
),
],
),
if (AdaptiveLayout.of(context).isDesktop) SizedBox(height: 8),
if (AdaptiveLayout.of(context).isDesktop) const SizedBox(height: 8),
],
),
);

View file

@ -81,7 +81,7 @@ class LibraryViews extends ConsumerWidget {
if (ref.watch(librarySearchProvider(key!).select((value) => value.nestedCurrentItem is BoxSetModel))) ...{
ItemActionButton(
label: Text(context.localized.removeFromCollection),
icon: Icon(IconsaxOutline.archive_slash),
icon: const Icon(IconsaxOutline.archive_slash),
action: () async {
await libraryProvider.removeFromCollection(items: [item]);
if (context.mounted) {
@ -93,7 +93,7 @@ class LibraryViews extends ConsumerWidget {
if (ref.watch(librarySearchProvider(key!).select((value) => value.nestedCurrentItem is PlaylistModel))) ...{
ItemActionButton(
label: Text(context.localized.removeFromPlaylist),
icon: Icon(IconsaxOutline.archive_minus),
icon: const Icon(IconsaxOutline.archive_minus),
action: () async {
await libraryProvider.removeFromPlaylist(items: [item]);
if (context.mounted) {

View file

@ -98,8 +98,8 @@ class _SearchBarState extends ConsumerState<SuggestionSearchBar> {
},
decoration: InputDecoration(
hintText: widget.title ?? "${context.localized.search}...",
prefixIcon: Icon(IconsaxOutline.search_normal),
contentPadding: EdgeInsets.only(top: 13),
prefixIcon: const Icon(IconsaxOutline.search_normal),
contentPadding: const EdgeInsets.only(top: 13),
suffixIcon: controller.text.isNotEmpty
? IconButton(
onPressed: () {

View file

@ -116,7 +116,7 @@ class _LockScreenState extends ConsumerState<LockScreen> with WidgetsBindingObse
size: 38,
),
ConstrainedBox(
constraints: BoxConstraints(
constraints: const BoxConstraints(
maxHeight: 400,
maxWidth: 400,
),

View file

@ -57,7 +57,7 @@ class LoginEditUser extends ConsumerWidget {
),
Row(
children: [
Icon(IconsaxBold.clock),
const Icon(IconsaxBold.clock),
const SizedBox(width: 8),
Column(
mainAxisAlignment: MainAxisAlignment.start,

View file

@ -79,13 +79,13 @@ class _LoginPageState extends ConsumerState<LoginScreen> {
children: [
if (!AdaptiveLayout.of(context).isDesktop)
FloatingActionButton(
key: Key("edit_button"),
child: Icon(IconsaxOutline.edit_2),
key: const Key("edit_button"),
child: const Icon(IconsaxOutline.edit_2),
onPressed: () => setState(() => editingUsers = !editingUsers),
),
FloatingActionButton(
key: Key("new_button"),
child: Icon(IconsaxOutline.add_square),
key: const Key("new_button"),
child: const Icon(IconsaxOutline.add_square),
onPressed: startAddingNewUser,
),
].addInBetween(const SizedBox(width: 16)),
@ -98,7 +98,7 @@ class _LoginPageState extends ConsumerState<LoginScreen> {
shrinkWrap: true,
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 32),
children: [
Center(
const Center(
child: FladderLogo(),
),
AnimatedFadeSize(
@ -369,7 +369,7 @@ class _LoginPageState extends ConsumerState<LoginScreen> {
children: [
Text(context.localized.login),
const SizedBox(width: 8),
Icon(IconsaxBold.send_1),
const Icon(IconsaxBold.send_1),
],
),
),

View file

@ -88,16 +88,16 @@ class LoginUserGrid extends ConsumerWidget {
],
),
)
].addInBetween(SizedBox(width: 4, height: 4)),
].addInBetween(const SizedBox(width: 4, height: 4)),
),
if (editMode)
Align(
alignment: Alignment.topRight,
child: Card(
color: Theme.of(context).colorScheme.errorContainer,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: const Icon(
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
IconsaxBold.edit_2,
size: 14,
),

View file

@ -41,7 +41,7 @@ class DiscoverServersWidget extends ConsumerWidget {
style: context.textTheme.bodyLarge,
),
const Spacer(),
Opacity(opacity: 0.65, child: Icon(IconsaxOutline.bookmark, size: 16)),
const Opacity(opacity: 0.65, child: Icon(IconsaxOutline.bookmark, size: 16)),
],
),
const SizedBox(height: 4),
@ -63,7 +63,7 @@ class DiscoverServersWidget extends ConsumerWidget {
style: context.textTheme.bodyLarge,
),
const Spacer(),
Opacity(opacity: 0.65, child: Icon(IconsaxBold.airdrop, size: 16)),
const Opacity(opacity: 0.65, child: Icon(IconsaxBold.airdrop, size: 16)),
],
),
const SizedBox(height: 4),
@ -92,7 +92,7 @@ class DiscoverServersWidget extends ConsumerWidget {
));
},
error: (error, stackTrace) => Text(context.localized.error),
loading: () => Center(
loading: () => const Center(
child: SizedBox.square(
dimension: 24.0,
child: CircularProgressIndicator.adaptive(strokeCap: StrokeCap.round),
@ -151,7 +151,7 @@ class _ServerInfoCard extends StatelessWidget {
],
),
),
Icon(IconsaxOutline.edit_2, size: 16)
const Icon(IconsaxOutline.edit_2, size: 16)
].addInBetween(const SizedBox(width: 12)),
),
),

View file

@ -82,7 +82,7 @@ class LoginIcon extends ConsumerWidget {
],
),
)
].addInBetween(SizedBox(width: 8, height: 8)),
].addInBetween(const SizedBox(width: 8, height: 8)),
),
),
FlatButton(

View file

@ -28,7 +28,7 @@ Future<ItemBaseModel?> showEditItemPopup(
);
return AdaptiveLayout.of(context).inputDevice == InputDevice.pointer
? Dialog(
insetPadding: EdgeInsets.all(64),
insetPadding: const EdgeInsets.all(64),
child: editWidget(),
)
: Dialog.fullscreen(
@ -75,11 +75,11 @@ class _EditDialogSwitcherState extends ConsumerState<EditDialogSwitcher> with Ti
final advancedFields = ref.watch(editItemProvider.notifier).advancedFields ?? {};
Map<Tab, Widget> widgets = {
Tab(text: "General"): EditFields(fields: generalFields, json: state),
Tab(text: "Primary"): EditImageContent(type: ImageType.primary),
Tab(text: "Logo"): EditImageContent(type: ImageType.logo),
Tab(text: "Backdrops"): EditImageContent(type: ImageType.backdrop),
Tab(text: "Advanced"): EditFields(fields: advancedFields, json: state),
const Tab(text: "General"): EditFields(fields: generalFields, json: state),
const Tab(text: "Primary"): const EditImageContent(type: ImageType.primary),
const Tab(text: "Logo"): const EditImageContent(type: ImageType.logo),
const Tab(text: "Backdrops"): const EditImageContent(type: ImageType.backdrop),
const Tab(text: "Advanced"): EditFields(fields: advancedFields, json: state),
};
return Card(
@ -103,7 +103,7 @@ class _EditDialogSwitcherState extends ConsumerState<EditDialogSwitcher> with Ti
style: Theme.of(context).textTheme.titleLarge,
),
),
IconButton(onPressed: () => refreshEditor(), icon: Icon(IconsaxOutline.refresh))
IconButton(onPressed: () => refreshEditor(), icon: const Icon(IconsaxOutline.refresh))
],
),
),

View file

@ -46,7 +46,7 @@ class _EditGeneralState extends ConsumerState<EditFields> {
children: [
Flexible(
child: ListView(
padding: EdgeInsets.symmetric(horizontal: 16),
padding: const EdgeInsets.symmetric(horizontal: 16),
shrinkWrap: true,
children: [
if (widget.json != null)
@ -64,7 +64,7 @@ class _EditGeneralState extends ConsumerState<EditFields> {
current: map.entries.firstWhereOrNull((element) => element.value == true)?.key ?? "",
itemBuilder: (context) => [
PopupMenuItem(
child: Text(""),
child: const Text(""),
onTap: () => ref.read(editItemProvider.notifier).updateField(MapEntry(e.key, "")),
),
...map.entries.map(
@ -119,7 +119,7 @@ class _EditGeneralState extends ConsumerState<EditFields> {
onPressed: () => ref.read(editItemProvider.notifier).updateField(
MapEntry(e.key, list..remove(genre)),
),
icon: Icon(Icons.remove_rounded))
icon: const Icon(Icons.remove_rounded))
],
),
),
@ -217,7 +217,7 @@ class _EditGeneralState extends ConsumerState<EditFields> {
ref.read(editItemProvider.notifier).updateField(
MapEntry(e.key, listToMap(list..remove(person))));
},
icon: Icon(Icons.remove_rounded))
icon: const Icon(Icons.remove_rounded))
],
),
),
@ -272,7 +272,7 @@ class _EditGeneralState extends ConsumerState<EditFields> {
personRole.text = "";
});
},
icon: Icon(Icons.add_rounded),
icon: const Icon(Icons.add_rounded),
)
],
),
@ -326,7 +326,7 @@ class _EditGeneralState extends ConsumerState<EditFields> {
message: "Open in browser",
child: IconButton(
onPressed: () => launchUrl(context, externalUrl.url),
icon: Icon(Icons.open_in_browser_rounded)),
icon: const Icon(Icons.open_in_browser_rounded)),
),
IconButton(
onPressed: () {
@ -338,7 +338,7 @@ class _EditGeneralState extends ConsumerState<EditFields> {
.toList()),
);
},
icon: Icon(Icons.remove_rounded))
icon: const Icon(Icons.remove_rounded))
],
),
),
@ -371,7 +371,7 @@ class _EditGeneralState extends ConsumerState<EditFields> {
.toList()),
);
},
icon: Icon(Icons.add_rounded),
icon: const Icon(Icons.add_rounded),
)
],
),
@ -429,7 +429,7 @@ class _EditGeneralState extends ConsumerState<EditFields> {
const Spacer(),
IconButton(
onPressed: () => setMapping(list..remove(studio)),
icon: Icon(Icons.remove_rounded))
icon: const Icon(Icons.remove_rounded))
],
),
),
@ -557,7 +557,7 @@ class _EditGeneralState extends ConsumerState<EditFields> {
.read(editItemProvider.notifier)
.updateField(MapEntry(e.key, newDate.toIso8601String()));
},
icon: Icon(IconsaxOutline.calendar_2))
icon: const Icon(IconsaxOutline.calendar_2))
],
),
DisplayOrder _ => Builder(builder: (context) {
@ -580,8 +580,8 @@ class _EditGeneralState extends ConsumerState<EditFields> {
.toList(),
),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 12),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 12),
child: Text("Order episodes by air date, DVD order, or absolute numbering."),
)
],
@ -656,7 +656,7 @@ class _EditGeneralState extends ConsumerState<EditFields> {
children: [
Text(keyLabel, style: Theme.of(context).textTheme.titleLarge),
const SizedBox(height: 6),
Text(
const Text(
"Uncheck a field to lock it and prevent its data from being changed.",
),
const SizedBox(height: 6),
@ -722,8 +722,8 @@ class _EditGeneralState extends ConsumerState<EditFields> {
},
)
else
Padding(
padding: const EdgeInsets.all(8.0),
const Padding(
padding: EdgeInsets.all(8.0),
child: Center(
child: CircularProgressIndicator.adaptive(strokeCap: StrokeCap.round),
),

View file

@ -105,7 +105,7 @@ class _EditImageContentState extends ConsumerState<EditImageContent> {
Align(
alignment: Alignment.bottomRight,
child: Transform.translate(
offset: Offset(2, 2),
offset: const Offset(2, 2),
child: IconButton.filledTonal(
style: FilledButton.styleFrom(
backgroundColor: Theme.of(context).colorScheme.error,
@ -115,10 +115,10 @@ class _EditImageContentState extends ConsumerState<EditImageContent> {
await showDialog(
context: context,
builder: (context) => AlertDialog.adaptive(
title: Text("Delete image"),
content: Text("Deleting is permanent are you sure?"),
title: const Text("Delete image"),
content: const Text("Deleting is permanent are you sure?"),
actions: [
ElevatedButton(onPressed: () => Navigator.of(context).pop(), child: Text("Cancel")),
ElevatedButton(onPressed: () => Navigator.of(context).pop(), child: const Text("Cancel")),
FilledButton(
style: FilledButton.styleFrom(
backgroundColor: Theme.of(context).colorScheme.error,
@ -128,7 +128,7 @@ class _EditImageContentState extends ConsumerState<EditImageContent> {
await ref.read(editItemProvider.notifier).deleteImage(widget.type, image);
Navigator.of(context).pop();
},
child: Text(
child: const Text(
"Delete",
),
)
@ -136,7 +136,7 @@ class _EditImageContentState extends ConsumerState<EditImageContent> {
),
);
},
icon: Icon(Icons.delete_rounded),
icon: const Icon(Icons.delete_rounded),
),
),
)
@ -208,7 +208,7 @@ class _EditImageContentState extends ConsumerState<EditImageContent> {
),
),
SettingsListTile(
label: Text("Include all languages"),
label: const Text("Include all languages"),
trailing: Switch.adaptive(
value: includeAllImages,
onChanged: (value) {
@ -231,7 +231,7 @@ class _EditImageContentState extends ConsumerState<EditImageContent> {
),
children: [...serverImageCards, ...imageCards],
),
if (loading) Center(child: CircularProgressIndicator.adaptive(strokeCap: StrokeCap.round)),
if (loading) const Center(child: CircularProgressIndicator.adaptive(strokeCap: StrokeCap.round)),
if (!loading && [...serverImageCards, ...imageCards].isEmpty)
Center(child: Text("No ${widget.type.value}s found"))
],

View file

@ -72,7 +72,7 @@ class _IdentifyScreenState extends ConsumerState<IdentifyScreen> with TickerProv
const Spacer(),
IconButton(
onPressed: () async => await ref.read(provider.notifier).fetchInformation(),
icon: Icon(IconsaxOutline.refresh)),
icon: const Icon(IconsaxOutline.refresh)),
],
),
),
@ -106,7 +106,7 @@ class _IdentifyScreenState extends ConsumerState<IdentifyScreen> with TickerProv
if (posters.isEmpty)
Center(
child: processing
? CircularProgressIndicator.adaptive(strokeCap: StrokeCap.round)
? const CircularProgressIndicator.adaptive(strokeCap: StrokeCap.round)
: Text(context.localized.noResults),
)
else
@ -181,7 +181,7 @@ class _IdentifyScreenState extends ConsumerState<IdentifyScreen> with TickerProv
launchUrl(context, url ?? "");
},
icon: Icon(Icons.launch_rounded)),
icon: const Icon(Icons.launch_rounded)),
),
Tooltip(
message: "Select result",
@ -202,7 +202,7 @@ class _IdentifyScreenState extends ConsumerState<IdentifyScreen> with TickerProv
Navigator.of(context).pop();
}
: null,
icon: Icon(Icons.save_alt_rounded),
icon: const Icon(Icons.save_alt_rounded),
),
)
],

View file

@ -125,7 +125,7 @@ class ItemInfoScreenState extends ConsumerState<ItemInfoScreen> {
style: Theme.of(context).textTheme.titleLarge,
),
),
Opacity(opacity: 0.3, child: const Divider()),
const Opacity(opacity: 0.3, child: Divider()),
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(

View file

@ -214,13 +214,13 @@ class _PhotoViewerControllsState extends ConsumerState<PhotoViewerControls> with
?.copyWith(fontWeight: FontWeight.bold),
),
if (widget.loadingMoreItems)
SizedBox.square(
const SizedBox.square(
dimension: 16,
child: CircularProgressIndicator.adaptive(
strokeCap: StrokeCap.round,
),
),
].addInBetween(SizedBox(width: 6)),
].addInBetween(const SizedBox(width: 6)),
),
),
Positioned.fill(
@ -301,7 +301,7 @@ class _PhotoViewerControllsState extends ConsumerState<PhotoViewerControls> with
onPressed: widget.openOptions,
icon: IconsaxOutline.more_2,
),
Spacer(),
const Spacer(),
ElevatedIconButton(
onPressed: markAsFavourite,
color: widget.photo.userData.isFavourite ? Colors.red : null,

View file

@ -150,7 +150,7 @@ class _PhotoViewerScreenState extends ConsumerState<PhotoViewerScreen> with Widg
onExit: (event) => setState(() => _showOverlay(show: false)),
child: Scaffold(
appBar: photos.isEmpty
? FladderAppbar(
? const FladderAppbar(
automaticallyImplyLeading: true,
)
: null,
@ -242,7 +242,7 @@ class _PhotoViewerScreenState extends ConsumerState<PhotoViewerScreen> with Widg
),
),
switch (state.extendedImageLoadState) {
LoadState.loading => Center(
LoadState.loading => const Center(
child: CircularProgressIndicator.adaptive(strokeCap: StrokeCap.round),
),
LoadState.completed => switch (photo.internalType) {
@ -256,7 +256,7 @@ class _PhotoViewerScreenState extends ConsumerState<PhotoViewerScreen> with Widg
LoadState.failed || _ => Align(
alignment: Alignment.topRight,
child: Padding(
padding: EdgeInsets.all(24).copyWith(top: topPadding + 85),
padding: const EdgeInsets.all(24).copyWith(top: topPadding + 85),
child: Card(
child: Padding(
padding: const EdgeInsets.all(24),
@ -426,7 +426,7 @@ class _PhotoViewerScreenState extends ConsumerState<PhotoViewerScreen> with Widg
controller: scrollController,
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 12),
padding: const EdgeInsets.symmetric(horizontal: 12),
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Consumer(builder: (context, ref, child) {
@ -474,7 +474,7 @@ class _PhotoViewerScreenState extends ConsumerState<PhotoViewerScreen> with Widg
}),
),
),
Divider(),
const Divider(),
...currentPhoto
.generateActions(
context,

View file

@ -109,7 +109,7 @@ class _ClientSettingsPageState extends ConsumerState<ClientSettingsPage> {
],
),
),
icon: Icon(IconsaxOutline.folder_minus),
icon: const Icon(IconsaxOutline.folder_minus),
)
: null,
),

View file

@ -10,7 +10,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
Future<void> openQuickConnectDialog(
BuildContext context,
) async {
return showDialog(context: context, builder: (context) => QuickConnectDialog());
return showDialog(context: context, builder: (context) => const QuickConnectDialog());
}
class QuickConnectDialog extends ConsumerStatefulWidget {
@ -90,7 +90,7 @@ class _QuickConnectDialogState extends ConsumerState<QuickConnectDialog> {
success = context.localized.loggedIn;
},
);
await Future.delayed(Duration(seconds: 2));
await Future.delayed(const Duration(seconds: 2));
Navigator.of(context).pop();
} else {
if (controller.text.isEmpty) {
@ -106,7 +106,7 @@ class _QuickConnectDialogState extends ConsumerState<QuickConnectDialog> {
controller.text = "";
},
child: loading
? SizedBox.square(
? const SizedBox.square(
child: CircularProgressIndicator(),
dimension: 16.0,
)

View file

@ -92,7 +92,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
},
icon: Padding(
padding: EdgeInsets.all(AdaptiveLayout.of(context).inputDevice == InputDevice.pointer ? 0 : 4),
child: Icon(IconsaxOutline.arrow_left_2),
child: const Icon(IconsaxOutline.arrow_left_2),
),
),
),
@ -126,7 +126,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
),
SettingsListTile(
label: Text(context.localized.about),
subLabel: Text("Fladder"),
subLabel: const Text("Fladder"),
suffix: Opacity(
opacity: 1,
child: FladderIconOutlined(
@ -135,7 +135,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
)),
onTap: () => showAboutDialog(
context: context,
applicationIcon: FladderIcon(size: 85),
applicationIcon: const FladderIcon(size: 85),
applicationVersion: ref.watch(applicationInfoProvider).versionAndPlatform,
applicationLegalese: "Donut Factory",
),

View file

@ -7,7 +7,7 @@ import 'package:fladder/util/list_padding.dart';
import 'package:fladder/util/localization_helper.dart';
import 'package:flutter/material.dart';
showAuthOptionsDialogue(
void showAuthOptionsDialogue(
BuildContext context,
AccountModel currentUser,
Function(AccountModel) setMethod,

View file

@ -225,7 +225,7 @@ class _CategoryChipEditorState<T> extends State<CategoryChipEditor<T>> {
onChanged: (value) => updateKey(MapEntry(element.key, value == null ? null : element.value)),
);
}),
Divider(),
const Divider(),
},
...otherItems.mapIndexed((index, element) {
return CheckboxListTile.adaptive(

View file

@ -87,7 +87,7 @@ class _DefaultTitleBarState extends ConsumerState<DefaultTitleBar> with WindowLi
}
},
icon: Transform.translate(
offset: Offset(0, -2),
offset: const Offset(0, -2),
child: Icon(
Icons.minimize_rounded,
color: iconColor,
@ -126,7 +126,7 @@ class _DefaultTitleBarState extends ConsumerState<DefaultTitleBar> with WindowLi
}
},
icon: Transform.translate(
offset: Offset(0, 0),
offset: const Offset(0, 0),
child: Icon(
maximized ? Icons.maximize_rounded : Icons.crop_square_rounded,
color: iconColor,
@ -148,7 +148,7 @@ class _DefaultTitleBarState extends ConsumerState<DefaultTitleBar> with WindowLi
windowManager.close();
},
icon: Transform.translate(
offset: Offset(0, -2),
offset: const Offset(0, -2),
child: Icon(
Icons.close_rounded,
color: iconColor,

View file

@ -72,7 +72,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
),
//Small offset to match detailscaffold
child: Transform.translate(
offset: Offset(0, -5), child: FladderImage(image: widget.item?.getPosters?.primary)),
offset: const Offset(0, -5), child: FladderImage(image: widget.item?.getPosters?.primary)),
),
),
AnimatedFadeSize(
@ -140,8 +140,8 @@ class _DetailScaffoldState extends ConsumerState<DetailScaffold> {
child: Scaffold(
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
floatingActionButton: switch (playerState) {
VideoPlayerState.minimized => Padding(
padding: const EdgeInsets.all(8.0),
VideoPlayerState.minimized => const Padding(
padding: EdgeInsets.all(8.0),
child: FloatingPlayerBar(),
),
_ => null,
@ -204,11 +204,11 @@ class _DetailScaffoldState extends ConsumerState<DetailScaffold> {
IconTheme(
data: IconThemeData(color: Theme.of(context).colorScheme.onSurface),
child: Transform.translate(
offset: Offset(0, kToolbarHeight),
offset: const Offset(0, kToolbarHeight),
child: Row(
children: [
Padding(
padding: EdgeInsets.only(left: 16),
padding: const EdgeInsets.only(left: 16),
child: IconButton.filledTonal(
style: IconButton.styleFrom(
backgroundColor: backGroundColor,
@ -223,7 +223,7 @@ class _DetailScaffoldState extends ConsumerState<DetailScaffold> {
icon: Padding(
padding:
EdgeInsets.all(AdaptiveLayout.of(context).inputDevice == InputDevice.pointer ? 0 : 4),
child: Icon(IconsaxOutline.arrow_left_2),
child: const Icon(IconsaxOutline.arrow_left_2),
),
),
),
@ -273,17 +273,17 @@ class _DetailScaffoldState extends ConsumerState<DetailScaffold> {
message: context.localized.refresh,
child: IconButton(
onPressed: () => context.refreshData(),
icon: Icon(IconsaxOutline.refresh),
icon: const Icon(IconsaxOutline.refresh),
),
),
)
else
SizedBox(height: 30, width: 30, child: SettingsUserIcon()),
const SizedBox(height: 30, width: 30, child: SettingsUserIcon()),
Tooltip(
message: context.localized.home,
child: IconButton(
onPressed: () => context.routeGo(DashboardRoute()),
icon: Icon(IconsaxOutline.home),
icon: const Icon(IconsaxOutline.home),
),
),
],

View file

@ -94,7 +94,7 @@ class _FilePickerBarState extends ConsumerState<FilePickerBar> {
},
onDragExited: (details) => setState(() => dragStart = false),
child: Container(
constraints: BoxConstraints(minHeight: 50, minWidth: 50),
constraints: const BoxConstraints(minHeight: 50, minWidth: 50),
decoration: BoxDecoration(
color: Colors.grey,
gradient: LinearGradient(
@ -106,7 +106,7 @@ class _FilePickerBarState extends ConsumerState<FilePickerBar> {
),
),
child: AnimatedSwitcher(
duration: Duration(milliseconds: 250),
duration: const Duration(milliseconds: 250),
child: inputField
? OutlinedTextField(
controller: controller,

View file

@ -20,7 +20,7 @@ void fladderSnackbar(
clipBehavior: Clip.none,
showCloseIcon: showCloseButton,
duration: duration,
padding: EdgeInsets.all(18),
padding: const EdgeInsets.all(18),
action: action,
));
}

View file

@ -32,7 +32,7 @@ class IntInputField extends ConsumerWidget {
onSubmitted: (value) => onSubmitted?.call(int.tryParse(value)),
textAlign: TextAlign.center,
decoration: InputDecoration(
contentPadding: EdgeInsets.all(0),
contentPadding: const EdgeInsets.all(0),
hintText: placeHolder,
suffixText: suffix,
border: InputBorder.none,

View file

@ -36,7 +36,7 @@ class _CarouselBannerState extends ConsumerState<CarouselBanner> {
double dragIntensity = 1;
double slidePosition = 1;
late final RestartableTimer timer = RestartableTimer(Duration(seconds: 8), () => nextSlide());
late final RestartableTimer timer = RestartableTimer(const Duration(seconds: 8), () => nextSlide());
@override
void initState() {
@ -121,7 +121,7 @@ class _CarouselBannerState extends ConsumerState<CarouselBanner> {
fit: StackFit.expand,
children: [
Dismissible(
key: Key("Dismissable"),
key: const Key("Dismissable"),
direction: DismissDirection.horizontal,
onUpdate: (details) {
setState(() {
@ -137,10 +137,10 @@ class _CarouselBannerState extends ConsumerState<CarouselBanner> {
return false;
},
child: AnimatedOpacity(
duration: Duration(milliseconds: 125),
duration: const Duration(milliseconds: 125),
opacity: dragOpacity.abs(),
child: AnimatedSwitcher(
duration: Duration(milliseconds: 125),
duration: const Duration(milliseconds: 125),
child: Container(
key: Key(currentItem.id),
clipBehavior: Clip.hardEdge,
@ -228,7 +228,7 @@ class _CarouselBannerState extends ConsumerState<CarouselBanner> {
),
),
),
].addInBetween(SizedBox(height: 6)),
].addInBetween(const SizedBox(height: 6)),
),
),
),
@ -248,7 +248,7 @@ class _CarouselBannerState extends ConsumerState<CarouselBanner> {
),
],
),
].addInBetween(SizedBox(height: 16)),
].addInBetween(const SizedBox(height: 16)),
),
),
),
@ -256,13 +256,13 @@ class _CarouselBannerState extends ConsumerState<CarouselBanner> {
padding: const EdgeInsets.symmetric(horizontal: 12),
child: AnimatedOpacity(
opacity: showControls ? 1 : 0,
duration: Duration(milliseconds: 250),
duration: const Duration(milliseconds: 250),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
IconButton.filledTonal(
onPressed: () => nextSlide(),
icon: Icon(IconsaxOutline.arrow_right_3),
icon: const Icon(IconsaxOutline.arrow_right_3),
)
],
),
@ -335,7 +335,7 @@ class _CarouselBannerState extends ConsumerState<CarouselBanner> {
width: 28,
height: 28,
child: AnimatedContainer(
duration: Duration(milliseconds: 125),
duration: const Duration(milliseconds: 125),
width: currentItem == e ? 22 : 6,
height: currentItem == e ? 10 : 6,
decoration: BoxDecoration(

View file

@ -89,7 +89,7 @@ class _PosterImageState extends ConsumerState<PosterImage> {
@override
Widget build(BuildContext context) {
final poster = widget.poster;
final padding = EdgeInsets.all(5);
final padding = const EdgeInsets.all(5);
return Hero(
tag: currentTag,
child: MouseRegion(
@ -169,7 +169,7 @@ class _PosterImageState extends ConsumerState<PosterImage> {
mainAxisSize: MainAxisSize.min,
children: [
if (widget.poster.userData.isFavourite)
Row(
const Row(
children: [
StatusCard(
color: Colors.red,
@ -327,7 +327,7 @@ class _PosterImageState extends ConsumerState<PosterImage> {
child: Padding(
padding: const EdgeInsets.all(10),
child: Container(
decoration: BoxDecoration(
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: Colors.amber,
),
@ -347,8 +347,8 @@ class _PosterImageState extends ConsumerState<PosterImage> {
.textTheme
.labelLarge
?.copyWith(fontSize: 20, fontWeight: FontWeight.bold, shadows: [
BoxShadow(blurRadius: 8, spreadRadius: 16),
BoxShadow(blurRadius: 2, spreadRadius: 16),
const BoxShadow(blurRadius: 8, spreadRadius: 16),
const BoxShadow(blurRadius: 2, spreadRadius: 16),
]),
),
),

View file

@ -39,7 +39,7 @@ class EpisodeDetailsList extends ConsumerWidget {
ref.watch(clientSettingsProvider.select((value) => value.posterSize)));
final decimals = size - size.toInt();
return AnimatedSwitcher(
duration: Duration(milliseconds: 250),
duration: const Duration(milliseconds: 250),
child: switch (viewType) {
EpisodeDetailsViewType.list => ListView.builder(
shrinkWrap: true,

View file

@ -59,7 +59,7 @@ class _EpisodePosterState extends ConsumerState<EpisodePosters> {
label: widget.label,
titleActions: [
if (episodesBySeason.isNotEmpty && episodesBySeason.length > 1) ...{
SizedBox(width: 12),
const SizedBox(width: 12),
EnumBox(
current: selectedSeason != null ? "${context.localized.season(1)} $selectedSeason" : context.localized.all,
itemBuilder: (context) => [
@ -210,7 +210,7 @@ class EpisodePoster extends ConsumerWidget {
);
}),
if (episode.userData.isFavourite)
StatusCard(
const StatusCard(
color: Colors.red,
child: Icon(
Icons.favorite_rounded,
@ -219,7 +219,7 @@ class EpisodePoster extends ConsumerWidget {
if (episode.userData.played)
StatusCard(
color: Theme.of(context).colorScheme.primary,
child: Icon(
child: const Icon(
Icons.check_rounded,
),
),

View file

@ -54,7 +54,7 @@ class PosterListItem extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
return Padding(
padding: EdgeInsets.symmetric(vertical: 2),
padding: const EdgeInsets.symmetric(vertical: 2),
child: Card(
color: Theme.of(context).colorScheme.surface,
child: SizedBox(
@ -151,7 +151,7 @@ class PosterListItem extends ConsumerWidget {
children: [
if (subTitle != null) ...[
subTitle!,
Spacer(),
const Spacer(),
],
if (poster.subText != null && poster.subText != poster.name)
ClickableText(
@ -180,7 +180,7 @@ class PosterListItem extends ConsumerWidget {
),
),
if (poster.userData.isFavourite)
Icon(
const Icon(
IconsaxBold.heart,
color: Colors.red,
),
@ -206,7 +206,7 @@ class PosterListItem extends ConsumerWidget {
.popupMenuItems(useIcons: true),
),
)
].addInBetween(SizedBox(width: 8)),
].addInBetween(const SizedBox(width: 8)),
),
),
),

View file

@ -85,7 +85,7 @@ class PosterWidget extends ConsumerWidget {
opacity: opacity,
child: subTitle!,
),
Spacer()
const Spacer()
],
if (poster.subText?.isNotEmpty ?? false)
Flexible(

View file

@ -55,7 +55,7 @@ class SeasonPoster extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
placeHolder(String title) {
Padding placeHolder(String title) {
return Padding(
padding: const EdgeInsets.all(4),
child: Container(
@ -104,7 +104,7 @@ class SeasonPoster extends ConsumerWidget {
child: Center(
child: Text(
season.userData.unPlayedItemCount.toString(),
style: TextStyle(fontWeight: FontWeight.w700, fontSize: 14),
style: const TextStyle(fontWeight: FontWeight.w700, fontSize: 14),
),
),
),
@ -114,7 +114,7 @@ class SeasonPoster extends ConsumerWidget {
alignment: Alignment.topRight,
child: StatusCard(
color: Theme.of(context).colorScheme.primary,
child: Icon(
child: const Icon(
Icons.check_rounded,
),
),

View file

@ -20,8 +20,8 @@ class NestedScaffold extends ConsumerWidget {
floatingActionButton: switch (AdaptiveLayout.layoutOf(context)) {
LayoutState.phone => null,
_ => switch (playerState) {
VideoPlayerState.minimized => Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
VideoPlayerState.minimized => const Padding(
padding: EdgeInsets.symmetric(horizontal: 8),
child: FloatingPlayerBar(),
),
_ => null,

View file

@ -35,7 +35,7 @@ class NestedSliverAppBar extends ConsumerWidget {
backgroundColor: WidgetStatePropertyAll(Theme.of(context).colorScheme.surface),
),
onPressed: () => Scaffold.of(parent).openDrawer(),
icon: Icon(
icon: const Icon(
IconsaxBold.menu,
size: 28,
),
@ -59,10 +59,10 @@ class NestedSliverAppBar extends ConsumerWidget {
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(IconsaxOutline.search_normal),
const Icon(IconsaxOutline.search_normal),
const SizedBox(width: 16),
Transform.translate(
offset: Offset(0, 2.5), child: Text(searchTitle ?? "${context.localized.search}...")),
offset: const Offset(0, 2.5), child: Text(searchTitle ?? "${context.localized.search}...")),
],
),
),
@ -71,7 +71,7 @@ class NestedSliverAppBar extends ConsumerWidget {
),
),
),
SettingsUserIcon()
const SettingsUserIcon()
].addInBetween(const SizedBox(width: 16)),
),
),

View file

@ -84,7 +84,7 @@ class _OutlinedTextFieldState extends ConsumerState<OutlinedTextField> {
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 6),
child: AnimatedContainer(
duration: Duration(milliseconds: 250),
duration: const Duration(milliseconds: 250),
decoration: BoxDecoration(
color: widget.fillColor ?? getColor(),
borderRadius: FladderTheme.defaultShape.borderRadius,

View file

@ -44,11 +44,11 @@ class _SplashScreenState extends ConsumerState<SplashScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
return const Scaffold(
body: Center(
child: FractionallySizedBox(
heightFactor: 0.4,
child: const FladderLogo(),
child: FladderLogo(),
),
),
);

View file

@ -56,7 +56,7 @@ class _SyncButtonState extends ConsumerState<SyncButton> {
if ((progress?.progress ?? 0) > 0)
IgnorePointer(
child: SizedBox.fromSize(
size: Size.fromRadius(10),
size: const Size.fromRadius(10),
child: CircularProgressIndicator(
strokeCap: StrokeCap.round,
strokeWidth: 2,

View file

@ -76,12 +76,12 @@ class _SyncItemDetailsState extends ConsumerState<SyncItemDetails> {
),
IconButton(
onPressed: () => Navigator.pop(context),
icon: Icon(IconsaxBold.close_circle),
icon: const Icon(IconsaxBold.close_circle),
)
],
),
if (baseItem != null) ...{
Divider(),
const Divider(),
Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
child: Row(
@ -128,24 +128,24 @@ class _SyncItemDetailsState extends ConsumerState<SyncItemDetails> {
IconButton(
onPressed: () =>
ref.read(backgroundDownloaderProvider).pause(combinedStream!.task!),
icon: Icon(IconsaxBold.pause),
icon: const Icon(IconsaxBold.pause),
),
if (combinedStream?.status == TaskStatus.paused) ...[
IconButton(
onPressed: () =>
ref.read(backgroundDownloaderProvider).resume(combinedStream!.task!),
icon: Icon(IconsaxBold.play),
icon: const Icon(IconsaxBold.play),
),
IconButton(
onPressed: () => ref.read(syncProvider.notifier).deleteFullSyncFiles(syncedItem),
icon: Icon(IconsaxBold.stop),
icon: const Icon(IconsaxBold.stop),
),
],
const SizedBox(width: 16)
},
if (combinedStream != null && combinedStream.hasDownload)
SizedBox.fromSize(
size: Size.fromRadius(35),
size: const Size.fromRadius(35),
child: Stack(
fit: StackFit.expand,
alignment: Alignment.center,
@ -168,7 +168,7 @@ class _SyncItemDetailsState extends ConsumerState<SyncItemDetails> {
if (!hasFile && !downloadTask.hasDownload && syncedItem.hasVideoFile)
IconButtonAwait(
onPressed: () async => await ref.read(syncProvider.notifier).syncVideoFile(syncedItem, false),
icon: Icon(IconsaxOutline.cloud_change),
icon: const Icon(IconsaxOutline.cloud_change),
)
else if (hasFile)
IconButtonAwait(
@ -187,13 +187,13 @@ class _SyncItemDetailsState extends ConsumerState<SyncItemDetails> {
context.localized.cancel,
);
},
icon: Icon(IconsaxOutline.trash),
icon: const Icon(IconsaxOutline.trash),
),
].addInBetween(const SizedBox(width: 16)),
),
),
},
Divider(),
const Divider(),
if (syncChildren.isNotEmpty == true)
Flexible(
child: ListView(

View file

@ -38,8 +38,8 @@ class SyncListItemState extends ConsumerState<SyncListItem> {
child: Dismissible(
background: Container(
color: Theme.of(context).colorScheme.errorContainer,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Row(
children: [Icon(IconsaxBold.trash)],
),
@ -130,11 +130,11 @@ class SyncListItemState extends ConsumerState<SyncListItem> {
)),
IconButton(
onPressed: () => showSyncItemDetails(context, syncedItem, ref),
icon: Icon(IconsaxOutline.more_square),
icon: const Icon(IconsaxOutline.more_square),
),
],
),
].addInBetween(SizedBox(width: 16)),
].addInBetween(const SizedBox(width: 16)),
),
),
),

View file

@ -50,7 +50,7 @@ class SyncProgressBar extends ConsumerWidget {
final downloadProgress = task.progress;
final downloadTask = task.task;
if (!task.hasDownload) {
return SizedBox.shrink();
return const SizedBox.shrink();
}
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -73,20 +73,20 @@ class SyncProgressBar extends ConsumerWidget {
if (downloadStatus != TaskStatus.paused)
IconButton(
onPressed: () => ref.read(backgroundDownloaderProvider).pause(downloadTask),
icon: Icon(IconsaxBold.pause),
icon: const Icon(IconsaxBold.pause),
)
},
if (downloadStatus == TaskStatus.paused && downloadTask != null) ...[
IconButton(
onPressed: () => ref.read(backgroundDownloaderProvider).resume(downloadTask),
icon: Icon(IconsaxBold.play),
icon: const Icon(IconsaxBold.play),
),
IconButton(
onPressed: () => ref.read(syncProvider.notifier).deleteFullSyncFiles(item),
icon: Icon(IconsaxBold.stop),
icon: const Icon(IconsaxBold.stop),
)
],
].addInBetween(SizedBox(width: 8)),
].addInBetween(const SizedBox(width: 8)),
),
const SizedBox(width: 6),
],

View file

@ -48,7 +48,7 @@ class _SyncedScreenState extends ConsumerState<SyncedScreen> {
const DefaultSliverTopBadding(),
SliverToBoxAdapter(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16),
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text(
context.localized.syncedItems,
style: Theme.of(context).textTheme.titleLarge,
@ -56,7 +56,7 @@ class _SyncedScreenState extends ConsumerState<SyncedScreen> {
),
),
SliverPadding(
padding: EdgeInsets.symmetric(horizontal: 16),
padding: const EdgeInsets.symmetric(horizontal: 16),
sliver: SliverList.builder(
itemBuilder: (context, index) {
final item = items[index];
@ -78,7 +78,7 @@ class _SyncedScreenState extends ConsumerState<SyncedScreen> {
style: Theme.of(context).textTheme.titleMedium,
),
const SizedBox(width: 16),
Icon(
const Icon(
IconsaxOutline.cloud_cross,
)
],

View file

@ -29,9 +29,9 @@ class SyncMarkedForDelete extends ConsumerWidget {
strokeCap: StrokeCap.round,
valueColor: AlwaysStoppedAnimation(Theme.of(context).colorScheme.error),
),
Text("Deleting"),
Icon(IconsaxOutline.trash)
].addPadding(EdgeInsets.symmetric(horizontal: 16)),
const Text("Deleting"),
const Icon(IconsaxOutline.trash)
].addPadding(const EdgeInsets.symmetric(horizontal: 16)),
),
),
)

View file

@ -95,7 +95,7 @@ class _SyncedEpisodeItemState extends ConsumerState<SyncedEpisodeItem> {
if (!hasFile && !downloadTask.hasDownload)
IconButtonAwait(
onPressed: () async => await ref.read(syncProvider.notifier).syncVideoFile(syncedItem, false),
icon: Icon(IconsaxOutline.cloud_change),
icon: const Icon(IconsaxOutline.cloud_change),
)
else if (hasFile)
IconButtonAwait(
@ -114,7 +114,7 @@ class _SyncedEpisodeItemState extends ConsumerState<SyncedEpisodeItem> {
context.localized.cancel,
);
},
icon: Icon(IconsaxOutline.trash),
icon: const Icon(IconsaxOutline.trash),
)
].addInBetween(const SizedBox(width: 16)),
);

View file

@ -54,7 +54,7 @@ class _SyncedSeasonPosterState extends ConsumerState<SyncedSeasonPoster> {
)
],
),
Spacer(),
const Spacer(),
IconButton(
onPressed: () {
setState(() {
@ -63,16 +63,16 @@ class _SyncedSeasonPosterState extends ConsumerState<SyncedSeasonPoster> {
},
icon: Icon(!expanded ? Icons.keyboard_arrow_down_rounded : Icons.keyboard_arrow_up_rounded),
)
].addPadding(EdgeInsets.symmetric(horizontal: 6)),
].addPadding(const EdgeInsets.symmetric(horizontal: 6)),
),
AnimatedFadeSize(
duration: const Duration(milliseconds: 250),
child: expanded && children.isNotEmpty
? ListView(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
physics: const NeverScrollableScrollPhysics(),
children: <Widget>[
Divider(),
const Divider(),
...children.map(
(item) {
final baseItem = ref.read(syncProvider.notifier).getItem(item);
@ -85,7 +85,7 @@ class _SyncedSeasonPosterState extends ConsumerState<SyncedSeasonPoster> {
);
},
)
].addPadding(EdgeInsets.symmetric(vertical: 10)),
].addPadding(const EdgeInsets.symmetric(vertical: 10)),
)
: Container(),
)

View file

@ -8,7 +8,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
Future<void> showVideoPlaybackInformation(BuildContext context) {
return showDialog(
context: context,
builder: (context) => _VideoPlaybackInformation(),
builder: (context) => const _VideoPlaybackInformation(),
);
}
@ -28,11 +28,11 @@ class _VideoPlaybackInformation extends ConsumerWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Playback information", style: Theme.of(context).textTheme.titleMedium),
Divider(),
const Divider(),
...[
Row(
mainAxisSize: MainAxisSize.min,
children: [Text('type: '), Text(playbackModel.label ?? "")],
children: [const Text('type: '), Text(playbackModel.label ?? "")],
),
if (sessionInfo.transCodeInfo != null) ...[
const SizedBox(height: 6),
@ -40,34 +40,34 @@ class _VideoPlaybackInformation extends ConsumerWidget {
if (sessionInfo.transCodeInfo?.transcodeReasons?.isNotEmpty == true)
Row(
mainAxisSize: MainAxisSize.min,
children: [Text('reason: '), Text(sessionInfo.transCodeInfo?.transcodeReasons.toString() ?? "")],
children: [const Text('reason: '), Text(sessionInfo.transCodeInfo?.transcodeReasons.toString() ?? "")],
),
if (sessionInfo.transCodeInfo?.completionPercentage != null)
Row(
mainAxisSize: MainAxisSize.min,
children: [
Text('transcode progress: '),
const Text('transcode progress: '),
Text("${sessionInfo.transCodeInfo?.completionPercentage?.toStringAsFixed(2)} %")
],
),
if (sessionInfo.transCodeInfo?.container != null)
Row(
mainAxisSize: MainAxisSize.min,
children: [Text('container: '), Text(sessionInfo.transCodeInfo!.container.toString())],
children: [const Text('container: '), Text(sessionInfo.transCodeInfo!.container.toString())],
),
],
Row(
mainAxisSize: MainAxisSize.min,
children: [Text('resolution: '), Text(playbackModel?.item.streamModel?.resolutionText ?? "")],
children: [const Text('resolution: '), Text(playbackModel?.item.streamModel?.resolutionText ?? "")],
),
Row(
mainAxisSize: MainAxisSize.min,
children: [
Text('container: '),
const Text('container: '),
Text(playbackModel?.playbackInfo?.mediaSources?.firstOrNull?.container ?? "")
],
),
].addPadding(EdgeInsets.symmetric(vertical: 3))
].addPadding(const EdgeInsets.symmetric(vertical: 3))
],
),
),

View file

@ -5,7 +5,7 @@ import 'package:fladder/widgets/shared/horizontal_list.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
showPlayerChapterDialogue(
void showPlayerChapterDialogue(
BuildContext context, {
required List<Chapter> chapters,
required Function(Chapter chapter) onChapterTapped,

View file

@ -80,7 +80,7 @@ class _VideoOptionsMobileState extends ConsumerState<VideoOptions> {
],
),
const Spacer(),
Opacity(opacity: 0.1, child: Icon(Icons.info_outline_rounded))
const Opacity(opacity: 0.1, child: Icon(Icons.info_outline_rounded))
],
),
),
@ -93,7 +93,7 @@ class _VideoOptionsMobileState extends ConsumerState<VideoOptions> {
title: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Flexible(flex: 1, child: const Text("Screen Brightness")),
const Flexible(flex: 1, child: Text("Screen Brightness")),
Flexible(
child: Row(
children: [
@ -250,7 +250,7 @@ class _VideoOptionsMobileState extends ConsumerState<VideoOptions> {
Navigator.of(context).pop();
showInfoScreen(context, currentItem);
},
title: Text('Media info'),
title: const Text('Media info'),
),
}
],
@ -337,7 +337,7 @@ Future<void> showSubSelection(BuildContext context) {
final playbackModel = ref.watch(playBackModel);
final player = ref.watch(videoPlayerProvider);
return SimpleDialog(
contentPadding: EdgeInsets.only(top: 8, bottom: 24),
contentPadding: const EdgeInsets.only(top: 8, bottom: 24),
title: Row(
children: [
const Text("Subtitle"),
@ -388,7 +388,7 @@ Future<void> showAudioSelection(BuildContext context) {
final playbackModel = ref.watch(playBackModel);
final player = ref.watch(videoPlayerProvider);
return SimpleDialog(
contentPadding: EdgeInsets.only(top: 8, bottom: 24),
contentPadding: const EdgeInsets.only(top: 8, bottom: 24),
title: Row(
children: [
const Text("Subtitle"),

View file

@ -5,7 +5,7 @@ import 'package:fladder/widgets/navigation_scaffold/components/fladder_appbar.da
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
showFullScreenItemQueue(
void showFullScreenItemQueue(
BuildContext context, {
required List<ItemBaseModel> items,
ValueChanged<List<ItemBaseModel>>? onListChanged,

View file

@ -304,7 +304,7 @@ class _ChapterProgressSliderState extends ConsumerState<ChapterProgressSlider> {
AnimatedContainer(
duration: const Duration(milliseconds: 250),
child: ConstrainedBox(
constraints: BoxConstraints(maxHeight: 250),
constraints: const BoxConstraints(maxHeight: 250),
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(8)),
child: trickPlay == null || trickPlay.images.isEmpty
@ -313,7 +313,7 @@ class _ChapterProgressSliderState extends ConsumerState<ChapterProgressSlider> {
image: chapter.imageProvider,
fit: BoxFit.contain,
)
: SizedBox.shrink()
: const SizedBox.shrink()
: AspectRatio(
aspectRatio: trickPlay.width.toDouble() / trickPlay.height.toDouble(),
child: TrickplayImage(

View file

@ -108,15 +108,15 @@ class _VideoSubtitleControlsState extends ConsumerState<VideoSubtitleControls> {
multiSelectionEnabled: false,
segments: [
ButtonSegment(
label: Text(context.localized.light, style: TextStyle(fontWeight: FontWeight.w100)),
label: Text(context.localized.light, style: const TextStyle(fontWeight: FontWeight.w100)),
value: FontWeight.w100,
),
ButtonSegment(
label: Text(context.localized.normal, style: TextStyle(fontWeight: FontWeight.w500)),
label: Text(context.localized.normal, style: const TextStyle(fontWeight: FontWeight.w500)),
value: FontWeight.normal,
),
ButtonSegment(
label: Text(context.localized.bold, style: TextStyle(fontWeight: FontWeight.w900)),
label: Text(context.localized.bold, style: const TextStyle(fontWeight: FontWeight.w900)),
value: FontWeight.bold,
),
],

View file

@ -60,7 +60,7 @@ class _VideoVolumeSliderState extends ConsumerState<VideoVolumeSlider> {
textAlign: TextAlign.center,
),
),
].addInBetween(SizedBox(width: 6)),
].addInBetween(const SizedBox(width: 6)),
);
}
}

View file

@ -114,7 +114,7 @@ class _VideoPlayerState extends ConsumerState<VideoPlayer> with WidgetsBindingOb
);
}),
),
DesktopControls(),
const DesktopControls(),
if (errorPlaying) const _VideoErrorWidget(),
],
),

View file

@ -242,7 +242,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
.update((state) => state.copyWith(state: VideoPlayerState.minimized));
Navigator.of(context).pop();
},
icon: Icon(
icon: const Icon(
IconsaxOutline.arrow_down_1,
size: 24,
),
@ -256,7 +256,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
),
)
else
Flexible(child: Align(alignment: Alignment.topRight, child: DefaultTitleBar()))
const Flexible(child: Align(alignment: Alignment.topRight, child: DefaultTitleBar()))
],
),
),
@ -279,7 +279,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
child: Padding(
padding: EdgeInsets.only(bottom: bottomPadding)
.copyWith(bottom: 21)
.add(EdgeInsets.symmetric(vertical: 16))
.add(const EdgeInsets.symmetric(vertical: 16))
.add(EdgeInsets.symmetric(horizontal: AdaptiveLayout.of(context).isDesktop ? 32 : 0)),
child: Column(
children: [
@ -362,7 +362,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
children: [
Tooltip(
message: "Stop",
child: IconButton(onPressed: () => closePlayer(), icon: Icon(IconsaxOutline.stop))),
child: IconButton(onPressed: () => closePlayer(), icon: const Icon(IconsaxOutline.stop))),
const Spacer(),
if (AdaptiveLayout.of(context).isDesktop && ref.read(videoPlayerProvider).player != null) ...{
// OpenQueueButton(x),
@ -457,7 +457,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
),
),
}
].addPadding(EdgeInsets.symmetric(horizontal: 4)),
].addPadding(const EdgeInsets.symmetric(horizontal: 4)),
),
const SizedBox(height: 4),
SizedBox(
@ -558,9 +558,9 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
onPressed: () => seekForward(mediaPlaybackModel),
tooltip: "15",
iconSize: 40,
icon: Stack(
icon: const Stack(
children: [
const Icon(IconsaxOutline.forward_15_seconds),
Icon(IconsaxOutline.forward_15_seconds),
],
),
);