mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-10 07:50:28 -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
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ void fladderSnackbar(
|
|||
clipBehavior: Clip.none,
|
||||
showCloseIcon: showCloseButton,
|
||||
duration: duration,
|
||||
padding: EdgeInsets.all(18),
|
||||
padding: const EdgeInsets.all(18),
|
||||
action: action,
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
]),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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)),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class PosterWidget extends ConsumerWidget {
|
|||
opacity: opacity,
|
||||
child: subTitle!,
|
||||
),
|
||||
Spacer()
|
||||
const Spacer()
|
||||
],
|
||||
if (poster.subText?.isNotEmpty ?? false)
|
||||
Flexible(
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue