mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-11 08:20:49 -07:00
[Setup] Added build.yaml and check.yaml (#1)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
226686eb18
commit
7b3e733b76
112 changed files with 3926 additions and 3784 deletions
|
|
@ -61,7 +61,7 @@ class _GappedContainerPainter extends CustomPainter {
|
|||
thumbCenterDxFraction.isFinite ? thumbCenterDxFraction * size.width : 0.0; // Default to 0 if invalid fraction
|
||||
|
||||
final Radius trackCornerRadius = Radius.circular(trackRect.shortestSide / 2);
|
||||
final Radius trackInsideCornerRadius = Radius.circular(2.0);
|
||||
final Radius trackInsideCornerRadius = const Radius.circular(2.0);
|
||||
|
||||
final RRect trackRRect = RRect.fromRectAndCorners(
|
||||
trackRect,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class FladderAppbar extends StatelessWidget implements PreferredSize {
|
|||
height: height,
|
||||
child: Row(
|
||||
children: [
|
||||
if (automaticallyImplyLeading && context.canPop()) BackButton(),
|
||||
if (automaticallyImplyLeading && context.canPop()) const BackButton(),
|
||||
Expanded(
|
||||
child: DefaultTitleBar(
|
||||
label: label,
|
||||
|
|
@ -44,7 +44,7 @@ class FladderAppbar extends StatelessWidget implements PreferredSize {
|
|||
backgroundColor: Theme.of(context).colorScheme.surface.withOpacity(0),
|
||||
scrolledUnderElevation: 0,
|
||||
elevation: 0,
|
||||
systemOverlayStyle: SystemUiOverlayStyle(),
|
||||
systemOverlayStyle: const SystemUiOverlayStyle(),
|
||||
title: const Text(""),
|
||||
automaticallyImplyLeading: automaticallyImplyLeading,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class _CurrentlyPlayingBarState extends ConsumerState<FloatingPlayerBar> {
|
|||
final playbackModel = ref.watch(playBackModel.select((value) => value?.item));
|
||||
final progress = playbackInfo.position.inMilliseconds / playbackInfo.duration.inMilliseconds;
|
||||
return Dismissible(
|
||||
key: Key("CurrentlyPlayingBar"),
|
||||
key: const Key("CurrentlyPlayingBar"),
|
||||
confirmDismiss: (direction) async {
|
||||
if (direction == DismissDirection.up) {
|
||||
await openFullScreenPlayer();
|
||||
|
|
@ -73,7 +73,7 @@ class _CurrentlyPlayingBarState extends ConsumerState<FloatingPlayerBar> {
|
|||
child: Card(
|
||||
elevation: 3,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(minHeight: 50, maxHeight: 85),
|
||||
constraints: const BoxConstraints(minHeight: 50, maxHeight: 85),
|
||||
child: LayoutBuilder(builder: (context, constraints) {
|
||||
return Row(
|
||||
children: [
|
||||
|
|
@ -108,7 +108,7 @@ class _CurrentlyPlayingBarState extends ConsumerState<FloatingPlayerBar> {
|
|||
Positioned.fill(
|
||||
child: Tooltip(
|
||||
message: "Expand player",
|
||||
waitDuration: Duration(milliseconds: 500),
|
||||
waitDuration: const Duration(milliseconds: 500),
|
||||
child: AnimatedOpacity(
|
||||
opacity: showExpandButton ? 1 : 0,
|
||||
duration: const Duration(milliseconds: 125),
|
||||
|
|
@ -116,7 +116,7 @@ class _CurrentlyPlayingBarState extends ConsumerState<FloatingPlayerBar> {
|
|||
color: Colors.black.withOpacity(0.6),
|
||||
child: FlatButton(
|
||||
onTap: () async => openFullScreenPlayer(),
|
||||
child: Icon(Icons.keyboard_arrow_up_rounded),
|
||||
child: const Icon(Icons.keyboard_arrow_up_rounded),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
@ -157,8 +157,8 @@ class _CurrentlyPlayingBarState extends ConsumerState<FloatingPlayerBar> {
|
|||
child: IconButton.filledTonal(
|
||||
onPressed: () => ref.read(videoPlayerProvider).playOrPause(),
|
||||
icon: playbackInfo.playing
|
||||
? Icon(Icons.pause_rounded)
|
||||
: Icon(Icons.play_arrow_rounded),
|
||||
? const Icon(Icons.pause_rounded)
|
||||
: const Icon(Icons.play_arrow_rounded),
|
||||
),
|
||||
),
|
||||
if (constraints.maxWidth > 500) ...{
|
||||
|
|
@ -176,14 +176,14 @@ class _CurrentlyPlayingBarState extends ConsumerState<FloatingPlayerBar> {
|
|||
),
|
||||
Tooltip(
|
||||
message: "Stop playback",
|
||||
waitDuration: Duration(milliseconds: 500),
|
||||
waitDuration: const Duration(milliseconds: 500),
|
||||
child: IconButton(
|
||||
onPressed: () async => stopPlayer(),
|
||||
icon: Icon(IconsaxBold.stop),
|
||||
icon: const Icon(IconsaxBold.stop),
|
||||
),
|
||||
),
|
||||
},
|
||||
].addInBetween(SizedBox(width: 8)),
|
||||
].addInBetween(const SizedBox(width: 8)),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ class _NavigationBodyState extends ConsumerState<NavigationBody> {
|
|||
],
|
||||
const Spacer(),
|
||||
IconTheme(
|
||||
data: IconThemeData(size: 28),
|
||||
data: const IconThemeData(size: 28),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
|
|
@ -155,8 +155,8 @@ class _NavigationBodyState extends ConsumerState<NavigationBody> {
|
|||
child: widget.currentLocation.contains(SettingsRoute().route)
|
||||
? Card(
|
||||
color: Theme.of(context).colorScheme.primaryContainer,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Icon(IconsaxBold.setting_3),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -55,9 +55,9 @@ class _NavigationButtonState extends ConsumerState<NavigationButton> {
|
|||
Flexible(
|
||||
child: ElevatedButton(
|
||||
style: ButtonStyle(
|
||||
elevation: WidgetStatePropertyAll(0),
|
||||
padding: WidgetStatePropertyAll(EdgeInsets.zero),
|
||||
backgroundColor: WidgetStatePropertyAll(Colors.transparent),
|
||||
elevation: const WidgetStatePropertyAll(0),
|
||||
padding: const WidgetStatePropertyAll(EdgeInsets.zero),
|
||||
backgroundColor: const WidgetStatePropertyAll(Colors.transparent),
|
||||
foregroundColor: WidgetStateProperty.resolveWith((states) {
|
||||
return widget.selected
|
||||
? Theme.of(context).colorScheme.primary
|
||||
|
|
@ -88,7 +88,7 @@ class _NavigationButtonState extends ConsumerState<NavigationButton> {
|
|||
],
|
||||
),
|
||||
AnimatedContainer(
|
||||
duration: Duration(milliseconds: 250),
|
||||
duration: const Duration(milliseconds: 250),
|
||||
margin: EdgeInsets.only(top: widget.selected ? 8 : 0),
|
||||
height: widget.selected ? 6 : 0,
|
||||
width: widget.selected ? 14 : 0,
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class NestedNavigationDrawer extends ConsumerWidget {
|
|||
actions: [
|
||||
ItemActionButton(
|
||||
label: Text(context.localized.scanLibrary),
|
||||
icon: Icon(IconsaxOutline.refresh),
|
||||
icon: const Icon(IconsaxOutline.refresh),
|
||||
action: () => showRefreshPopup(context, library.id, library.name),
|
||||
),
|
||||
],
|
||||
|
|
@ -109,7 +109,7 @@ class NestedNavigationDrawer extends ConsumerWidget {
|
|||
const Divider(indent: 28, endIndent: 28),
|
||||
if (isExpanded)
|
||||
Transform.translate(
|
||||
offset: Offset(-8, 0),
|
||||
offset: const Offset(-8, 0),
|
||||
child: DrawerListButton(
|
||||
label: context.localized.settings,
|
||||
selectedIcon: const Icon(IconsaxBold.setting_3),
|
||||
|
|
@ -131,8 +131,8 @@ class NestedNavigationDrawer extends ConsumerWidget {
|
|||
else
|
||||
DrawerListButton(
|
||||
label: context.localized.settings,
|
||||
selectedIcon: Icon(IconsaxBold.setting_2),
|
||||
icon: Icon(IconsaxOutline.setting_2),
|
||||
selectedIcon: const Icon(IconsaxBold.setting_2),
|
||||
icon: const Icon(IconsaxOutline.setting_2),
|
||||
selected: currentLocation.contains(SettingsRoute().basePath),
|
||||
onPressed: () {
|
||||
switch (AdaptiveLayout.of(context).size) {
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ class _NavigationScaffoldState extends ConsumerState<NavigationScaffold> {
|
|||
playerState == VideoPlayerState.minimized ? FloatingActionButtonLocation.centerFloat : null,
|
||||
floatingActionButton: AdaptiveLayout.of(context).layout == LayoutState.phone
|
||||
? switch (playerState) {
|
||||
VideoPlayerState.minimized => Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
VideoPlayerState.minimized => const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
child: FloatingPlayerBar(),
|
||||
),
|
||||
_ => widget.destinations.elementAtOrNull(currentIndex)?.floatingActionButton?.normal,
|
||||
|
|
@ -87,7 +87,7 @@ class _NavigationScaffoldState extends ConsumerState<NavigationScaffold> {
|
|||
controller: AppRoutes.scrollController,
|
||||
child: NestedBottomAppBar(
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, 8),
|
||||
offset: const Offset(0, 8),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
|
|
|
|||
|
|
@ -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: [
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
);
|
||||
},
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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!)],
|
||||
),
|
||||
);
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue