fwfh_just_audio 0.14.0-alpha.1 fwfh_just_audio: ^0.14.0-alpha.1 copied to clipboard
WidgetFactory extension to render AUDIO with the just_audio plugin.
import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
import 'package:fwfh_just_audio/fwfh_just_audio.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'fwfh_just_audio',
home: Scaffold(
appBar: AppBar(
title: const Text('JustAudioFactory Demo'),
),
body: Center(
child: HtmlWidget(
'''
<audio controls src="https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3">
<code>AUDIO</code> support is not enabled.
</audio>''',
factoryBuilder: () => MyWidgetFactory(),
),
),
),
);
}
}
class MyWidgetFactory extends WidgetFactory with JustAudioFactory {}