Last active
November 2, 2021 09:23
-
-
Save suragch/df9fd1c587ef755ea9adfe6140d8295a to your computer and use it in GitHub Desktop.
Steaming audio in Flutter with Just Audio (setup)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:audio_video_progress_bar/audio_video_progress_bar.dart'; | |
import 'package:flutter/material.dart'; | |
import 'page_manager.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatefulWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@override | |
_MyAppState createState() => _MyAppState(); | |
} | |
class _MyAppState extends State<MyApp> { | |
late final PageManager _pageManager; | |
@override | |
void initState() { | |
super.initState(); | |
_pageManager = PageManager(); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: Scaffold( | |
body: Padding( | |
padding: const EdgeInsets.all(20.0), | |
child: Column( | |
children: [ | |
const Spacer(), | |
const ProgressBar( | |
progress: Duration.zero, | |
total: Duration.zero, | |
), | |
IconButton( | |
icon: const Icon(Icons.play_arrow), | |
iconSize: 32.0, | |
onPressed: () {}, | |
), | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment