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'), | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try HtmlElementView