mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-13 17:30:31 -07:00
chore: Fix dart deprecation messages
This commit is contained in:
parent
607dea3de1
commit
39a7537116
81 changed files with 258 additions and 195 deletions
|
|
@ -81,7 +81,7 @@ class _BookViewerControlsState extends ConsumerState<BookViewerControls> {
|
|||
@override
|
||||
void dispose() {
|
||||
WakelockPlus.disable();
|
||||
ScreenBrightness().resetScreenBrightness();
|
||||
ScreenBrightness().resetApplicationScreenBrightness();
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge, overlays: []);
|
||||
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
|
|
@ -150,9 +150,9 @@ class _BookViewerControlsState extends ConsumerState<BookViewerControls> {
|
|||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
overlayColor.withOpacity(1),
|
||||
overlayColor.withOpacity(0.65),
|
||||
overlayColor.withOpacity(0),
|
||||
overlayColor.withValues(alpha: 1),
|
||||
overlayColor.withValues(alpha: 0.65),
|
||||
overlayColor.withValues(alpha: 0),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -198,9 +198,9 @@ class _BookViewerControlsState extends ConsumerState<BookViewerControls> {
|
|||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
overlayColor.withOpacity(0),
|
||||
overlayColor.withOpacity(0.65),
|
||||
overlayColor.withOpacity(1),
|
||||
overlayColor.withValues(alpha: 0),
|
||||
overlayColor.withValues(alpha: 0.65),
|
||||
overlayColor.withValues(alpha: 1),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -236,7 +236,7 @@ class _BookViewerControlsState extends ConsumerState<BookViewerControls> {
|
|||
Flexible(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.7),
|
||||
color: Colors.black.withValues(alpha: 0.7),
|
||||
borderRadius: BorderRadius.circular(60),
|
||||
),
|
||||
child: Padding(
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class CrashScreen extends ConsumerWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Card(
|
||||
color: e.color.withOpacity(0.1),
|
||||
color: e.color.withValues(alpha: 0.1),
|
||||
margin: const EdgeInsets.symmetric(vertical: 12),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
|
|
@ -90,7 +90,7 @@ class CrashScreen extends ConsumerWidget {
|
|||
children: [
|
||||
Expanded(
|
||||
child: Card(
|
||||
color: e.color.withOpacity(0.2),
|
||||
color: e.color.withValues(alpha: 0.2),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Text(
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import 'dart:async';
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'package:fladder/jellyfin/jellyfin_open_api.enums.swagger.dart';
|
||||
|
|
@ -179,7 +178,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
|||
posters: view.recentlyAdded,
|
||||
),
|
||||
)),
|
||||
].whereNotNull().toList().addInBetween(const SliverToBoxAdapter(child: SizedBox(height: 16))),
|
||||
].nonNulls.toList().addInBetween(const SliverToBoxAdapter(child: SizedBox(height: 16))),
|
||||
const DefautlSliverBottomPadding(),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class _BookDetailScreenState extends ConsumerState<BookDetailScreen> {
|
|||
}
|
||||
},
|
||||
),
|
||||
backgroundColor: Theme.of(context).colorScheme.surface.withOpacity(0.8),
|
||||
backgroundColor: Theme.of(context).colorScheme.surface.withValues(alpha: 0.8),
|
||||
onRefresh: () async => await ref.read(provider.notifier).fetchDetails(widget.item),
|
||||
backDrops: details.cover,
|
||||
content: (padding) => details.book != null
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
class LabelTitleItem extends ConsumerWidget {
|
||||
|
|
@ -32,7 +31,7 @@ class LabelTitleItem extends ConsumerWidget {
|
|||
label!,
|
||||
)
|
||||
: content!,
|
||||
].whereNotNull().toList(),
|
||||
].nonNulls.toList(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class EmptyItem extends ConsumerWidget {
|
|||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
width: 1.0,
|
||||
color: Colors.white.withOpacity(0.10),
|
||||
color: Colors.white.withValues(alpha: 0.10),
|
||||
),
|
||||
borderRadius: FladderTheme.defaultShape.borderRadius,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import 'package:fladder/models/items/item_shared_models.dart';
|
||||
import 'package:fladder/providers/items/person_details_provider.dart';
|
||||
import 'package:fladder/providers/user_provider.dart';
|
||||
|
|
@ -11,9 +16,6 @@ import 'package:fladder/util/list_extensions.dart';
|
|||
import 'package:fladder/util/string_extensions.dart';
|
||||
import 'package:fladder/util/widget_extensions.dart';
|
||||
import 'package:fladder/widgets/shared/selectable_icon_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class PersonDetailScreen extends ConsumerStatefulWidget {
|
||||
final Person person;
|
||||
|
|
@ -37,6 +39,7 @@ class _PersonDetailScreenState extends ConsumerState<PersonDetailScreen> {
|
|||
backDrops: [...?details?.movies, ...?details?.series].random().firstOrNull?.images,
|
||||
content: (padding) => Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
SizedBox(height: MediaQuery.of(context).size.height / 6),
|
||||
Padding(
|
||||
|
|
@ -89,10 +92,6 @@ class _PersonDetailScreenState extends ConsumerState<PersonDetailScreen> {
|
|||
Text("Birthday: ${DateFormat.yMEd().format(details?.dateOfBirth ?? DateTime.now()).toString()}"),
|
||||
if (details?.age != null) Text("Age: ${details?.age}"),
|
||||
if (details?.birthPlace.isEmpty == false) Text("Born in ${details?.birthPlace.join(",")}"),
|
||||
if (details?.overview.externalUrls?.isNotEmpty ?? false)
|
||||
ExternalUrlsRow(
|
||||
urls: details?.overview.externalUrls,
|
||||
).padding(padding),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
|
@ -102,7 +101,11 @@ class _PersonDetailScreenState extends ConsumerState<PersonDetailScreen> {
|
|||
if (details?.movies.isNotEmpty ?? false)
|
||||
PosterRow(contentPadding: padding, posters: details?.movies ?? [], label: "Movies"),
|
||||
if (details?.series.isNotEmpty ?? false)
|
||||
PosterRow(contentPadding: padding, posters: details?.series ?? [], label: "Series")
|
||||
PosterRow(contentPadding: padding, posters: details?.series ?? [], label: "Series"),
|
||||
if (details?.overview.externalUrls?.isNotEmpty ?? false)
|
||||
ExternalUrlsRow(
|
||||
urls: details?.overview.externalUrls,
|
||||
).padding(padding),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:ficonsax/ficonsax.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
|
|
@ -76,7 +75,7 @@ class HomeScreen extends ConsumerWidget {
|
|||
child: AutoRouter(
|
||||
builder: (context, child) {
|
||||
return NavigationScaffold(
|
||||
destinations: destinations.whereNotNull().toList(),
|
||||
destinations: destinations.nonNulls.toList(),
|
||||
currentRouteName: context.router.current.name,
|
||||
nestedChild: child,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -515,7 +515,7 @@ class _LibrarySearchScreenState extends ConsumerState<LibrarySearchScreen> {
|
|||
),
|
||||
if (librarySearchResults.fetchingItems) ...[
|
||||
Container(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
color: Colors.black.withValues(alpha: 0.1),
|
||||
),
|
||||
Center(
|
||||
child: Container(
|
||||
|
|
|
|||
|
|
@ -71,7 +71,9 @@ class LibrarySavedFiltersDialogue extends ConsumerWidget {
|
|||
tooltip: context.localized.defaultFilterForLibrary,
|
||||
style: ButtonStyle(
|
||||
backgroundColor: WidgetStatePropertyAll(
|
||||
filter.isFavourite ? Colors.yellowAccent.shade700.withOpacity(0.5) : null,
|
||||
filter.isFavourite
|
||||
? Colors.yellowAccent.shade700.withValues(alpha: 0.5)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
onPressed: () =>
|
||||
|
|
@ -107,6 +109,8 @@ class LibrarySavedFiltersDialogue extends ConsumerWidget {
|
|||
style: ButtonStyle(
|
||||
backgroundColor:
|
||||
WidgetStatePropertyAll(Theme.of(context).colorScheme.errorContainer),
|
||||
iconColor:
|
||||
WidgetStatePropertyAll(Theme.of(context).colorScheme.onErrorContainer),
|
||||
foregroundColor:
|
||||
WidgetStatePropertyAll(Theme.of(context).colorScheme.onErrorContainer),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ class LoginEditUser extends ConsumerWidget {
|
|||
child: ElevatedButton.icon(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.red,
|
||||
iconColor: Colors.white,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
onPressed: () async {
|
||||
|
|
|
|||
|
|
@ -136,10 +136,10 @@ class _PhotoViewerControllsState extends ConsumerState<PhotoViewerControls> with
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final gradient = [
|
||||
Colors.black.withOpacity(0.6),
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.1),
|
||||
Colors.black.withOpacity(0.0),
|
||||
Colors.black.withValues(alpha: 0.6),
|
||||
Colors.black.withValues(alpha: 0.3),
|
||||
Colors.black.withValues(alpha: 0.1),
|
||||
Colors.black.withValues(alpha: 0.0),
|
||||
];
|
||||
|
||||
final padding = MediaQuery.of(context).padding;
|
||||
|
|
@ -188,9 +188,12 @@ class _PhotoViewerControllsState extends ConsumerState<PhotoViewerControls> with
|
|||
.textTheme
|
||||
.titleMedium
|
||||
?.copyWith(fontWeight: FontWeight.bold, shadows: [
|
||||
BoxShadow(blurRadius: 1, spreadRadius: 1, color: Colors.black.withOpacity(0.7)),
|
||||
BoxShadow(blurRadius: 4, spreadRadius: 4, color: Colors.black.withOpacity(0.4)),
|
||||
BoxShadow(blurRadius: 20, spreadRadius: 6, color: Colors.black.withOpacity(0.2)),
|
||||
BoxShadow(
|
||||
blurRadius: 1, spreadRadius: 1, color: Colors.black.withValues(alpha: 0.7)),
|
||||
BoxShadow(
|
||||
blurRadius: 4, spreadRadius: 4, color: Colors.black.withValues(alpha: 0.4)),
|
||||
BoxShadow(
|
||||
blurRadius: 20, spreadRadius: 6, color: Colors.black.withValues(alpha: 0.2)),
|
||||
]),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -384,8 +384,8 @@ class _PhotoViewerScreenState extends ConsumerState<PhotoViewerScreen> with Widg
|
|||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Colors.black.withOpacity(0.5),
|
||||
Colors.black.withOpacity(0),
|
||||
Colors.black.withValues(alpha: 0.5),
|
||||
Colors.black.withValues(alpha: 0),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -226,7 +226,8 @@ class _SimpleVideoPlayerState extends ConsumerState<SimpleVideoPlayer> with Wind
|
|||
icon: Icon(
|
||||
player.lastState.playing ? IconsaxBold.pause_circle : IconsaxBold.play_circle,
|
||||
shadows: [
|
||||
BoxShadow(blurRadius: 16, spreadRadius: 2, color: Colors.black.withOpacity(0.15))
|
||||
BoxShadow(
|
||||
blurRadius: 16, spreadRadius: 2, color: Colors.black.withValues(alpha: 0.15))
|
||||
],
|
||||
),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class SettingsListTile extends StatelessWidget {
|
|||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 125),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primaryContainer.withOpacity(selected ? 1 : 0),
|
||||
color: Theme.of(context).colorScheme.primaryContainer.withValues(alpha: selected ? 1 : 0),
|
||||
borderRadius: BorderRadius.circular(selected ? 5 : 20),
|
||||
),
|
||||
child: Padding(
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
|
|||
padding: const EdgeInsets.all(16.0),
|
||||
child: IconButton.filledTonal(
|
||||
style: IconButton.styleFrom(
|
||||
backgroundColor: Theme.of(context).colorScheme.surface.withOpacity(0.8),
|
||||
backgroundColor: Theme.of(context).colorScheme.surface.withValues(alpha: 0.8),
|
||||
),
|
||||
onPressed: () => context.router.popBack(),
|
||||
icon: Padding(
|
||||
|
|
@ -188,6 +188,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
|
|||
),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom().copyWith(
|
||||
iconColor: WidgetStatePropertyAll(Theme.of(context).colorScheme.onErrorContainer),
|
||||
foregroundColor: WidgetStatePropertyAll(Theme.of(context).colorScheme.onErrorContainer),
|
||||
backgroundColor: WidgetStatePropertyAll(Theme.of(context).colorScheme.errorContainer),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ Future<void> showDefaultAlertDialog(
|
|||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Theme.of(context).colorScheme.errorContainer,
|
||||
foregroundColor: Theme.of(context).colorScheme.onErrorContainer,
|
||||
iconColor: Theme.of(context).colorScheme.onErrorContainer,
|
||||
),
|
||||
onPressed: () => accept.call(context),
|
||||
child: Text(acceptTitle ?? "Accept"),
|
||||
|
|
@ -61,6 +62,7 @@ Future<void> showDefaultActionDialog(
|
|||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Theme.of(context).colorScheme.primaryContainer,
|
||||
foregroundColor: Theme.of(context).colorScheme.onPrimaryContainer,
|
||||
iconColor: Theme.of(context).colorScheme.onPrimaryContainer,
|
||||
),
|
||||
onPressed: () => accept.call(context),
|
||||
child: Text(acceptTitle ?? "Accept"),
|
||||
|
|
|
|||
|
|
@ -33,12 +33,13 @@ class _DefaultTitleBarState extends ConsumerState<DefaultTitleBar> with WindowLi
|
|||
final brightness = widget.brightness ?? Theme.of(context).brightness;
|
||||
final shadows = brightness == Brightness.dark
|
||||
? [
|
||||
BoxShadow(blurRadius: 1, spreadRadius: 1, color: Theme.of(context).colorScheme.surface.withOpacity(1)),
|
||||
BoxShadow(blurRadius: 8, spreadRadius: 2, color: Colors.black.withOpacity(0.2)),
|
||||
BoxShadow(blurRadius: 3, spreadRadius: 2, color: Colors.black.withOpacity(0.3)),
|
||||
BoxShadow(
|
||||
blurRadius: 1, spreadRadius: 1, color: Theme.of(context).colorScheme.surface.withValues(alpha: 1)),
|
||||
BoxShadow(blurRadius: 8, spreadRadius: 2, color: Colors.black.withValues(alpha: 0.2)),
|
||||
BoxShadow(blurRadius: 3, spreadRadius: 2, color: Colors.black.withValues(alpha: 0.3)),
|
||||
]
|
||||
: <BoxShadow>[];
|
||||
final iconColor = Theme.of(context).colorScheme.onSurface.withOpacity(0.65);
|
||||
final iconColor = Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.65);
|
||||
return SizedBox(
|
||||
height: widget.height,
|
||||
child: switch (AdaptiveLayout.of(context).platform) {
|
||||
|
|
@ -47,7 +48,7 @@ class _DefaultTitleBarState extends ConsumerState<DefaultTitleBar> with WindowLi
|
|||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
color: Colors.black.withOpacity(0),
|
||||
color: Colors.black.withValues(alpha: 0),
|
||||
child: DragToMoveArea(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
|
|
@ -77,8 +78,8 @@ class _DefaultTitleBarState extends ConsumerState<DefaultTitleBar> with WindowLi
|
|||
return IconButton(
|
||||
style: IconButton.styleFrom(
|
||||
hoverColor: brightness == Brightness.light
|
||||
? Colors.black.withOpacity(0.1)
|
||||
: Colors.white.withOpacity(0.2),
|
||||
? Colors.black.withValues(alpha: 0.1)
|
||||
: Colors.white.withValues(alpha: 0.2),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(2))),
|
||||
onPressed: () async {
|
||||
if (isMinimized) {
|
||||
|
|
@ -110,8 +111,8 @@ class _DefaultTitleBarState extends ConsumerState<DefaultTitleBar> with WindowLi
|
|||
return IconButton(
|
||||
style: IconButton.styleFrom(
|
||||
hoverColor: brightness == Brightness.light
|
||||
? Colors.black.withOpacity(0.1)
|
||||
: Colors.white.withOpacity(0.2),
|
||||
? Colors.black.withValues(alpha: 0.1)
|
||||
: Colors.white.withValues(alpha: 0.2),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(2)),
|
||||
),
|
||||
onPressed: () async {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class _DetailScaffoldState extends ConsumerState<DetailScaffold> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final padding = EdgeInsets.symmetric(horizontal: MediaQuery.sizeOf(context).width / 25);
|
||||
final backGroundColor = Theme.of(context).colorScheme.surface.withOpacity(0.8);
|
||||
final backGroundColor = Theme.of(context).colorScheme.surface.withValues(alpha: 0.8);
|
||||
final playerState = ref.watch(mediaPlaybackProvider.select((value) => value.state));
|
||||
final minHeight = 450.0.clamp(0, MediaQuery.sizeOf(context).height).toDouble();
|
||||
final maxHeight = MediaQuery.sizeOf(context).height - 10;
|
||||
|
|
@ -114,7 +114,7 @@ class _DetailScaffoldState extends ConsumerState<DetailScaffold> {
|
|||
Colors.white,
|
||||
Colors.white,
|
||||
Colors.white,
|
||||
Colors.white.withOpacity(0),
|
||||
Colors.white.withValues(alpha: 0),
|
||||
],
|
||||
).createShader(bounds),
|
||||
child: ConstrainedBox(
|
||||
|
|
@ -145,10 +145,10 @@ class _DetailScaffoldState extends ConsumerState<DetailScaffold> {
|
|||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Theme.of(context).colorScheme.surface.withOpacity(0),
|
||||
Theme.of(context).colorScheme.surface.withOpacity(0.10),
|
||||
Theme.of(context).colorScheme.surface.withOpacity(0.35),
|
||||
Theme.of(context).colorScheme.surface.withOpacity(0.85),
|
||||
Theme.of(context).colorScheme.surface.withValues(alpha: 0),
|
||||
Theme.of(context).colorScheme.surface.withValues(alpha: 0.10),
|
||||
Theme.of(context).colorScheme.surface.withValues(alpha: 0.35),
|
||||
Theme.of(context).colorScheme.surface.withValues(alpha: 0.85),
|
||||
Theme.of(context).colorScheme.surface,
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class _FilePickerBarState extends ConsumerState<FilePickerBar> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final offColor = Theme.of(context).colorScheme.secondaryContainer;
|
||||
final onColor = Theme.of(context).colorScheme.secondaryContainer.withOpacity(0.7);
|
||||
final onColor = Theme.of(context).colorScheme.secondaryContainer.withValues(alpha: 0.7);
|
||||
final contentColor = Theme.of(context).colorScheme.onSecondaryContainer;
|
||||
return DropTarget(
|
||||
enable: !inputField,
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class FlatButton extends ConsumerWidget {
|
|||
onDoubleTap: onDoubleTap,
|
||||
onSecondaryTapDown: onSecondaryTapDown,
|
||||
borderRadius: borderRadiusGeometry ?? BorderRadius.circular(10),
|
||||
splashColor: splashColor ?? Theme.of(context).colorScheme.primary.withOpacity(0.5),
|
||||
splashColor: splashColor ?? Theme.of(context).colorScheme.primary.withValues(alpha: 0.5),
|
||||
hoverColor: showFeedback ? null : Colors.transparent,
|
||||
splashFactory: InkSparkle.splashFactory,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class IntInputField extends ConsumerWidget {
|
|||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Card(
|
||||
color: Theme.of(context).colorScheme.secondaryContainer.withOpacity(0.25),
|
||||
color: Theme.of(context).colorScheme.secondaryContainer.withValues(alpha: 0.25),
|
||||
elevation: 0,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 6),
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class _CarouselBannerState extends ConsumerState<CarouselBanner> {
|
|||
begin: Alignment.bottomLeft,
|
||||
end: Alignment.topCenter,
|
||||
colors: [
|
||||
ThemesData.of(context).dark.colorScheme.primaryContainer.withOpacity(0.85),
|
||||
ThemesData.of(context).dark.colorScheme.primaryContainer.withValues(alpha: 0.85),
|
||||
Colors.transparent,
|
||||
],
|
||||
),
|
||||
|
|
@ -144,7 +144,7 @@ class _CarouselBannerState extends ConsumerState<CarouselBanner> {
|
|||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: Colors.white.withOpacity(0.1),
|
||||
color: Colors.white.withValues(alpha: 0.1),
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: border),
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class ChapterRow extends ConsumerWidget {
|
|||
child: Card(
|
||||
elevation: 0,
|
||||
shadowColor: Colors.transparent,
|
||||
color: Theme.of(context).cardColor.withOpacity(0.4),
|
||||
color: Theme.of(context).cardColor.withValues(alpha: 0.4),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(5),
|
||||
child: Text(
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class ChipButton extends ConsumerWidget {
|
|||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Card(
|
||||
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.15),
|
||||
color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.15),
|
||||
shadowColor: Colors.transparent,
|
||||
child: FlatButton(
|
||||
onTap: onPressed,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class MediaHeader extends ConsumerWidget {
|
|||
child: Material(
|
||||
elevation: 30,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(150)),
|
||||
shadowColor: Colors.black.withOpacity(0.3),
|
||||
shadowColor: Colors.black.withValues(alpha: 0.3),
|
||||
color: Colors.transparent,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ class MediaPlayButton extends ConsumerWidget {
|
|||
ButtonStyle(
|
||||
backgroundColor: WidgetStatePropertyAll(Theme.of(context).colorScheme.primary),
|
||||
foregroundColor: WidgetStatePropertyAll(Theme.of(context).colorScheme.onPrimary),
|
||||
iconColor: WidgetStatePropertyAll(Theme.of(context).colorScheme.onPrimary),
|
||||
),
|
||||
Theme.of(context).colorScheme.onPrimary,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class _PosterImageState extends ConsumerState<PosterImage> {
|
|||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
width: 1.0,
|
||||
color: Colors.white.withOpacity(0.10),
|
||||
color: Colors.white.withValues(alpha: 0.10),
|
||||
),
|
||||
borderRadius: FladderTheme.defaultShape.borderRadius,
|
||||
),
|
||||
|
|
@ -133,7 +133,7 @@ class _PosterImageState extends ConsumerState<PosterImage> {
|
|||
if (widget.selected == true)
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.15),
|
||||
color: Colors.black.withValues(alpha: 0.15),
|
||||
border: Border.all(width: 3, color: Theme.of(context).colorScheme.primary),
|
||||
borderRadius: FladderTheme.defaultShape.borderRadius,
|
||||
),
|
||||
|
|
@ -191,7 +191,7 @@ class _PosterImageState extends ConsumerState<PosterImage> {
|
|||
shadowColor: Colors.transparent,
|
||||
child: LinearProgressIndicator(
|
||||
minHeight: 7.5,
|
||||
backgroundColor: Theme.of(context).colorScheme.onPrimary.withOpacity(0.5),
|
||||
backgroundColor: Theme.of(context).colorScheme.onPrimary.withValues(alpha: 0.5),
|
||||
value: poster.userData.progress / 100,
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
),
|
||||
|
|
@ -213,7 +213,7 @@ class _PosterImageState extends ConsumerState<PosterImage> {
|
|||
//Hover color overlay
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.55),
|
||||
color: Colors.black.withValues(alpha: 0.55),
|
||||
border: Border.all(width: 3, color: Theme.of(context).colorScheme.primary),
|
||||
borderRadius: FladderTheme.defaultShape.borderRadius,
|
||||
)),
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ class EpisodePoster extends ConsumerWidget {
|
|||
alignment: Alignment.bottomCenter,
|
||||
child: LinearProgressIndicator(
|
||||
minHeight: 6,
|
||||
backgroundColor: Colors.black.withOpacity(0.75),
|
||||
backgroundColor: Colors.black.withValues(alpha: 0.75),
|
||||
value: episode.userData.progress / 100,
|
||||
),
|
||||
),
|
||||
|
|
@ -260,7 +260,7 @@ class EpisodePoster extends ConsumerWidget {
|
|||
Icons.more_vert,
|
||||
color: Colors.white,
|
||||
shadows: [
|
||||
Shadow(color: Colors.black.withOpacity(0.45), blurRadius: 8.0),
|
||||
Shadow(color: Colors.black.withValues(alpha: 0.45), blurRadius: 8.0),
|
||||
const Shadow(color: Colors.black, blurRadius: 16.0),
|
||||
const Shadow(color: Colors.black, blurRadius: 32.0),
|
||||
const Shadow(color: Colors.black, blurRadius: 64.0),
|
||||
|
|
|
|||
|
|
@ -44,11 +44,12 @@ class _ExpandingOverviewState extends ConsumerState<ExpandingOverview> {
|
|||
stops: const [0, 1],
|
||||
colors: [
|
||||
color,
|
||||
color.withOpacity(!canExpand
|
||||
? 1
|
||||
: expanded
|
||||
color.withValues(
|
||||
alpha: !canExpand
|
||||
? 1
|
||||
: 0),
|
||||
: expanded
|
||||
? 1
|
||||
: 0),
|
||||
],
|
||||
).createShader(bounds),
|
||||
child: HtmlWidget(
|
||||
|
|
|
|||
|
|
@ -141,12 +141,13 @@ class _MediaBannerState extends ConsumerState<MediaBanner> {
|
|||
foregroundDecoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
border: Border.all(
|
||||
color: Colors.white.withOpacity(0.10), strokeAlign: BorderSide.strokeAlignInside),
|
||||
color: Colors.white.withValues(alpha: 0.10),
|
||||
strokeAlign: BorderSide.strokeAlignInside),
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.bottomLeft,
|
||||
end: Alignment.topCenter,
|
||||
colors: [
|
||||
overlayColor.withOpacity(0.85),
|
||||
overlayColor.withValues(alpha: 0.85),
|
||||
Colors.transparent,
|
||||
],
|
||||
),
|
||||
|
|
@ -238,7 +239,7 @@ class _MediaBannerState extends ConsumerState<MediaBanner> {
|
|||
maxLines: 2,
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
shadows: shadows,
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
color: Colors.white.withValues(alpha: 0.75),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class PosterListItem extends ConsumerWidget {
|
|||
height: 75 * ref.read(clientSettingsProvider.select((value) => value.posterSize)),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(selected == true ? 0.25 : 0),
|
||||
color: Theme.of(context).colorScheme.primary.withValues(alpha: selected == true ? 0.25 : 0),
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: FlatButton(
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class SeasonPoster extends ConsumerWidget {
|
|||
padding: const EdgeInsets.all(4),
|
||||
child: Container(
|
||||
child: Card(
|
||||
color: Theme.of(context).colorScheme.surface.withOpacity(0.65),
|
||||
color: Theme.of(context).colorScheme.surface.withValues(alpha: 0.65),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 12),
|
||||
child: Text(
|
||||
|
|
@ -159,7 +159,7 @@ class SeasonPoster extends ConsumerWidget {
|
|||
Icons.more_vert,
|
||||
color: Colors.white,
|
||||
shadows: [
|
||||
Shadow(color: Colors.black.withOpacity(0.45), blurRadius: 8.0),
|
||||
Shadow(color: Colors.black.withValues(alpha: 0.45), blurRadius: 8.0),
|
||||
const Shadow(color: Colors.black, blurRadius: 16.0),
|
||||
const Shadow(color: Colors.black, blurRadius: 32.0),
|
||||
const Shadow(color: Colors.black, blurRadius: 64.0),
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class _OutlinedTextFieldState extends ConsumerState<OutlinedTextField> {
|
|||
|
||||
Color getColor() {
|
||||
if (widget.errorText != null) return Theme.of(context).colorScheme.errorContainer;
|
||||
return Theme.of(context).colorScheme.secondaryContainer.withOpacity(0.25);
|
||||
return Theme.of(context).colorScheme.secondaryContainer.withValues(alpha: 0.25);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -112,31 +112,31 @@ class _OutlinedTextFieldState extends ConsumerState<OutlinedTextField> {
|
|||
decoration: InputDecoration(
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0),
|
||||
color: Theme.of(context).colorScheme.primary.withValues(alpha: 0),
|
||||
width: widget.borderWidth,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0),
|
||||
color: Theme.of(context).colorScheme.primary.withValues(alpha: 0),
|
||||
width: widget.borderWidth,
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0),
|
||||
color: Theme.of(context).colorScheme.primary.withValues(alpha: 0),
|
||||
width: widget.borderWidth,
|
||||
),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0),
|
||||
color: Theme.of(context).colorScheme.primary.withValues(alpha: 0),
|
||||
width: widget.borderWidth,
|
||||
),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.primary.withOpacity(0),
|
||||
color: Theme.of(context).colorScheme.primary.withValues(alpha: 0),
|
||||
width: widget.borderWidth,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class _SyncItemDetailsState extends ConsumerState<SyncItemDetails> {
|
|||
CircularProgressIndicator(
|
||||
value: combinedStream.progress,
|
||||
strokeWidth: 8,
|
||||
backgroundColor: Theme.of(context).colorScheme.surface.withOpacity(0.5),
|
||||
backgroundColor: Theme.of(context).colorScheme.surface.withValues(alpha: 0.5),
|
||||
strokeCap: StrokeCap.round,
|
||||
color: combinedStream.status.color(context),
|
||||
),
|
||||
|
|
@ -212,6 +212,7 @@ class _SyncItemDetailsState extends ConsumerState<SyncItemDetails> {
|
|||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Theme.of(context).colorScheme.errorContainer,
|
||||
foregroundColor: Theme.of(context).colorScheme.onErrorContainer,
|
||||
iconColor: Theme.of(context).colorScheme.onErrorContainer,
|
||||
),
|
||||
onPressed: () {
|
||||
showDefaultAlertDialog(
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class SyncListItemState extends ConsumerState<SyncListItem> {
|
|||
syncedItem: syncedItem,
|
||||
child: Card(
|
||||
elevation: 1,
|
||||
color: Theme.of(context).colorScheme.secondaryContainer.withOpacity(0.2),
|
||||
color: Theme.of(context).colorScheme.secondaryContainer.withValues(alpha: 0.2),
|
||||
shadowColor: Colors.transparent,
|
||||
child: Dismissible(
|
||||
background: Container(
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class SyncLabel extends ConsumerWidget {
|
|||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: status.color.withOpacity(0.15),
|
||||
color: status.color.withValues(alpha: 0.15),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Padding(
|
||||
|
|
@ -109,7 +109,8 @@ class SyncSubtitle extends ConsumerWidget {
|
|||
final children = syncItem.nestedChildren(ref);
|
||||
final syncStatus = ref.watch(syncStatusesProvider(syncItem)).value ?? SyncStatus.partially;
|
||||
return Container(
|
||||
decoration: BoxDecoration(color: syncStatus.color.withOpacity(0.15), borderRadius: BorderRadius.circular(10)),
|
||||
decoration:
|
||||
BoxDecoration(color: syncStatus.color.withValues(alpha: 0.15), borderRadius: BorderRadius.circular(10)),
|
||||
child: Material(
|
||||
color: const Color.fromARGB(0, 208, 130, 130),
|
||||
textStyle:
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class SyncStatusOverlay extends ConsumerWidget {
|
|||
child: Card(
|
||||
elevation: 0,
|
||||
semanticContainer: false,
|
||||
color: Colors.black.withOpacity(0.6),
|
||||
color: Colors.black.withValues(alpha: 0.6),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
|
@ -44,7 +44,7 @@ class SyncStatusOverlay extends ConsumerWidget {
|
|||
child: Card(
|
||||
elevation: 0,
|
||||
semanticContainer: false,
|
||||
color: Colors.black.withOpacity(0.6),
|
||||
color: Colors.black.withValues(alpha: 0.6),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ class _VideoPlayerNextWrapperState extends ConsumerState<VideoPlayerNextWrapper>
|
|||
|
||||
Future<void> clearOverlaySettings() async {
|
||||
if (AdaptiveLayout.of(context).inputDevice != InputDevice.pointer) {
|
||||
ScreenBrightness().resetScreenBrightness();
|
||||
ScreenBrightness().resetApplicationScreenBrightness();
|
||||
} else {
|
||||
closeFullScreen();
|
||||
}
|
||||
|
|
@ -161,7 +161,7 @@ class _VideoPlayerNextWrapperState extends ConsumerState<VideoPlayerNextWrapper>
|
|||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
color: Theme.of(context).colorScheme.surfaceContainerLowest.withOpacity(0.2),
|
||||
color: Theme.of(context).colorScheme.surfaceContainerLowest.withValues(alpha: 0.2),
|
||||
),
|
||||
if (nextUp != null)
|
||||
AnimatedAlign(
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ Future<void> showSubSelection(BuildContext context) {
|
|||
final selected = playbackModel.mediaStreams?.defaultSubStreamIndex == subModel.index;
|
||||
return ListTile(
|
||||
title: Text(subModel.label(context)),
|
||||
tileColor: selected ? Theme.of(context).colorScheme.primary.withOpacity(0.3) : null,
|
||||
tileColor: selected ? Theme.of(context).colorScheme.primary.withValues(alpha: 0.3) : null,
|
||||
subtitle: subModel.language.isNotEmpty
|
||||
? Opacity(opacity: 0.6, child: Text(subModel.language.capitalize()))
|
||||
: null,
|
||||
|
|
@ -434,7 +434,7 @@ Future<void> showAudioSelection(BuildContext context) {
|
|||
final selected = playbackModel.mediaStreams?.defaultAudioStreamIndex == audioStream.index;
|
||||
return ListTile(
|
||||
title: Text(audioStream.label(context)),
|
||||
tileColor: selected ? Theme.of(context).colorScheme.primary.withOpacity(0.3) : null,
|
||||
tileColor: selected ? Theme.of(context).colorScheme.primary.withValues(alpha: 0.3) : null,
|
||||
subtitle: audioStream.language.isNotEmpty
|
||||
? Opacity(opacity: 0.6, child: Text(audioStream.language.capitalize()))
|
||||
: null,
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class _VideoPlayerSeekIndicatorState extends ConsumerState<VideoPlayerSeekIndica
|
|||
child: Center(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.85),
|
||||
color: Colors.black.withValues(alpha: 0.85),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Padding(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import 'dart:math' as math;
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'package:fladder/models/items/chapters_model.dart';
|
||||
|
|
@ -163,8 +162,8 @@ class _ChapterProgressSliderState extends ConsumerState<VideoProgressBar> {
|
|||
.clamp(1, constraints.maxWidth),
|
||||
height: sliderHeight,
|
||||
child: GappedContainerShape(
|
||||
activeColor: Theme.of(context).colorScheme.primary.withOpacity(0.5),
|
||||
inActiveColor: Theme.of(context).colorScheme.primary.withOpacity(0.5),
|
||||
activeColor: Theme.of(context).colorScheme.primary.withValues(alpha: 0.5),
|
||||
inActiveColor: Theme.of(context).colorScheme.primary.withValues(alpha: 0.5),
|
||||
thumbPosition: bufferFraction,
|
||||
),
|
||||
),
|
||||
|
|
@ -196,7 +195,7 @@ class _ChapterProgressSliderState extends ConsumerState<VideoProgressBar> {
|
|||
shape: BoxShape.circle,
|
||||
color: activePosition
|
||||
? Theme.of(context).colorScheme.onPrimary
|
||||
: Theme.of(context).colorScheme.onSurface.withOpacity(0.5),
|
||||
: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.5),
|
||||
),
|
||||
height: constraints.maxHeight,
|
||||
width: sliderHeight - (activePosition ? 2 : 4),
|
||||
|
|
@ -204,7 +203,7 @@ class _ChapterProgressSliderState extends ConsumerState<VideoProgressBar> {
|
|||
),
|
||||
);
|
||||
},
|
||||
).whereNotNull(),
|
||||
).nonNulls,
|
||||
},
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Future<void> showSubtitleControls({
|
|||
}) async {
|
||||
await showDialog(
|
||||
context: context,
|
||||
barrierColor: Colors.black.withOpacity(0.1),
|
||||
barrierColor: Colors.black.withValues(alpha: 0.1),
|
||||
builder: (context) => AlertDialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
elevation: 0,
|
||||
|
|
@ -60,7 +60,7 @@ class _VideoSubtitleControlsState extends ConsumerState<VideoSubtitleControls> {
|
|||
duration: const Duration(milliseconds: 250),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
color: controlsHidden ? Theme.of(context).dialogBackgroundColor.withOpacity(0.75) : Colors.transparent,
|
||||
color: controlsHidden ? Theme.of(context).dialogBackgroundColor.withValues(alpha: 0.75) : Colors.transparent,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
|
|
@ -220,8 +220,8 @@ class _VideoSubtitleControlsState extends ConsumerState<VideoSubtitleControls> {
|
|||
const Icon(Icons.border_color_rounded),
|
||||
...[Colors.white, Colors.yellow, Colors.black, Colors.grey, Colors.transparent].map(
|
||||
(e) => FlatButton(
|
||||
onTap: () =>
|
||||
provider.setOutlineColor(e == Colors.transparent ? e : e.withOpacity(0.85)),
|
||||
onTap: () => provider
|
||||
.setOutlineColor(e == Colors.transparent ? e : e.withValues(alpha: 0.85)),
|
||||
borderRadiusGeometry: BorderRadius.circular(5),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: Container(
|
||||
|
|
@ -284,7 +284,7 @@ class _VideoSubtitleControlsState extends ConsumerState<VideoSubtitleControls> {
|
|||
divisions: 20,
|
||||
onChangeStart: (value) => setOpacity(const Key('backGroundOpacity')),
|
||||
onChangeEnd: (value) => setOpacity(null),
|
||||
value: subSettings.backGroundColor.opacity.clamp(0, 1),
|
||||
value: subSettings.backGroundColor.a.clamp(0, 1),
|
||||
onChanged: (value) => provider.setBackGroundOpacity(value),
|
||||
),
|
||||
),
|
||||
|
|
@ -293,7 +293,7 @@ class _VideoSubtitleControlsState extends ConsumerState<VideoSubtitleControls> {
|
|||
minWidth: 35,
|
||||
),
|
||||
child: Text(
|
||||
subSettings.backGroundColor.opacity.toStringAsFixed(2),
|
||||
subSettings.backGroundColor.a.toStringAsFixed(2),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:async/async.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:ficonsax/ficonsax.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:screen_brightness/screen_brightness.dart';
|
||||
|
|
@ -219,8 +218,8 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Colors.black.withOpacity(0.8),
|
||||
Colors.black.withOpacity(0),
|
||||
Colors.black.withValues(alpha: 0.8),
|
||||
Colors.black.withValues(alpha: 0),
|
||||
],
|
||||
)),
|
||||
child: Padding(
|
||||
|
|
@ -276,8 +275,8 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
begin: Alignment.bottomCenter,
|
||||
end: Alignment.topCenter,
|
||||
colors: [
|
||||
Colors.black.withOpacity(0.8),
|
||||
Colors.black.withOpacity(0),
|
||||
Colors.black.withValues(alpha: 0.8),
|
||||
Colors.black.withValues(alpha: 0),
|
||||
],
|
||||
)),
|
||||
child: Padding(
|
||||
|
|
@ -425,7 +424,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
details.whereNotNull().join(' - '),
|
||||
details.nonNulls.join(' - '),
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
shadows: [
|
||||
|
|
@ -506,7 +505,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
textAlign: TextAlign.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: Theme.of(context).colorScheme.surface.withOpacity(0.95),
|
||||
color: Theme.of(context).colorScheme.surface.withValues(alpha: 0.95),
|
||||
),
|
||||
textStyle: Theme.of(context).textTheme.labelLarge,
|
||||
child: IconButton(
|
||||
|
|
@ -533,7 +532,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
textAlign: TextAlign.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: Theme.of(context).colorScheme.surface.withOpacity(0.95),
|
||||
color: Theme.of(context).colorScheme.surface.withValues(alpha: 0.95),
|
||||
),
|
||||
textStyle: Theme.of(context).textTheme.labelLarge,
|
||||
child: IconButton(
|
||||
|
|
@ -625,7 +624,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
Future<void> clearOverlaySettings() async {
|
||||
toggleOverlay(value: true);
|
||||
if (AdaptiveLayout.of(context).inputDevice != InputDevice.pointer) {
|
||||
ScreenBrightness().resetScreenBrightness();
|
||||
ScreenBrightness().resetApplicationScreenBrightness();
|
||||
} else {
|
||||
disableFullScreen();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue