Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/app/views/components/player_placeholder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PlayerPlaceHolder extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 7),
child: Container(
decoration: BoxDecoration(
color: colors.secondaryContainer.withOpacity(0.5),
color: colors.secondaryContainer.withValues(alpha: 0.5),
borderRadius: BorderRadius.circular(10),
),
child: Center(
Expand All @@ -33,7 +33,8 @@ class PlayerPlaceHolder extends StatelessWidget {
opacity: showPlaceHolder ? 1 : 0,
child: Icon(
Icons.play_arrow_outlined,
color: colors.onSecondaryContainer.withOpacity(0.3),
color:
colors.onSecondaryContainer.withValues(alpha: 0.3),
)),
),
)),
Expand Down
6 changes: 3 additions & 3 deletions lib/app/views/tv/screens/tv_home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class TvHomeScreen extends StatelessWidget {
curve: Curves.easeInOutQuad,
decoration: BoxDecoration(
color: homeState
? colors.secondaryContainer.withOpacity(0.5)
? colors.secondaryContainer.withValues(alpha: 0.5)
: Colors.transparent),
child: Padding(
padding: EdgeInsets.only(
Expand Down Expand Up @@ -161,7 +161,7 @@ class TvHomeScreen extends StatelessWidget {
},
unfocusedColor: colors
.secondaryContainer
.withOpacity(0.0),
.withValues(alpha: 0.0),
child: Padding(
padding:
const EdgeInsets.all(8),
Expand All @@ -188,7 +188,7 @@ class TvHomeScreen extends StatelessWidget {
homeCubit.menuItemFocusChanged,
onPressed: (context) => openSettings(context),
unfocusedColor: colors.secondaryContainer
.withOpacity(0.0),
.withValues(alpha: 0.0),
child: Padding(
padding: const EdgeInsets.all(8),
child: Row(
Expand Down
12 changes: 6 additions & 6 deletions lib/channels/models/channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ class Channel implements ShareLinks {
Map<String, dynamic> toJson() => _$ChannelToJson(this);

@override
String getInvidiousLink(Server server, int? timestamp) {
return '${server.url}/channel/$authorId';
Uri getInvidiousLink(Server server, int? timestamp) {
return Uri.parse('${server.url}/channel/$authorId');
}

@override
getRedirectLink(int? timestamp) {
return 'https://redirect.invidious.io/channel/$authorId';
Uri getRedirectLink(int? timestamp) {
return Uri.parse('https://redirect.invidious.io/channel/$authorId');
}

@override
String getYoutubeLink(int? timestamp) {
return 'https://www.youtube.com/channel/$authorId';
Uri getYoutubeLink(int? timestamp) {
return Uri.parse('https://www.youtube.com/channel/$authorId');
}
}
10 changes: 6 additions & 4 deletions lib/channels/views/tv/screens/channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ class TvChannelScreen extends StatelessWidget {
sigmaY: value,
),
child: AnimatedContainer(
color: colors.surface.withOpacity(
tv.showBackground
color: colors.surface.withValues(
alpha: tv.showBackground
? overlayBackgroundOpacity
: 0),
duration: animationDuration,
Expand All @@ -107,9 +107,11 @@ class TvChannelScreen extends StatelessWidget {
decoration: BoxDecoration(
color: tv.showBackground
? colors.surface
.withOpacity(0)
.withValues(
alpha: 0)
: colors.surface
.withOpacity(1),
.withValues(
alpha: 1),
borderRadius:
BorderRadius.circular(
35)),
Expand Down
3 changes: 2 additions & 1 deletion lib/downloads/views/components/downloaded_video.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:clipious/utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:clipious/l10n/generated/app_localizations.dart';
Expand All @@ -17,7 +18,7 @@ class DownloadedVideoView extends StatelessWidget {
openVideoSheet(BuildContext context, DownloadedVideo v) {
var cubit = context.read<DownloadManagerCubit>();
final locals = AppLocalizations.of(context)!;
showModalBottomSheet(
showSafeModalBottomSheet(
enableDrag: true,
showDragHandle: true,
context: context,
Expand Down
2 changes: 1 addition & 1 deletion lib/home/views/screens/edit_layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class SourceSwitcher extends StatelessWidget {
child: Text(
e.getLabel(locals),
style: !enabled
? TextStyle(color: colors.secondary.withOpacity(0.5))
? TextStyle(color: colors.secondary.withValues(alpha: 0.5))
: null,
));
}).toList(),
Expand Down
6 changes: 3 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class MyApp extends StatelessWidget {
inactiveTrackColor: lightColorScheme.secondaryContainer),
progressIndicatorTheme: ProgressIndicatorThemeData(
circularTrackColor: lightColorScheme.secondaryContainer
.withOpacity(0.8))),
.withValues(alpha: 0.8))),
darkTheme: ThemeData(
useMaterial3: true,
colorScheme: darkColorScheme,
Expand All @@ -272,8 +272,8 @@ class MyApp extends StatelessWidget {
sliderTheme: sliderTheme.copyWith(
inactiveTrackColor: darkColorScheme.secondaryContainer),
progressIndicatorTheme: ProgressIndicatorThemeData(
circularTrackColor:
darkColorScheme.secondaryContainer.withOpacity(0.8))),
circularTrackColor: darkColorScheme.secondaryContainer
.withValues(alpha: 0.8))),
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion lib/player/states/video_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ class VideoPlayerCubit extends MediaPlayerCubit<VideoPlayerState> {
fit: fillVideo ? BoxFit.cover : BoxFit.contain,
subtitlesConfiguration: BetterPlayerSubtitlesConfiguration(
backgroundColor: settings.state.subtitlesBackground
? Colors.black.withOpacity(0.8)
? Colors.black.withValues(alpha: 0.8)
: Colors.transparent,
fontSize: settings.state.subtitleSize,
outlineEnabled: true,
Expand Down
2 changes: 1 addition & 1 deletion lib/player/views/components/mini_player_progress.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class MiniPlayerProgress extends StatelessWidget {
constraints: const BoxConstraints(maxWidth: 300),
height: 2,
decoration: BoxDecoration(
color: colors.primary.withOpacity(0.2),
color: colors.primary.withValues(alpha: 0.2),
borderRadius: BorderRadius.circular(20),
),
child: AnimatedFractionallySizedBox(
Expand Down
38 changes: 21 additions & 17 deletions lib/player/views/components/player_controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ class PlayerControls extends StatelessWidget {

const PlayerControls({super.key, this.mediaPlayerCubit});

showPlaybackSpeedSelection(BuildContext context, MediaPlayerCubit player) {
Future<void> showPlaybackSpeedSelection(
BuildContext context, MediaPlayerCubit player) async {
Navigator.of(context).pop();
showModalBottomSheet(
showSafeModalBottomSheet(
isScrollControlled: true,
showDragHandle: true,
context: context,
Expand Down Expand Up @@ -69,10 +70,11 @@ class PlayerControls extends StatelessWidget {
);
}

showPlayerTrackSelection(BuildContext context, PlayerControlsState _,
Future<void> showPlayerTrackSelection(
BuildContext context, PlayerControlsState _,
{required List<String> tracks,
required int selected,
required Function(int index) onSelected}) {
required Function(int index) onSelected}) async {
List<ListTile> widgets = [];

for (int i = 0; i < tracks.length; i++) {
Expand All @@ -86,7 +88,7 @@ class PlayerControls extends StatelessWidget {
title: Text(tracks[i])));
}

showModalBottomSheet(
showSafeModalBottomSheet(
showDragHandle: true,
isScrollControlled: true,
context: context,
Expand All @@ -101,7 +103,7 @@ class PlayerControls extends StatelessWidget {
);
}

showOptionMenu(BuildContext context, PlayerControlsState controls) {
void showOptionMenu(BuildContext context, PlayerControlsState controls) {
late MediaPlayerCubit pc;
var player = context.read<PlayerCubit>();
if (mediaPlayerCubit != null) {
Expand All @@ -116,7 +118,7 @@ class PlayerControls extends StatelessWidget {
var audioTracks = pc.getAudioTracks();
var subtitles = pc.getSubtitles();

showModalBottomSheet(
showSafeModalBottomSheet(
isScrollControlled: true,
showDragHandle: true,
context: context,
Expand Down Expand Up @@ -227,7 +229,7 @@ class PlayerControls extends StatelessWidget {
inactiveTrackColor: darkColorScheme.secondaryContainer),
progressIndicatorTheme: ProgressIndicatorThemeData(
circularTrackColor:
darkColorScheme.secondaryContainer.withOpacity(0.8))),
darkColorScheme.secondaryContainer.withValues(alpha: 0.8))),
child: BlocProvider(
create: (context) =>
PlayerControlsCubit(const PlayerControlsState(), player),
Expand Down Expand Up @@ -308,7 +310,7 @@ class PlayerControls extends StatelessWidget {
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.5),
color: Colors.black.withValues(alpha: 0.5),
borderRadius: BorderRadius.circular(20)),
child: Row(
children: [
Expand Down Expand Up @@ -426,7 +428,7 @@ class PlayerControls extends StatelessWidget {
)),
if (playerState.errored)
Container(
color: Colors.black.withOpacity(0.8),
color: Colors.black.withValues(alpha: 0.8),
child: const Center(
child: Icon(Icons.error),
),
Expand All @@ -445,7 +447,8 @@ class PlayerControls extends StatelessWidget {
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(0),
color: Colors.black.withOpacity(0.4)),
color: Colors.black
.withValues(alpha: 0.4)),
child: Column(
children: [
Row(
Expand All @@ -467,8 +470,9 @@ class PlayerControls extends StatelessWidget {
style: textTheme.bodyMedium
?.copyWith(
color: Colors.white
.withOpacity(
0.8)),
.withValues(
alpha:
0.8)),
),
)),
IconButton(
Expand Down Expand Up @@ -552,8 +556,8 @@ class PlayerControls extends StatelessWidget {
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
Colors.black.withOpacity(1),
Colors.black.withOpacity(0)
Colors.black.withValues(alpha: 1),
Colors.black.withValues(alpha: 0)
]))
: null,
child: Padding(
Expand Down Expand Up @@ -772,7 +776,7 @@ class DoubleTapButton extends StatelessWidget {
curve: Curves.easeInOutQuad,
margin: EdgeInsets.all(opacity == 1 ? 50 : 0),
decoration: BoxDecoration(
color: Colors.black.withOpacity(opacity == 1 ? 0.3 : 0),
color: Colors.black.withValues(alpha: opacity == 1 ? 0.3 : 0),
shape: BoxShape.circle),
duration: const Duration(milliseconds: 150),
height: double.infinity,
Expand All @@ -790,7 +794,7 @@ class DoubleTapButton extends StatelessWidget {
Text(
stepText,
style: textTheme.bodySmall
?.copyWith(color: Colors.white.withOpacity(0.8)),
?.copyWith(color: Colors.white.withValues(alpha: 0.8)),
)
],
),
Expand Down
2 changes: 1 addition & 1 deletion lib/player/views/components/sleep_timer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SleepTimerSheet extends StatelessWidget {
const SleepTimerSheet({super.key});

static Future<SleepTimer?> show(BuildContext context) {
return showModalBottomSheet<SleepTimer?>(
return showSafeModalBottomSheet<SleepTimer?>(
showDragHandle: true,
context: context,
builder: (context) => const SleepTimerSheet());
Expand Down
2 changes: 1 addition & 1 deletion lib/player/views/components/system_setting_slider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class SystemSettingsSlider extends StatelessWidget {
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: colors.primary.withOpacity(0.1)),
color: colors.primary.withValues(alpha: 0.1)),
child: FractionallySizedBox(
alignment: Alignment.bottomCenter,
heightFactor: value,
Expand Down
8 changes: 4 additions & 4 deletions lib/player/views/tv/components/player_controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ class TvPlayerControls extends StatelessWidget {
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Colors.black.withOpacity(1),
Colors.black.withOpacity(0),
Colors.black.withOpacity(1)
Colors.black.withValues(alpha: 1),
Colors.black.withValues(alpha: 0),
Colors.black.withValues(alpha: 1)
])),
),
),
Expand Down Expand Up @@ -323,7 +323,7 @@ class TvPlayerControls extends StatelessWidget {
? Container(
decoration: BoxDecoration(
color: Colors.black
.withOpacity(0.5),
.withValues(alpha: 0.5),
borderRadius:
BorderRadius.circular(
5)),
Expand Down
4 changes: 2 additions & 2 deletions lib/playlists/views/components/playlist_inner_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class PlaylistInnerView extends StatelessWidget {
child: Container(
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
color:
colors.surface.withOpacity(0.5),
color: colors.surface
.withValues(alpha: 0.5),
shape: BoxShape.circle),
child: TweenAnimationBuilder(
tween: Tween<double>(
Expand Down
5 changes: 3 additions & 2 deletions lib/playlists/views/tablet/playlist_inner_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TabletPlaylistInnerView extends StatelessWidget {
required this.openVideo});

void showVideoModalSheet(BuildContext parentContext, Video video) {
showModalBottomSheet<void>(
showSafeModalBottomSheet<void>(
context: parentContext,
showDragHandle: true,
builder: (BuildContext context) {
Expand Down Expand Up @@ -93,7 +93,8 @@ class TabletPlaylistInnerView extends StatelessWidget {
child: Container(
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
color: colors.surface.withOpacity(0.5),
color: colors.surface
.withValues(alpha: 0.5),
shape: BoxShape.circle),
child: TweenAnimationBuilder(
tween: Tween<double>(
Expand Down
4 changes: 2 additions & 2 deletions lib/playlists/views/tv/screens/playlist.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ class TvPlaylistScreen extends PlaylistViewScreen {
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: colors.surface
.withOpacity(overlayBackgroundOpacity),
color: colors.surface.withValues(
alpha: overlayBackgroundOpacity),
),
child: Padding(
padding: const EdgeInsets.all(16.0),
Expand Down
2 changes: 1 addition & 1 deletion lib/settings/views/components/channel_notifications.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ChannelNotificationList extends StatelessWidget {
const EdgeInsets.symmetric(vertical: 5, horizontal: 10),
decoration: BoxDecoration(
color: index % 2 != 0
? colors.secondaryContainer.withOpacity(0.5)
? colors.secondaryContainer.withValues(alpha: 0.5)
: colors.surface,
borderRadius: BorderRadius.circular(10)),
child: InkWell(
Expand Down
2 changes: 1 addition & 1 deletion lib/settings/views/components/manager_server_inner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ManagerServersView extends StatelessWidget {
var locals = AppLocalizations.of(context)!;
ServerListSettingsCubit cubit = context.read<ServerListSettingsCubit>();

showModalBottomSheet<void>(
showSafeModalBottomSheet<void>(
showDragHandle: true,
context: context,
builder: (BuildContext context) {
Expand Down
Loading