mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-15 18:25:59 -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
|
|
@ -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,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue