feat: Add audio_video_progress_bar dependency

This commit is contained in:
Dr-Blank 2024-05-15 02:27:05 -04:00
parent 7f5309d10a
commit a1dd0e9d3f
No known key found for this signature in database
GPG key ID: 7452CC63F210A266
12 changed files with 467 additions and 255 deletions

View file

@ -0,0 +1,79 @@
import 'package:flutter/material.dart';
class PlayerWhenExpanded extends StatelessWidget {
const PlayerWhenExpanded({
super.key,
required this.imgPaddingLeft,
required this.imgPaddingVertical,
required this.imageSize,
required this.img,
required this.percentageExpandedPlayer,
required this.text,
required this.buttonSkipBackwards,
required this.buttonPlayExpanded,
required this.buttonSkipForward,
required this.progressIndicator,
});
/// padding values control the position of the image
final double imgPaddingLeft;
final double imgPaddingVertical;
final double imageSize;
final Widget img;
final double percentageExpandedPlayer;
final Text text;
final IconButton buttonSkipBackwards;
final IconButton buttonPlayExpanded;
final IconButton buttonSkipForward;
final Widget progressIndicator;
@override
Widget build(BuildContext context) {
return Column(
children: [
Align(
alignment: Alignment.centerLeft,
child: Padding(
padding: EdgeInsets.only(
left: imgPaddingLeft,
top: imgPaddingVertical,
// bottom: paddingVertical,
),
child: SizedBox(
height: imageSize,
child: InkWell(
onTap: () {},
child: img,
),
),
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 33),
child: Opacity(
opacity: percentageExpandedPlayer,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Flexible(child: text),
Flexible(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
buttonSkipBackwards,
buttonPlayExpanded,
buttonSkipForward,
],
),
),
Flexible(child: progressIndicator),
],
),
),
),
),
],
);
}
}