1
0
mirror of https://github.com/stonega/tsacdop synced 2025-02-11 00:50:42 +01:00

Change player panel radius.

This commit is contained in:
Stonegate 2021-01-01 23:42:08 +08:00
parent a9e370fbe7
commit dc40803a79

View File

@ -1099,16 +1099,13 @@ class _ControlPanelState extends State<ControlPanel>
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
padding:
EdgeInsets.only(top: 20, left: 30, right: 30),
padding: EdgeInsets.only(top: 20, left: 30, right: 30),
child: SliderTheme(
data: SliderTheme.of(context).copyWith(
activeTrackColor: height <= widget.maxHeight
? context.accentColor.withAlpha(70)
: Colors.transparent,
inactiveTrackColor: height > widget.maxHeight
? Colors.transparent
: context.primaryColorDark,
//activeTrackColor: height <= widget.maxHeight
activeTrackColor: context.accentColor.withAlpha(70),
// : Colors.transparent,
inactiveTrackColor: context.primaryColorDark,
trackHeight: 8.0,
trackShape: MyRectangularTrackShape(),
thumbColor: context.accentColor,
@ -1130,13 +1127,10 @@ class _ControlPanelState extends State<ControlPanel>
Container(
height: 20.0,
padding: EdgeInsets.symmetric(horizontal: 30.0),
child: height > widget.maxHeight
? Center()
: Row(
child: Row(
children: <Widget>[
Text(
(data.backgroundAudioPosition ~/ 1000)
.toTime ??
(data.backgroundAudioPosition ~/ 1000).toTime ??
'',
style: TextStyle(fontSize: 10),
),
@ -1155,8 +1149,7 @@ class _ControlPanelState extends State<ControlPanel>
AudioProcessingState
.connecting ||
data.audioState ==
AudioProcessingState
.none ||
AudioProcessingState.none ||
data.audioState ==
AudioProcessingState
.skippingToNext
@ -1168,8 +1161,7 @@ class _ControlPanelState extends State<ControlPanel>
),
),
Text(
(data.backgroundAudioDuration ~/ 1000)
.toTime ??
(data.backgroundAudioDuration ~/ 1000).toTime ??
'',
style: TextStyle(fontSize: 10),
),
@ -1205,8 +1197,7 @@ class _ControlPanelState extends State<ControlPanel>
size: 32, color: Colors.grey[500]),
SizedBox(width: 5),
Selector<AudioPlayerNotifier, int>(
selector: (_, audio) =>
audio.rewindSeconds,
selector: (_, audio) => audio.rewindSeconds,
builder: (_, seconds, __) => Padding(
padding:
const EdgeInsets.only(top: 5.0),
@ -1230,21 +1221,19 @@ class _ControlPanelState extends State<ControlPanel>
color: context.primaryColor,
shape: BoxShape.circle,
border: Border.all(
color:
context.brightness == Brightness.dark
color: context.brightness == Brightness.dark
? Colors.black12
: Colors.white10,
width: 1),
boxShadow:
context.brightness == Brightness.dark
boxShadow: context.brightness == Brightness.dark
? _customShadowNight
: _customShadow),
child: playing
? Material(
color: Colors.transparent,
child: InkWell(
borderRadius: BorderRadius.all(
Radius.circular(30)),
borderRadius:
BorderRadius.all(Radius.circular(30)),
onTap: playing
? () {
audio.pauseAduio();
@ -1263,8 +1252,8 @@ class _ControlPanelState extends State<ControlPanel>
: Material(
color: Colors.transparent,
child: InkWell(
borderRadius: BorderRadius.all(
Radius.circular(30)),
borderRadius:
BorderRadius.all(Radius.circular(30)),
onTap: playing
? null
: () {
@ -1481,8 +1470,8 @@ class _ControlPanelState extends State<ControlPanel>
child: Container(
height: 30,
width: 30,
margin: EdgeInsets
.symmetric(
margin:
EdgeInsets.symmetric(
horizontal: 5),
decoration: e ==
currentSpeed &&
@ -1579,7 +1568,8 @@ class _ControlPanelState extends State<ControlPanel>
index: _tabIndex,
indicatorSize: 20,
fraction:
(height - widget.maxHeight) / 300,
(height + 16 - widget.maxHeight) /
316,
accentColor: context.accentColor,
color: context.textColor)),
),
@ -1609,8 +1599,8 @@ class _ControlPanelState extends State<ControlPanel>
width: 20,
child: Transform.rotate(
angle: math.pi * 0.7,
child: Icon(Icons.brightness_2,
size: 18))),
child:
Icon(Icons.brightness_2, size: 18))),
],
),
),
@ -1618,7 +1608,8 @@ class _ControlPanelState extends State<ControlPanel>
],
),
),
]),
],
),
);
},
);