Created
June 29, 2019 09:49
-
-
Save ziyadElon/b10579f5d80f469c4d4c22a1fe454ccd to your computer and use it in GitHub Desktop.
Flutter Web Article Support Gist
This file contains hidden or 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 'dart:html'; | |
import 'package:flutter_web_ui/ui.dart' as ui; | |
import 'package:flutter_web/material.dart'; | |
void main() { | |
ui.platformViewRegistry.registerViewFactory( | |
'video', | |
(int viewId) => VideoElement()..src = 'some-url' | |
); | |
runApp(Directionality( | |
textDirection: TextDirection.ltr, | |
child: HtmlView(viewType: 'video'), | |
)); | |
} |
I think we can achieve that if we wrap the HtmlView inside a StatefulWidget
What package does this HtmlView come from?
I can't find flutter_web_ui
What package does this HtmlView come from?
I can't find flutter_web_ui
Try HtmlElementView
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it possible to modify the src attribute after based on user input?