Skip to content

Commit 07dcac0

Browse files
committed
Fix issue with late initialization error on audio and video widgets
1 parent d13ca75 commit 07dcac0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/flutter_html_audio/lib/flutter_html_audio.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class _AudioWidgetState extends State<AudioWidget> {
3636

3737
@override
3838
void initState() {
39-
final sources = <String?>[
39+
sources = <String?>[
4040
if (widget.context.tree.element?.attributes['src'] != null)
4141
widget.context.tree.element!.attributes['src'],
4242
...ReplacedElement.parseMediaSources(widget.context.tree.element!.children),

packages/flutter_html_video/lib/flutter_html_video.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class _VideoWidgetState extends State<VideoWidget> {
3939
@override
4040
void initState() {
4141
final attributes = widget.context.tree.element?.attributes ?? {};
42-
final sources = <String?>[
42+
sources = <String?>[
4343
if (attributes['src'] != null)
4444
attributes['src'],
4545
...ReplacedElement.parseMediaSources(widget.context.tree.element!.children),

0 commit comments

Comments
 (0)