Skip to content

Lucky fight #114

@akeemajani300-a11y

Description

@akeemajani300-a11y

// Basic audio player using just_audio

import 'package:flutter/material.dart';
import 'package:just_audio/just_audio.dart';

void main() {
runApp(MyApp());
}

class MyApp extends StatelessWidget {
final player = AudioPlayer();

@OverRide
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text("My Music App")),
body: Center(
child: ElevatedButton(
onPressed: () async {
await player.setUrl("https://example.com/song.mp3");
player.play();
},
child: Text("Play Song"),
),
),
),
);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions