Minor change.
This commit is contained in:
parent
ccdfabeb3f
commit
91eff967fb
|
@ -36,9 +36,12 @@ class Playlist extends Equatable {
|
||||||
|
|
||||||
bool get isEmpty => episodeList.isEmpty;
|
bool get isEmpty => episodeList.isEmpty;
|
||||||
|
|
||||||
|
int get length => episodes.length;
|
||||||
|
|
||||||
Playlist(this.name,
|
Playlist(this.name,
|
||||||
{String id, List<String> episodeList, List<EpisodeBrief> episodes})
|
{String id, List<String> episodeList, List<EpisodeBrief> episodes})
|
||||||
: id = id ?? Uuid().v4(),
|
: id = id ?? Uuid().v4(),
|
||||||
|
assert(name != ''),
|
||||||
episodeList = episodeList ?? [],
|
episodeList = episodeList ?? [],
|
||||||
episodes = episodes ?? [];
|
episodes = episodes ?? [];
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ class AudioPanelState extends State<AudioPanel> with TickerProviderStateMixin {
|
||||||
_controller.forward();
|
_controller.forward();
|
||||||
_slideDirection = SlideDirection.up;
|
_slideDirection = SlideDirection.up;
|
||||||
super.initState();
|
super.initState();
|
||||||
_expandHeight = widget.maxHeight + 300;
|
_expandHeight = widget.maxHeight + 316;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -67,7 +67,7 @@ class AudioPanelState extends State<AudioPanel> with TickerProviderStateMixin {
|
||||||
void didUpdateWidget(AudioPanel oldWidget) {
|
void didUpdateWidget(AudioPanel oldWidget) {
|
||||||
if (oldWidget.maxHeight != widget.maxHeight) {
|
if (oldWidget.maxHeight != widget.maxHeight) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_expandHeight = widget.maxHeight + 300;
|
_expandHeight = widget.maxHeight + 316;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
super.didUpdateWidget(oldWidget);
|
super.didUpdateWidget(oldWidget);
|
||||||
|
@ -92,10 +92,8 @@ class AudioPanelState extends State<AudioPanel> with TickerProviderStateMixin {
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: backToMini,
|
onTap: backToMini,
|
||||||
child: Container(
|
child: Container(
|
||||||
color: Theme.of(context)
|
color: context.scaffoldBackgroundColor.withOpacity(
|
||||||
.scaffoldBackgroundColor
|
0.9 * math.min(_animation.value / widget.maxHeight, 1)),
|
||||||
.withOpacity(0.9 *
|
|
||||||
math.min(_animation.value / widget.maxHeight, 1)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -111,7 +109,7 @@ class AudioPanelState extends State<AudioPanel> with TickerProviderStateMixin {
|
||||||
height: _getHeight(),
|
height: _getHeight(),
|
||||||
child: _animation.value < widget.minHeight + 30
|
child: _animation.value < widget.minHeight + 30
|
||||||
? Container(
|
? Container(
|
||||||
color: Theme.of(context).primaryColor,
|
color: context.primaryColor,
|
||||||
child: Opacity(
|
child: Opacity(
|
||||||
opacity: _animation.value > widget.minHeight
|
opacity: _animation.value > widget.minHeight
|
||||||
? (widget.minHeight + 30 - _animation.value) / 40
|
? (widget.minHeight + 30 - _animation.value) / 40
|
||||||
|
@ -122,10 +120,9 @@ class AudioPanelState extends State<AudioPanel> with TickerProviderStateMixin {
|
||||||
: Container(
|
: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: context.primaryColor,
|
color: context.primaryColor,
|
||||||
// borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
// topLeft: Radius.circular(20.0),
|
topLeft: Radius.circular(16.0),
|
||||||
// topRight: Radius.circular(20.0)),
|
topRight: Radius.circular(16.0)),
|
||||||
|
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
offset: Offset(0, -1),
|
offset: Offset(0, -1),
|
||||||
|
@ -134,6 +131,13 @@ class AudioPanelState extends State<AudioPanel> with TickerProviderStateMixin {
|
||||||
? Colors.grey[400].withOpacity(0.5)
|
? Colors.grey[400].withOpacity(0.5)
|
||||||
: Colors.grey[800],
|
: Colors.grey[800],
|
||||||
),
|
),
|
||||||
|
BoxShadow(
|
||||||
|
offset: Offset(-1, 0),
|
||||||
|
blurRadius: 1,
|
||||||
|
color: context.brightness == Brightness.light
|
||||||
|
? Colors.grey[400].withOpacity(0.5)
|
||||||
|
: Colors.grey[800],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
|
@ -146,7 +150,13 @@ class AudioPanelState extends State<AudioPanel> with TickerProviderStateMixin {
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: math.max(widget.maxHeight,
|
height: math.max(widget.maxHeight,
|
||||||
math.min(_animation.value, _expandHeight)),
|
math.min(_animation.value, _expandHeight)),
|
||||||
child: widget.expandedPanel,
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
SizedBox(height: 16),
|
||||||
|
Expanded(child: widget.expandedPanel),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue