try adding animated bars
This commit is contained in:
parent
3f9c9d5027
commit
93d3e88bc4
30
build.sh
Normal file → Executable file
30
build.sh
Normal file → Executable file
|
|
@ -1,15 +1,35 @@
|
||||||
echo "1. Linux"
|
echo "1. Linux"
|
||||||
echo "2. Android"
|
echo "2. Android"
|
||||||
|
echo "3. All"
|
||||||
echo ""
|
echo ""
|
||||||
echo -n "Target? "
|
echo -n "Target? "
|
||||||
read target
|
read target
|
||||||
|
|
||||||
case "$target" in
|
build() {
|
||||||
1) target="linux";;
|
set -x
|
||||||
2) target="android --split-per-abi"
|
flutter build $@
|
||||||
esac
|
set +x
|
||||||
|
}
|
||||||
|
|
||||||
|
build_linux() {
|
||||||
|
build linux
|
||||||
|
}
|
||||||
|
|
||||||
|
build_android() {
|
||||||
|
build apk --split-per-abi
|
||||||
|
}
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
flutter pub get
|
flutter pub get
|
||||||
flutter pub run build_runner build
|
flutter pub run build_runner build
|
||||||
flutter build $target
|
set +x
|
||||||
|
|
||||||
|
case "$target" in
|
||||||
|
1) build_linux;;
|
||||||
|
2) build_android;;
|
||||||
|
3)
|
||||||
|
build_linux &
|
||||||
|
build_android &
|
||||||
|
wait
|
||||||
|
;;
|
||||||
|
esac
|
||||||
59
lib/ui/animated_bars.dart
Normal file
59
lib/ui/animated_bars.dart
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
import 'dart:math';
|
||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class AnimatedBars extends StatefulWidget {
|
||||||
|
final double size;
|
||||||
|
final Color? color;
|
||||||
|
const AnimatedBars({
|
||||||
|
super.key,
|
||||||
|
this.size = 24.0,
|
||||||
|
this.color,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<AnimatedBars> createState() => _AnimatedBarsState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AnimatedBarsState extends State<AnimatedBars>
|
||||||
|
with TickerProviderStateMixin {
|
||||||
|
late final _controller = AnimationController(
|
||||||
|
vsync: this, duration: const Duration(milliseconds: 1000))
|
||||||
|
..repeat(reverse: true);
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_controller.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final color = widget.color ?? Theme.of(context).colorScheme.onSurface;
|
||||||
|
final r = Random();
|
||||||
|
final count = 3;
|
||||||
|
AnimatedIcons.search_ellipsis;
|
||||||
|
return SizedBox.square(
|
||||||
|
dimension: widget.size,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
children: List.generate(
|
||||||
|
count,
|
||||||
|
(index) => SizedBox(
|
||||||
|
width: widget.size / count,
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
child: SizeTransition(
|
||||||
|
sizeFactor: Tween(begin: 1.0, end: 0.2)..animate(
|
||||||
|
CurvedAnimation(
|
||||||
|
parent: _controller.,
|
||||||
|
curve: Interval(0.1 * index, 0.3 * index,
|
||||||
|
curve: Curves.easeIn))),
|
||||||
|
axisAlignment: 1.0,
|
||||||
|
child: Container(color: color)),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -96,6 +96,7 @@ class PlayerScreen extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ChangeNotifierProvider(
|
return ChangeNotifierProvider(
|
||||||
|
lazy: false,
|
||||||
create: (context) => BackgroundProvider(),
|
create: (context) => BackgroundProvider(),
|
||||||
child: PlayerArtColorScheme(
|
child: PlayerArtColorScheme(
|
||||||
child: PlayerScreenBackground(
|
child: PlayerScreenBackground(
|
||||||
|
|
@ -126,16 +127,14 @@ class PlayerArtColorScheme extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Consumer<BackgroundProvider>(
|
final backgroundProvider = context.watch<BackgroundProvider>();
|
||||||
builder: (context, backgroundProvider, child) {
|
|
||||||
if (backgroundProvider.dominantColor == null) {
|
if (backgroundProvider.dominantColor == null) {
|
||||||
// do nothing
|
// do nothing
|
||||||
return child!;
|
return child;
|
||||||
}
|
}
|
||||||
|
|
||||||
final brightness = forceDark
|
final brightness =
|
||||||
? Brightness.dark
|
forceDark ? Brightness.dark : Theme.of(context).colorScheme.brightness;
|
||||||
: Theme.of(context).colorScheme.brightness;
|
|
||||||
|
|
||||||
return Theme(
|
return Theme(
|
||||||
data: Theme.of(context).copyWith(
|
data: Theme.of(context).copyWith(
|
||||||
|
|
@ -143,8 +142,6 @@ class PlayerArtColorScheme extends StatelessWidget {
|
||||||
seedColor: backgroundProvider.dominantColor!,
|
seedColor: backgroundProvider.dominantColor!,
|
||||||
brightness: brightness,
|
brightness: brightness,
|
||||||
)),
|
)),
|
||||||
child: child!);
|
|
||||||
},
|
|
||||||
child: child);
|
child: child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -233,7 +230,7 @@ class PlayerScreenBackground extends StatelessWidget {
|
||||||
(settings.blurPlayerBackground || settings.colorGradientBackground);
|
(settings.blurPlayerBackground || settings.colorGradientBackground);
|
||||||
final color = hasBackground
|
final color = hasBackground
|
||||||
? Colors.transparent
|
? Colors.transparent
|
||||||
: Theme.of(context).scaffoldBackgroundColor;
|
: Theme.of(context).colorScheme.background;
|
||||||
Widget widgetChild = Scaffold(
|
Widget widgetChild = Scaffold(
|
||||||
appBar: appBar,
|
appBar: appBar,
|
||||||
backgroundColor: color,
|
backgroundColor: color,
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import 'package:freezer/api/player/player_helper.dart';
|
||||||
import 'package:freezer/icons.dart';
|
import 'package:freezer/icons.dart';
|
||||||
import 'package:freezer/main.dart';
|
import 'package:freezer/main.dart';
|
||||||
import 'package:freezer/translations.i18n.dart';
|
import 'package:freezer/translations.i18n.dart';
|
||||||
|
import 'package:freezer/ui/animated_bars.dart';
|
||||||
|
|
||||||
import '../api/definitions.dart';
|
import '../api/definitions.dart';
|
||||||
import 'cached_image.dart';
|
import 'cached_image.dart';
|
||||||
|
|
@ -117,6 +118,29 @@ class TrackTile extends StatelessWidget {
|
||||||
width: 48.0,
|
width: 48.0,
|
||||||
height: 48.0,
|
height: 48.0,
|
||||||
),
|
),
|
||||||
|
// StreamBuilder<MediaItem?>(
|
||||||
|
// initialData: audioHandler.mediaItem.value,
|
||||||
|
// stream: audioHandler.mediaItem,
|
||||||
|
// builder: (context, snapshot) {
|
||||||
|
// final child = CachedImage(
|
||||||
|
// url: artUri,
|
||||||
|
// width: 48.0,
|
||||||
|
// height: 48.0,
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
// if (snapshot.data?.id == trackId) {
|
||||||
|
// return Stack(children: [
|
||||||
|
// child,
|
||||||
|
// const Positioned.fill(
|
||||||
|
// child: DecoratedBox(
|
||||||
|
// decoration: BoxDecoration(color: Colors.black26),
|
||||||
|
// child: AnimatedBars()),
|
||||||
|
// ),
|
||||||
|
// ]);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return child;
|
||||||
|
// }),
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
onLongPress: normalizeSecondary(onSecondary),
|
onLongPress: normalizeSecondary(onSecondary),
|
||||||
trailing: Row(
|
trailing: Row(
|
||||||
|
|
|
||||||
3563
page.web.json
Normal file
3563
page.web.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -60,10 +60,9 @@ packages:
|
||||||
audio_service_mpris:
|
audio_service_mpris:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: audio_service_mpris
|
path: "../audio-service-mpris"
|
||||||
sha256: a8d1583f9143d17b2facc994a99bd1ea257cec43adcb8d7349458555c62b570f
|
relative: true
|
||||||
url: "https://pub.dev"
|
source: path
|
||||||
source: hosted
|
|
||||||
version: "0.1.3"
|
version: "0.1.3"
|
||||||
audio_service_platform_interface:
|
audio_service_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
|
|
|
||||||
14
pubspec.yaml
14
pubspec.yaml
|
|
@ -84,17 +84,19 @@ dependencies:
|
||||||
# Player
|
# Player
|
||||||
just_audio: ^0.9.35
|
just_audio: ^0.9.35
|
||||||
# Player plugin for Linux and Windows
|
# Player plugin for Linux and Windows
|
||||||
just_audio_media_kit:
|
just_audio_media_kit: ^2.0.2
|
||||||
path: ../just_audio_media_kit
|
|
||||||
# Player libs for Linux and windows
|
# Player libs for Linux and windows
|
||||||
media_kit_libs_linux: any
|
media_kit_libs_linux: any
|
||||||
media_kit_libs_windows_audio: any
|
media_kit_libs_windows_audio: any
|
||||||
|
|
||||||
|
# Audio service plugin for Linux (MPRIS)
|
||||||
|
audio_service_mpris:
|
||||||
|
path: ../audio-service-mpris
|
||||||
|
|
||||||
rxdart: ^0.27.7
|
rxdart: ^0.27.7
|
||||||
isar: ^3.1.0+1
|
isar: ^3.1.0+1
|
||||||
isar_flutter_libs: ^3.1.0+1
|
isar_flutter_libs: ^3.1.0+1
|
||||||
flutter_background_service: ^5.0.1
|
flutter_background_service: ^5.0.1
|
||||||
audio_service_mpris: ^0.1.0
|
|
||||||
dio: ^5.3.3
|
dio: ^5.3.3
|
||||||
dio_cookie_manager: ^3.1.1
|
dio_cookie_manager: ^3.1.1
|
||||||
flutter_cache_manager_hive:
|
flutter_cache_manager_hive:
|
||||||
|
|
@ -105,10 +107,10 @@ dependencies:
|
||||||
pointycastle: ^3.7.4
|
pointycastle: ^3.7.4
|
||||||
i18n_extension_importer: ^0.0.6
|
i18n_extension_importer: ^0.0.6
|
||||||
tray_manager: ^0.2.1
|
tray_manager: ^0.2.1
|
||||||
window_manager:
|
window_manager: ^0.3.8
|
||||||
^0.3.8
|
|
||||||
get_it: ^7.6.7
|
get_it: ^7.6.7
|
||||||
freezed_annotation: ^2.4.1
|
freezed_annotation:
|
||||||
|
^2.4.1
|
||||||
#deezcryptor:
|
#deezcryptor:
|
||||||
#path: deezcryptor/
|
#path: deezcryptor/
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue