Skip to content

Instantly share code, notes, and snippets.

flutter_audio_query: ^0.3.5+6
just_audio: ^0.6.5
video_player: ^0.10.11+2
flick_video_player: ^0.1.1
import 'package:flutter/material.dart';
import 'package:task1_app/audio.dart';
import 'package:task1_app/home.dart';
import 'package:task1_app/tracks.dart';
import 'package:task1_app/video.dart';
//import 'package:task1_app/video.dart';
void main() {
runApp(MaterialApp(
child: RaisedButton(
onPressed: () => {Navigator.pushNamed(context, "/tracks")},
color: Colors.blue[300],
child: Text("MUSIC",
style: TextStyle(
color: Colors.indigo,
decorationStyle: TextDecorationStyle.wavy,
fontSize: 25,
fontStyle: FontStyle.italic,
)),
new MaterialButton(
height: 100.0,
minWidth: 200.0,
color: Theme.of(context).backgroundColor,
textColor: Colors.indigoAccent,
child: new Text("VIDEO",
style: TextStyle(
color: Colors.indigo,
fontSize: 25,
fontStyle: FontStyle.italic,
class Tracks extends StatefulWidget {
_TracksState createState() => _TracksState();
}
class _TracksState extends State<Tracks> {
final FlutterAudioQuery audioQuery = FlutterAudioQuery();
List<SongInfo> songs = [];
int currentIndex = 0;
//final GlobalKey<_MyaudioState>key=GlobalKey<_MyaudioState>();
void initState() {
Slider(
inactiveColor: Colors.black,
activeColor: Colors.redAccent,
min: minimumValue,max: maximumValue,value: currentValue,
onChanged: (value) {
currentValue=value;
player.seek(Duration(milliseconds: currentValue.round()));
},
),
Container(transform: Matrix4.translationValues(0, -15, 0),margin: EdgeInsets.fromLTRB(10, 0, 10, 0),child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween,children: [
class Myaudio extends StatefulWidget {
_MyaudioState createState() => _MyaudioState();
SongInfo songInfo;
Function changeTrack;
final GlobalKey<_MyaudioState> key;
Myaudio({this.songInfo,this.changeTrack,this.key}):super(key:key);
}
class _MyaudioState extends State<Myaudio> {
double minimumValue = 0.0, maximumValue = 0.0, currentValue = 0.0;
class VideoPlayerScreen extends StatefulWidget {
VideoPlayerScreen({Key key}) : super(key: key);
@override
_VideoPlayerScreenState createState() => _VideoPlayerScreenState();
}
class _VideoPlayerScreenState extends State<VideoPlayerScreen> {
VideoPlayerController _controller;
Future<void> _initializeVideoPlayerFuture;
import 'package:animation_app/animation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
title: Text(
import 'package:flutter/material.dart';
import 'package:liquid_swipe/liquid_swipe.dart';
class MyAnimationApp extends StatefulWidget {
@override
_MyAnimationAppState createState() => _MyAnimationAppState();
}
class _MyAnimationAppState extends State<MyAnimationApp>
with SingleTickerProviderStateMixin {