Skip to content

Commit

Permalink
chore: upgrade to flutter 3.27.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Feichtmeier committed Dec 19, 2024
1 parent df42149 commit 60f726f
Show file tree
Hide file tree
Showing 31 changed files with 123 additions and 106 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main]

env:
FLUTTER_VERSION: '3.24.5'
FLUTTER_VERSION: '3.27.1'

jobs:
analyze:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

env:
FLUTTER_VERSION: '3.24.5'
FLUTTER_VERSION: '3.27.1'

jobs:
release_with_macos_dmg:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

env:
FLUTTER_VERSION: '3.24.5'
FLUTTER_VERSION: '3.27.1'

jobs:
build_and_release_linux_snap_edge_amd64:
Expand Down
6 changes: 3 additions & 3 deletions lib/common/view/audio_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class _AudioCard extends StatelessWidget {
onTap: onTap,
onHover: onHover,
borderRadius: BorderRadius.circular(12),
hoverColor: theme.colorScheme.onSurface.withOpacity(0.1),
hoverColor: theme.colorScheme.onSurface.withValues(alpha: 0.1),
child: Container(
margin: const EdgeInsets.all(4),
decoration: BoxDecoration(
Expand All @@ -140,8 +140,8 @@ class _AudioCard extends StatelessWidget {
? Border.all(
width: 1,
color: light
? theme.colorScheme.onSurface.withOpacity(0.05)
: Colors.white.withOpacity(0.005),
? theme.colorScheme.onSurface.withValues(alpha: 0.05)
: Colors.white.withValues(alpha: 0.005),
)
: null,
),
Expand Down
3 changes: 2 additions & 1 deletion lib/common/view/audio_card_bottom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class AudioCardBottom extends StatelessWidget {
text ?? '',
style: style ??
theme.textTheme.bodyMedium?.copyWith(
color: theme.colorScheme.onSurface.withOpacity(0.9),
color:
theme.colorScheme.onSurface.withValues(alpha: 0.9),
),
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
Expand Down
2 changes: 1 addition & 1 deletion lib/common/view/audio_fall_back_icon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class AudioFallBackIcon extends StatelessWidget {
child: Icon(
audio?.audioType?.iconData ?? Iconz.musicNote,
size: iconSize,
color: contrastColor(gradientColor).withOpacity(0.7),
color: contrastColor(gradientColor).withValues(alpha: 0.7),
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/common/view/audio_page_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class AudioPageHeader extends StatelessWidget {
offset: const Offset(0, 0),
spreadRadius: 0.8,
blurRadius: 0,
color: theme.shadowColor.withOpacity(0.1),
color: theme.shadowColor.withValues(alpha: 0.1),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion lib/common/view/audio_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class _AudioTileState extends State<AudioTile> {
selected: widget.selected,
selectedColor:
widget.isPlayerPlaying ? selectedColor : theme.colorScheme.onSurface,
selectedTileColor: theme.colorScheme.onSurface.withOpacity(0.05),
selectedTileColor: theme.colorScheme.onSurface.withValues(alpha: 0.05),
contentPadding: audioTilePadding.copyWith(
left: widget.audioPageType == AudioPageType.album ? 10 : null,
),
Expand Down
2 changes: 1 addition & 1 deletion lib/common/view/audio_tile_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class _Button extends StatelessWidget {
color: context.colorScheme.onSurface,
style: IconButton.styleFrom(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)),
backgroundColor: context.colorScheme.onSurface.withOpacity(0.1),
backgroundColor: context.colorScheme.onSurface.withValues(alpha: 0.1),
),
onPressed: onPressed,
icon: icon,
Expand Down
2 changes: 1 addition & 1 deletion lib/common/view/copy_clipboard_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class _CopyClipboardContentState extends State<CopyClipboardContent> {
Widget build(BuildContext context) {
final theme = context.theme;
final textColor =
theme.snackBarTheme.contentTextStyle?.color?.withOpacity(0.8);
theme.snackBarTheme.contentTextStyle?.color?.withValues(alpha: 0.8);
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Row(
Expand Down
4 changes: 2 additions & 2 deletions lib/common/view/fall_back_header_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class FallBackHeaderImage extends StatelessWidget {
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
baseColor.scale(lightness: 0.1).withOpacity(0.4),
baseColor.scale(lightness: 0.6).withOpacity(0.4),
baseColor.scale(lightness: 0.1).withValues(alpha: 0.4),
baseColor.scale(lightness: 0.6).withValues(alpha: 0.4),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/common/view/progress.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Progress extends StatelessWidget {
backgroundColor: value == null
? null
: (backgroundColor ??
context.theme.colorScheme.primary.withOpacity(0.3)),
context.theme.colorScheme.primary.withValues(alpha: 0.3)),
),
);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/common/view/round_image_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class RoundImageContainer extends StatelessWidget {
offset: const Offset(0, 0),
spreadRadius: 1,
blurRadius: 1,
color: theme.shadowColor.withOpacity(0.4),
color: theme.shadowColor.withValues(alpha: 0.4),
);

if (images.length == 1) {
Expand Down Expand Up @@ -86,7 +86,7 @@ class ArtistVignette extends StatelessWidget {
boxShadow: [
BoxShadow(
offset: const Offset(0, 1),
color: Colors.black.withOpacity(0.3),
color: Colors.black.withValues(alpha: 0.3),
blurRadius: 3,
spreadRadius: 0.1,
),
Expand Down
4 changes: 2 additions & 2 deletions lib/common/view/side_bar_fall_back_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class SideBarFallBackImage extends StatelessWidget {
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
baseColor.scale(lightness: 0.1).withOpacity(0.4),
baseColor.scale(lightness: 0.6).withOpacity(0.4),
baseColor.scale(lightness: 0.1).withValues(alpha: 0.4),
baseColor.scale(lightness: 0.6).withValues(alpha: 0.4),
],
),
),
Expand Down
3 changes: 2 additions & 1 deletion lib/common/view/tapable_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class TapAbleText extends StatelessWidget {
final theme = context.theme;

final inkWell = InkWell(
hoverColor: (style?.color ?? theme.colorScheme.primary).withOpacity(0.3),
hoverColor:
(style?.color ?? theme.colorScheme.primary).withValues(alpha: 0.3),
borderRadius: BorderRadius.circular(4),
onTap: onTap == null ? null : () => onTap!(),
child: Text(
Expand Down
4 changes: 2 additions & 2 deletions lib/common/view/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ IconButtonThemeData iconButtonTheme(ThemeData? data) {
),
backgroundColor: WidgetStateProperty.resolveWith(
(s) => s.contains(WidgetState.selected)
? data.colorScheme.onSurface.withOpacity(0.1)
? data.colorScheme.onSurface.withValues(alpha: 0.1)
: Colors.transparent,
),
),
Expand All @@ -64,7 +64,7 @@ const yaruFixDarkDividerColor = Color.fromARGB(19, 255, 255, 255);
Color getPlayerBg(Color? surfaceTintColor, Color fallbackColor) {
if (surfaceTintColor != null) {
return Color.alphaBlend(
surfaceTintColor.withOpacity(0.15),
surfaceTintColor.withValues(alpha: 0.15),
fallbackColor,
);
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/extensions/theme_data_x.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extension ThemeDataX on ThemeData {
letterSpacing: 0,
leadingDistribution: TextLeadingDistribution.proportional,
fontSize: 25,
color: colorScheme.onSurface.withOpacity(0.9),
color: colorScheme.onSurface.withValues(alpha: 0.9),
);

TextStyle? get pageHeaderDescription =>
Expand Down
5 changes: 5 additions & 0 deletions lib/library/library_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ class LibraryModel extends SafeChangeNotifier implements NavigatorObserver {
printMessageInDebugMode('didStopUserGesture');
}

@override
void didChangeTop(Route topRoute, Route? previousTopRoute) {
printMessageInDebugMode('didChangeTop');
}

// Note: Navigator.initState ensures assert(observer.navigator == null);
// Afterwards the Navigator itself!!! sets the navigator of its observers...
@override
Expand Down
4 changes: 2 additions & 2 deletions lib/local_audio/view/playlists_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ class PlaylistsView extends StatelessWidget {
: id == kLikedAudiosPageId
? Container(
decoration: BoxDecoration(
color:
context.colorScheme.primary.withOpacity(0.3),
color: context.colorScheme.primary
.withValues(alpha: 0.3),
shape: BoxShape.circle,
),
child: Icon(Iconz.heart),
Expand Down
4 changes: 3 additions & 1 deletion lib/player/player_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,9 @@ class PlayerService {
Future<void> safeLastPosition() async {
if (_audio?.audioType == AudioType.radio ||
_audio?.url == null ||
_position == null) return;
_position == null) {
return;
}
await addLastPosition(_audio!.url!, _position!);
}

Expand Down
8 changes: 4 additions & 4 deletions lib/player/view/full_height_video_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ class FullHeightVideoPlayer extends StatelessWidget with WatchItMixin {
: '${audio?.title == null ? '' : '${audio!.title}'} - ${audio?.album == null ? '' : '${audio!.album}'} - ${audio?.artist == null ? '' : '${audio!.artist}'}';
final mediaKitTheme = MaterialVideoControlsThemeData(
seekBarThumbColor: baseColor,
seekBarColor: baseColor.withOpacity(0.3),
seekBarPositionColor: baseColor.withOpacity(0.9),
seekBarBufferColor: baseColor.withOpacity(0.6),
seekBarColor: baseColor.withValues(alpha: 0.3),
seekBarPositionColor: baseColor.withValues(alpha: 0.9),
seekBarBufferColor: baseColor.withValues(alpha: 0.6),
buttonBarButtonColor: baseColor,
controlsHoverDuration: const Duration(seconds: 10),
seekGesture: true,
Expand All @@ -50,7 +50,7 @@ class FullHeightVideoPlayer extends StatelessWidget with WatchItMixin {
child: PlayerMainControls(
active: active,
iconColor: baseColor,
avatarColor: baseColor.withOpacity(0.1),
avatarColor: baseColor.withValues(alpha: 0.1),
),
),
],
Expand Down
4 changes: 3 additions & 1 deletion lib/player/view/player_title_and_artist.dart
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ class PlayerTitleAndArtist extends StatelessWidget with WatchItMixin {
}) {
if (audio.url == null ||
audio.uuid == null ||
libraryModel.selectedPageId == audio.uuid) return;
libraryModel.selectedPageId == audio.uuid) {
return;
}
libraryModel.push(
builder: (_) => StationPage(station: audio),
pageId: audio.uuid!,
Expand Down
10 changes: 5 additions & 5 deletions lib/player/view/player_track.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ class PlayerTrack extends StatelessWidget with WatchItMixin {
trackHeight: yaruStyled && !bottomPlayer
? 5.0
: (isMobilePlatform ? 2.0 : 4.0),
color: mainColor.withOpacity(0.8),
backgroundColor: mainColor.withOpacity(0.4),
color: mainColor.withValues(alpha: 0.8),
backgroundColor: mainColor.withValues(alpha: 0.4),
),
)
: Padding(
Expand All @@ -92,10 +92,10 @@ class PlayerTrack extends StatelessWidget with WatchItMixin {
trackShape: trackShape as SliderTrackShape,
trackHeight:
bottomPlayer ? (isMobilePlatform ? 2.0 : 4.0) : 4.0,
inactiveTrackColor: mainColor.withOpacity(0.2),
activeTrackColor: mainColor.withOpacity(0.85),
inactiveTrackColor: mainColor.withValues(alpha: 0.2),
activeTrackColor: mainColor.withValues(alpha: 0.85),
overlayColor: mainColor,
secondaryActiveTrackColor: mainColor.withOpacity(0.25),
secondaryActiveTrackColor: mainColor.withValues(alpha: 0.25),
),
child: RepaintBoundary(
child: Slider(
Expand Down
4 changes: 2 additions & 2 deletions lib/player/view/queue/queue_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class _QueueBodyState extends State<QueueBody> {
),
buildDefaultDragHandles: false,
proxyDecorator: (child, index, animation) => Material(
color: context.colorScheme.onSurface.withOpacity(0.1),
color: context.colorScheme.onSurface.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(6),
child: child,
),
Expand Down Expand Up @@ -154,7 +154,7 @@ class _QueueTileState extends State<_QueueTile> {
audios: widget.queue,
index: widget.queue.indexOf(widget.audio),
),
hoverColor: context.colorScheme.onSurface.withOpacity(0.3),
hoverColor: context.colorScheme.onSurface.withValues(alpha: 0.3),
leading: Visibility(
visible: widget.selected,
child: const Text('>'),
Expand Down
4 changes: 3 additions & 1 deletion lib/podcasts/podcast_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ class PodcastService {
).then((audios) {
if (firstOld.year != null &&
audios.firstOrNull?.year == firstOld.year ||
audios.isEmpty) return;
audios.isEmpty) {
return;
}

_libraryService.updatePodcast(old.key, audios);
if (updateMessage != null) {
Expand Down
4 changes: 2 additions & 2 deletions lib/podcasts/view/podcast_tile_play_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class PodcastTilePlayButton extends StatelessWidget {
CircleAvatar(
radius: smallAvatarButtonRadius,
backgroundColor: selected
? theme.colorScheme.primary.withOpacity(0.08)
: theme.colorScheme.onSurface.withOpacity(0.09),
? theme.colorScheme.primary.withValues(alpha: 0.08)
: theme.colorScheme.onSurface.withValues(alpha: 0.09),
child: SizedBox.square(
dimension: smallAvatarButtonRadius * 2,
child: IconButton(
Expand Down
4 changes: 2 additions & 2 deletions lib/podcasts/view/podcast_tile_progress.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class PodcastTileProgress extends StatelessWidget with WatchItMixin {
child: Progress(
padding: EdgeInsets.zero,
color: selected
? theme.colorScheme.primary.withOpacity(0.9)
: theme.colorScheme.primary.withOpacity(0.4),
? theme.colorScheme.primary.withValues(alpha: 0.9)
: theme.colorScheme.primary.withValues(alpha: 0.4),
value: sliderActive
? (pos.inSeconds.toDouble() / dur.inSeconds.toDouble())
: 0,
Expand Down
4 changes: 2 additions & 2 deletions lib/settings/view/theme_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class ThemeTile extends StatelessWidget {
height: kLargestSpace,
decoration: BoxDecoration(
color: themeMode == ThemeMode.dark
? Colors.white.withOpacity(0.05)
: Colors.black.withOpacity(0.1),
? Colors.white.withValues(alpha: 0.05)
: Colors.black.withValues(alpha: 0.1),
borderRadius: const BorderRadius.only(
topRight: Radius.circular(10),
topLeft: Radius.circular(10),
Expand Down
Loading

0 comments on commit 60f726f

Please sign in to comment.