[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

@ -65,7 +65,7 @@ class ElevatedIconButtonLabel extends StatelessWidget {
return Tooltip(
message: label,
child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: 65),
constraints: const BoxConstraints(maxWidth: 65),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [

View file

@ -58,7 +58,7 @@ class EnumSelection<T> extends StatelessWidget {
final Text label;
final String current;
final List<PopupMenuEntry<T>> Function(BuildContext context) itemBuilder;
const EnumSelection({
const EnumSelection({super.key,
required this.label,
required this.current,
required this.itemBuilder,

View file

@ -30,7 +30,7 @@ class FladderScrollbar extends ConsumerWidget {
? Theme.of(context).colorScheme.secondary
: Theme.of(context).colorScheme.secondaryContainer.withOpacity(0.75),
),
duration: Duration(milliseconds: 250),
duration: const Duration(milliseconds: 250),
);
},
)

View file

@ -12,19 +12,19 @@ abstract class ItemAction {
}
class ItemActionDivider extends ItemAction {
Widget toWidget() => Divider();
Widget toWidget() => const Divider();
@override
Divider toMenuItemButton() => Divider();
Divider toMenuItemButton() => const Divider();
@override
PopupMenuEntry toPopupMenuItem({bool useIcons = false}) => PopupMenuDivider(height: 3);
PopupMenuEntry toPopupMenuItem({bool useIcons = false}) => const PopupMenuDivider(height: 3);
@override
Widget toLabel() => Container();
@override
Widget toListItem(BuildContext context, {bool useIcons = false, bool shouldPop = true}) => Divider();
Widget toListItem(BuildContext context, {bool useIcons = false, bool shouldPop = true}) => const Divider();
}
class ItemActionButton extends ItemAction {
@ -67,7 +67,7 @@ class ItemActionButton extends ItemAction {
iconTheme: IconThemeData(color: Theme.of(context).colorScheme.onSurface),
),
child: Row(
children: [if (icon != null) icon!, SizedBox(width: 8), if (label != null) Flexible(child: label!)],
children: [if (icon != null) icon!, const SizedBox(width: 8), if (label != null) Flexible(child: label!)],
),
),
);
@ -97,7 +97,7 @@ class ItemActionButton extends ItemAction {
iconTheme: IconThemeData(color: Theme.of(context).colorScheme.onSurface),
),
child: Row(
children: [if (icon != null) icon!, SizedBox(width: 8), if (label != null) Flexible(child: label!)],
children: [if (icon != null) icon!, const SizedBox(width: 8), if (label != null) Flexible(child: label!)],
),
);
})

View file

@ -19,7 +19,7 @@ class PosterSizeWidget extends ConsumerWidget {
child: IconButton(
onPressed: () =>
ref.read(clientSettingsProvider.notifier).update((current) => current.copyWith(posterSize: 1)),
icon: Icon(Icons.photo_size_select_large_rounded),
icon: const Icon(Icons.photo_size_select_large_rounded),
color: iconColor ?? Theme.of(context).colorScheme.onSurface,
),
),

View file

@ -11,8 +11,8 @@ class AppBarShape extends OutlinedBorder {
..addRect(rect)
..addRRect(RRect.fromRectAndCorners(
Rect.fromLTWH(rect.left, rect.bottom - 14, rect.width, 14),
topLeft: Radius.circular(14),
topRight: Radius.circular(14),
topLeft: const Radius.circular(14),
topRight: const Radius.circular(14),
));
return path;
}
@ -43,8 +43,8 @@ class BottomBarShape extends OutlinedBorder {
..addRect(rect)
..addRRect(RRect.fromRectAndCorners(
Rect.fromLTWH(rect.left, rect.top, rect.width, 14),
bottomLeft: Radius.circular(14),
bottomRight: Radius.circular(14),
bottomLeft: const Radius.circular(14),
bottomRight: const Radius.circular(14),
));
return path;
}

View file

@ -10,7 +10,7 @@ class StatusCard extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
return Padding(
padding: EdgeInsets.all(5),
padding: const EdgeInsets.all(5),
child: SizedBox(
width: 33,
height: 33,

View file

@ -23,7 +23,7 @@ class _TrickplayImageState extends ConsumerState<TrickplayImage> {
ui.Image? image;
late TrickPlayModel model = widget.trickplay;
late Duration time = widget.position ?? Duration.zero;
late Offset currentOffset = Offset(0, 0);
late Offset currentOffset = const Offset(0, 0);
String? currentUrl;
@override