Files
SpotiFLAC-Mobile/lib/widgets/mornye_player_slider.dart
T
zarzet 63e1a9b9c8 feat(ui): add Mornye glass theme and adaptive music player
Add a selectable Mornye theme with shared glass controls, dialogs, sheets, notifications, and collection headers while retaining Material components.

Update player artwork, lyrics transitions and highlighting, synchronized rolling time labels, volume controls, and compact navigation. Unify metadata, Library, search, and extension surfaces; preserve restored artwork and report extension load failures.

Validation: full Flutter analyzer clean; 713 tests passed and 4 skipped; pinned Dart formatting and diff checks passed; signed ARM64 and ARM32 release APKs built and verified.
2026-09-19 12:10:10 +07:00

49 lines
1.3 KiB
Dart

import 'package:flutter/material.dart';
/// A continuous player track with no thumb in either gesture state.
class MornyePlayerSlider extends StatelessWidget {
const MornyePlayerSlider({
super.key,
required this.value,
required this.onChanged,
this.max = 1,
this.activeColor = Colors.white,
this.inactiveColor = const Color(0x2EFFFFFF),
this.onChangeStart,
this.onChangeEnd,
});
final double value;
final double max;
final Color activeColor;
final Color inactiveColor;
final ValueChanged<double> onChanged;
final ValueChanged<double>? onChangeStart;
final ValueChanged<double>? onChangeEnd;
@override
Widget build(BuildContext context) => SizedBox(
height: 44,
child: SliderTheme(
data: SliderTheme.of(context).copyWith(
trackHeight: 6,
trackGap: 0,
trackShape: const RoundedRectSliderTrackShape(),
thumbShape: SliderComponentShape.noThumb,
overlayShape: SliderComponentShape.noOverlay,
showValueIndicator: ShowValueIndicator.never,
),
child: Slider(
padding: const EdgeInsets.symmetric(horizontal: 8),
value: value,
max: max,
activeColor: activeColor,
inactiveColor: inactiveColor,
onChanged: onChanged,
onChangeStart: onChangeStart,
onChangeEnd: onChangeEnd,
),
),
);
}